From Two Eigenpairs to a Diagonalization
For a \(2\times2\) matrix, diagonalization can be carried out directly from its eigenvalues and eigenvectors. The key is to keep the data paired: each column of the matrix \(P\) is an eigenvector, and the matching eigenvalue occupies the same position on the diagonal of \(D\). This tutorial works with real matrices that have two distinct real eigenvalues. Distinct complex eigenvalues do not, in general, give a diagonalization over \(\mathbb{R}\).
A real number \(\lambda\) is an eigenvalue of \(\mathbf{A}\in\mathbb{R}^{2\times2}\) if there is a nonzero vector \(\mathbf{v}\in\mathbb{R}^2\) such that \(\mathbf{A}\mathbf{v}=\lambda\mathbf{v}\). Such a vector is an eigenvector for \(\lambda\). Rearranging the defining equation gives \((\mathbf{A}-\lambda\mathbf{I}_2)\mathbf{v}=\mathbf{0}\). Thus, finding eigenvectors means solving a homogeneous system, and a diagonalization uses two such solutions.
The characteristic polynomial is \(p_{\mathbf{A}}(\lambda)=\det(\mathbf{A}-\lambda\mathbf{I}_2)\). Its roots identify the possible eigenvalues. The next fact explains why: a \(2\times2\) homogeneous system has a nonzero solution exactly when its coefficient matrix has determinant zero.
Proof. Write \(\mathbf{M}=\begin{bmatrix}a&b\\c&d\end{bmatrix}\). If \(ad-bc\ne0\), then \(\mathbf{M}\) has inverse \(\frac{1}{ad-bc}\begin{bmatrix}d&-b\\-c&a\end{bmatrix}\), as direct multiplication verifies. Multiplying \(\mathbf{M}\mathbf{x}=\mathbf{0}\) by this inverse gives \(\mathbf{x}=\mathbf{0}\), so there is no nonzero solution. Now suppose \(ad-bc=0\). If the first row \((a,b)\) is nonzero, the vector \(\mathbf{x}=(-b,a)^{\top}\) is nonzero and its first-row product is \(-ab+ab=0\). Its second-row product is \(-bc+ad=0\), so \(\mathbf{M}\mathbf{x}=\mathbf{0}\). If the first row is zero and the second row is nonzero, \(\mathbf{x}=(-d,c)^{\top}\) is nonzero and is annihilated by both rows. If both rows are zero, any nonzero vector is a solution. This proves both directions. \(\square\)
Finding the Eigenvalues
For \(\mathbf{A}=\begin{bmatrix}a&b\\c&d\end{bmatrix}\), the characteristic polynomial is
By the lemma, \(p_{\mathbf{A}}(\lambda)=0\) exactly when \((\mathbf{A}-\lambda\mathbf{I}_2)\mathbf{v}=\mathbf{0}\) has a nonzero solution, which is exactly the eigenvalue condition. The quadratic formula also shows that this polynomial has two distinct real roots precisely when its discriminant is positive:
When the two roots are real and distinct, call them \(\lambda_1\) and \(\lambda_2\). For each root, row-reduce \(\mathbf{A}-\lambda_i\mathbf{I}_2\) and choose a nonzero solution \(\mathbf{v}_i\). Put those eigenvectors into \(P\) as columns and their matching eigenvalues into \(D\) in the same order.
Proof. Choose nonzero eigenvectors \(\mathbf{v}_1,\mathbf{v}_2\) for the two eigenvalues. Suppose \(r\mathbf{v}_1+s\mathbf{v}_2=\mathbf{0}\). Apply \(\mathbf{A}\) to this equation to get \(r\lambda_1\mathbf{v}_1+s\lambda_2\mathbf{v}_2=\mathbf{0}\). Subtract \(\lambda_2(r\mathbf{v}_1+s\mathbf{v}_2)=\mathbf{0}\); the result is \(r(\lambda_1-\lambda_2)\mathbf{v}_1=\mathbf{0}\). Since \(\lambda_1-\lambda_2\ne0\) and \(\mathbf{v}_1\ne\mathbf{0}\), \(r=0\). The original relation then gives \(s\mathbf{v}_2=\mathbf{0}\), so \(s=0\). Thus the columns of \(\mathbf{P}=\begin{bmatrix}\mathbf{v}_1&\mathbf{v}_2\end{bmatrix}\) are independent. By the lemma, \(\det\mathbf{P}\ne0\), so \(\mathbf{P}\) is invertible. The eigenvector equations give \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\); multiplying on the right by \(\mathbf{P}^{-1}\) gives \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\). \(\square\)
Worked Diagonalizations
Worked Example: Two Eigenvectors and the Matching Diagonal
Diagonalize \(\mathbf{A}=\begin{bmatrix}4&1\\2&3\end{bmatrix}\) over \(\mathbb{R}\).
First compute its characteristic polynomial and factor it:
The eigenvalues are \(5\) and \(2\), which are distinct. For \(\lambda_1=5\), row-reduce \(\mathbf{A}-5\mathbf{I}_2\):
The equation is \(x-y=0\), so choose \(\mathbf{v}_1=(1,1)^{\top}\). For \(\lambda_2=2\), reduce \(\mathbf{A}-2\mathbf{I}_2\):
Thus \(x+\frac12y=0\); choose \(\mathbf{v}_2=(1,-2)^{\top}\). Check the eigenvector equations: \(\mathbf{A}\mathbf{v}_1=(5,5)^{\top}=5\mathbf{v}_1\), and \(\mathbf{A}\mathbf{v}_2=(2,-4)^{\top}=2\mathbf{v}_2\).
Use these vectors in the same order as their eigenvalues:
Indeed, multiplying \(\mathbf{P}\mathbf{P}^{-1}\) gives \(\begin{bmatrix}1&0\\0&1\end{bmatrix}\). To check the diagonalization itself,
Worked Example: A Triangular Matrix
Diagonalize \(\mathbf{B}=\begin{bmatrix}1&2\\0&3\end{bmatrix}\). Its characteristic polynomial is \((1-\lambda)(3-\lambda)\), so the distinct eigenvalues are \(1\) and \(3\). For \(\lambda=1\),
So \(y=0\), and we choose \(\mathbf{u}_1=(1,0)^{\top}\). For \(\lambda=3\),
So \(x=y\), and choose \(\mathbf{u}_2=(1,1)^{\top}\). Direct checks give \(\mathbf{B}\mathbf{u}_1=(1,0)^{\top}=\mathbf{u}_1\) and \(\mathbf{B}\mathbf{u}_2=(3,3)^{\top}=3\mathbf{u}_2\). Hence
The inverse check is \(\mathbf{P}\mathbf{P}^{-1}=\mathbf{I}_2\), since the product is \(\begin{bmatrix}1&0\\0&1\end{bmatrix}\). Also,
Worked Example: A Parameter in an Eigenvector
For \(\mathbf{C}=\begin{bmatrix}2&t\\0&5\end{bmatrix}\), where \(t\in\mathbb{R}\), find a diagonalization for every \(t\). The characteristic polynomial is \((2-\lambda)(5-\lambda)\), so the eigenvalues \(2\) and \(5\) are distinct for every real \(t\). For \(\lambda=2\), the system is \(ty=0,\ 3y=0\), hence \(y=0\); choose \(\mathbf{w}_1=(1,0)^{\top}\). For \(\lambda=5\), the system is \(-3x+ty=0,\ 0=0\). Taking \(y=3\) gives \(x=t\), so choose \(\mathbf{w}_2=(t,3)^{\top}\). The eigenvector checks are
Thus \(\mathbf{P}=\begin{bmatrix}1&t\\0&3\end{bmatrix}\), \(\mathbf{D}=\begin{bmatrix}2&0\\0&5\end{bmatrix}\), and \(\mathbf{P}^{-1}=\begin{bmatrix}1&-\frac{t}{3}\\0&\frac13\end{bmatrix}\). Their inverse product is \(\mathbf{P}\mathbf{P}^{-1}=\mathbf{I}_2\). Finally,
The parameter changes the second eigenvector, but its second coordinate remains \(3\), so the two columns of \(\mathbf{P}\) remain independent.
Common Mistake: Mismatching the Order
The order of the eigenvectors in \(\mathbf{P}\) must match the order of the eigenvalues in \(\mathbf{D}\). In the triangular example, suppose we keep \(\mathbf{P}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\), whose columns correspond to \(1\) then \(3\), but incorrectly set \(\mathbf{D}=\begin{bmatrix}3&0\\0&1\end{bmatrix}\). Then
These products differ, so this pairing cannot give \(\mathbf{B}\mathbf{P}=\mathbf{P}\mathbf{D}\). The correction is to either keep the eigenvectors in the order \(1,3\) and use \(D=\operatorname{diag}(1,3)\), or reverse both orders together. Checking \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\) is a quick way to catch an ordering error before computing \(\mathbf{P}^{-1}\).
What the Construction Relies On
The method depends on two conditions working together: each eigenvalue must have a nonzero eigenvector, and the two chosen eigenvectors must be independent so that \(P\) is invertible. Distinct real eigenvalues guarantee that independence, as proved above. A repeated eigenvalue does not provide that guarantee; it requires a separate check of how many independent eigenvectors are available. Likewise, if the characteristic polynomial has no real roots, the real-eigenvector construction does not produce a real diagonalization.
For a successful calculation, verify the eigenpair equations first, then verify \(\mathbf{P}\mathbf{P}^{-1}=\mathbf{I}_2\), and finally multiply \(\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\) back to the original matrix. These checks target the three places where errors most often enter: solving for an eigenvector, arranging the columns and diagonal entries, and computing the inverse or product.
Check Your Understanding
For each proposed diagonalization, keep the eigenvalue-eigenvector pairing explicit and check the matrix products.
- Find the eigenvalues and eigenvectors of \(\begin{bmatrix}3&1\\0&2\end{bmatrix}\), then assemble \(P\) and \(D\).
- Diagonalize \(\begin{bmatrix}4&2\\1&3\end{bmatrix}\) over \(\mathbb{R}\) and verify the eigenvector equations.
- For \(\begin{bmatrix}1&t\\0&4\end{bmatrix}\), find one eigenvector for each eigenvalue and state why the resulting \(P\) is invertible for every real \(t\).
- For a real \(2\times2\) matrix, what condition on the characteristic polynomial ensures two distinct real eigenvalues?
- Explain why changing the order of the eigenvectors in \(P\) requires changing the order of the diagonal entries in \(D\).