Tutorials › Linear Algebra › A 2×2 Diagonalization With Distinct Eigenvalues

Diagonalization · Tutorial 518 of 1000

A 2x2 Diagonalization With Distinct Eigenvalues

Learn to find two distinct real eigenvalues, compute matching eigenvectors, and verify the resulting diagonalization.

Intermediate 10 min read

What You'll Learn

  • Compute the characteristic polynomial and identify when a real \(2\times2\) matrix has two distinct real eigenvalues.
  • Find an eigenvector for each eigenvalue by solving a homogeneous system.
  • Keep the eigenvector order consistent with the diagonal entries of the diagonal matrix.
  • Assemble the matrices \(P\) and \(D\), then verify \(A=PDP^{-1}\).
  • Recognize why a repeated or nonreal eigenvalue case needs different care.

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.

Definition: A real diagonalization of \(\mathbf{A}\in\mathbb{R}^{2\times2}\) is an equation \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\), where \(\mathbf{P}\in\mathbb{R}^{2\times2}\) is invertible and \(\mathbf{D}\) is diagonal. If the columns of \(\mathbf{P}\) are \(\mathbf{v}_1,\mathbf{v}_2\), and the diagonal entries of \(\mathbf{D}\) are \(\lambda_1,\lambda_2\) in that order, then \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\) exactly when \(\mathbf{A}\mathbf{v}_1=\lambda_1\mathbf{v}_1\) and \(\mathbf{A}\mathbf{v}_2=\lambda_2\mathbf{v}_2\).

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.

Lemma: For a real \(2\times2\) matrix \(\mathbf{M}\), the equation \(\mathbf{M}\mathbf{x}=\mathbf{0}\) has a nonzero solution if and only if \(\det\mathbf{M}=0\).

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

$$ p_{\mathbf{A}}(\lambda) =\det\begin{bmatrix}a-\lambda&b\\c&d-\lambda\end{bmatrix} =\lambda^2-(a+d)\lambda+(ad-bc). $$

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:

$$ (a+d)^2-4(ad-bc)>0. $$

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.

Theorem: If \(\mathbf{A}\in\mathbb{R}^{2\times2}\) has two distinct real eigenvalues \(\lambda_1,\lambda_2\), then it has a real diagonalization \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\), where the columns of \(\mathbf{P}\) are nonzero eigenvectors for \(\lambda_1,\lambda_2\), respectively, and \(\mathbf{D}=\begin{bmatrix}\lambda_1&0\\0&\lambda_2\end{bmatrix}\).

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:

$$ p_{\mathbf{A}}(\lambda) =(4-\lambda)(3-\lambda)-2 =\lambda^2-7\lambda+10 =(\lambda-5)(\lambda-2). $$

The eigenvalues are \(5\) and \(2\), which are distinct. For \(\lambda_1=5\), row-reduce \(\mathbf{A}-5\mathbf{I}_2\):

$$ \begin{bmatrix}-1&1\\2&-2\end{bmatrix} \xrightarrow{R_1\to -R_1} \begin{bmatrix}1&-1\\2&-2\end{bmatrix} \xrightarrow{R_2\to R_2-2R_1} \begin{bmatrix}1&-1\\0&0\end{bmatrix}. $$

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\):

$$ \begin{bmatrix}2&1\\2&1\end{bmatrix} \xrightarrow{R_1\to \frac12R_1} \begin{bmatrix}1&\frac12\\2&1\end{bmatrix} \xrightarrow{R_2\to R_2-2R_1} \begin{bmatrix}1&\frac12\\0&0\end{bmatrix}. $$

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:

$$ \mathbf{P}=\begin{bmatrix}1&1\\1&-2\end{bmatrix}, \qquad \mathbf{D}=\begin{bmatrix}5&0\\0&2\end{bmatrix}, \qquad \mathbf{P}^{-1}=\begin{bmatrix}\frac23&\frac13\\\frac13&-\frac13\end{bmatrix}. $$

Indeed, multiplying \(\mathbf{P}\mathbf{P}^{-1}\) gives \(\begin{bmatrix}1&0\\0&1\end{bmatrix}\). To check the diagonalization itself,

$$ \mathbf{P}\mathbf{D}\mathbf{P}^{-1} =\begin{bmatrix}5&2\\5&-4\end{bmatrix} \begin{bmatrix}\frac23&\frac13\\\frac13&-\frac13\end{bmatrix} =\begin{bmatrix}4&1\\2&3\end{bmatrix} =\mathbf{A}. $$

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\),

$$ \mathbf{B}-\mathbf{I}_2 =\begin{bmatrix}0&2\\0&2\end{bmatrix} \xrightarrow{R_1\to \frac12R_1} \begin{bmatrix}0&1\\0&2\end{bmatrix} \xrightarrow{R_2\to R_2-2R_1} \begin{bmatrix}0&1\\0&0\end{bmatrix}. $$

So \(y=0\), and we choose \(\mathbf{u}_1=(1,0)^{\top}\). For \(\lambda=3\),

$$ \mathbf{B}-3\mathbf{I}_2 =\begin{bmatrix}-2&2\\0&0\end{bmatrix} \xrightarrow{R_1\to-\frac12R_1} \begin{bmatrix}1&-1\\0&0\end{bmatrix}. $$

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

$$ \mathbf{P}=\begin{bmatrix}1&1\\0&1\end{bmatrix}, \qquad \mathbf{D}=\begin{bmatrix}1&0\\0&3\end{bmatrix}, \qquad \mathbf{P}^{-1}=\begin{bmatrix}1&-1\\0&1\end{bmatrix}. $$

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,

$$ \mathbf{P}\mathbf{D}\mathbf{P}^{-1} =\begin{bmatrix}1&3\\0&3\end{bmatrix} \begin{bmatrix}1&-1\\0&1\end{bmatrix} =\begin{bmatrix}1&2\\0&3\end{bmatrix} =\mathbf{B}. $$

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

$$ \mathbf{C}\mathbf{w}_1=(2,0)^{\top}=2\mathbf{w}_1, \qquad \mathbf{C}\mathbf{w}_2=(2t+3t,15)^{\top} =(5t,15)^{\top}=5\mathbf{w}_2. $$

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,

$$ \mathbf{P}\mathbf{D}\mathbf{P}^{-1} =\begin{bmatrix}2&5t\\0&15\end{bmatrix} \begin{bmatrix}1&-\frac{t}{3}\\0&\frac13\end{bmatrix} =\begin{bmatrix}2&t\\0&5\end{bmatrix} =\mathbf{C}. $$

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

$$ \mathbf{B}\mathbf{P} =\begin{bmatrix}1&3\\0&3\end{bmatrix}, \qquad \mathbf{P}\mathbf{D} =\begin{bmatrix}3&1\\0&1\end{bmatrix}. $$

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.

  1. Find the eigenvalues and eigenvectors of \(\begin{bmatrix}3&1\\0&2\end{bmatrix}\), then assemble \(P\) and \(D\).
  2. Diagonalize \(\begin{bmatrix}4&2\\1&3\end{bmatrix}\) over \(\mathbb{R}\) and verify the eigenvector equations.
  3. 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\).
  4. For a real \(2\times2\) matrix, what condition on the characteristic polynomial ensures two distinct real eigenvalues?
  5. Explain why changing the order of the eigenvectors in \(P\) requires changing the order of the diagonal entries in \(D\).

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon