Tutorials › Linear Algebra › A 3×3 Diagonalization With Three Distinct Eigenvalues

Diagonalization · Tutorial 528 of 1000

A 3x3 Diagonalization With Three Distinct Eigenvalues

Learn how to find three distinct real eigenvalues and corresponding eigenvectors of a 3×3 matrix, then use them to build and verify an invertible eigenvector matrix.

Intermediate 11 min read

What You'll Learn

  • Compute the characteristic polynomial using the convention \(\det(\mathbf{A}-\lambda\mathbf{I}_3)\).
  • Identify real eigenvalues and solve the associated homogeneous systems for eigenvectors.
  • Check each proposed eigenvector by multiplying it by the matrix.
  • Assemble eigenvectors as the columns of an invertible matrix \(\mathbf{P}\).
  • Verify the diagonalization equation \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\).
  • Recognize determinant-sign and real-versus-complex pitfalls.

From Eigenvalues to a Diagonalization

A diagonalization turns matrix multiplication into a simpler calculation in coordinates adapted to the matrix. For a real \(3\times3\) matrix, the practical task is to find three eigenvalues and matching eigenvectors, then place those eigenvectors in the columns of a matrix. When the eigenvalues are distinct and real, their eigenvectors provide three independent directions, so the resulting matrix is invertible.

All matrices and vectors in this tutorial are over \(\mathbb{R}\). An eigenvalue \(\lambda\in\mathbb{R}\) of \(\mathbf{A}\in\mathbb{R}^{3\times3}\) is a scalar for which there is a nonzero vector \(\mathbf{v}\in\mathbb{R}^3\) satisfying \(\mathbf{A}\mathbf{v}=\lambda\mathbf{v}\). Such a vector is an eigenvector. Equivalently, \((\mathbf{A}-\lambda\mathbf{I}_3)\mathbf{v}=\mathbf{0}\). The characteristic polynomial here is \(p_{\mathbf{A}}(\lambda)=\det(\mathbf{A}-\lambda\mathbf{I}_3)\).

Definition: For a real \(3\times3\) matrix \(\mathbf{A}\), a real root \(\lambda\) of \(p_{\mathbf{A}}(\lambda)\) is a real eigenvalue. Its eigenvectors are the nonzero real solutions of \((\mathbf{A}-\lambda\mathbf{I}_3)\mathbf{v}=\mathbf{0}\). If three distinct real eigenvalues \(\lambda_1,\lambda_2,\lambda_3\) have corresponding eigenvectors \(\mathbf{v}_1,\mathbf{v}_2,\mathbf{v}_3\), form \(\mathbf{P}=\begin{bmatrix}\mathbf{v}_1&\mathbf{v}_2&\mathbf{v}_3\end{bmatrix}\) and \(\mathbf{D}=\begin{bmatrix}\lambda_1&0&0\\0&\lambda_2&0\\0&0&\lambda_3\end{bmatrix}\). If \(\mathbf{P}\) is invertible, then \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\).

For a real eigenvalue, the eigenvector calculation is a homogeneous system over \(\mathbb{R}\). The determinant criterion for square matrices says that such a system has a nonzero solution exactly when its coefficient matrix has determinant zero. Thus the real roots of \(p_{\mathbf{A}}\) are precisely the real eigenvalues. A real matrix can also have nonreal characteristic roots, which are relevant when eigenvalues are considered over \(\mathbb{C}\); here we restrict attention to real roots and real eigenvectors.

A Complete Example: Three Eigenvalues and Three Eigenvectors

Worked Example: Diagonalizing a Companion-Form Matrix

Find the eigenvalues and eigenvectors of \(\mathbf{A}=\begin{bmatrix}0&1&0\\0&0&1\\6&-11&6\end{bmatrix}\), and use them to form an eigenvector matrix.

First compute the characteristic polynomial. Expanding along the first row gives

$$ \begin{aligned} p_{\mathbf{A}}(\lambda) &=\det\begin{bmatrix}-\lambda&1&0\\0&-\lambda&1\\6&-11&6-\lambda\end{bmatrix}\\ &=(-\lambda)\bigl((-\lambda)(6-\lambda)+11\bigr)+6\\ &=-\lambda(\lambda^2-6\lambda+11)+6\\ &=-(\lambda-1)(\lambda-2)(\lambda-3). \end{aligned} $$

The roots are the three distinct real numbers \(1,2,3\). For any one of these values, the first two equations in \((\mathbf{A}-\lambda\mathbf{I}_3)\mathbf{v}=\mathbf{0}\), with \(\mathbf{v}=(x,y,z)^{\top}\), are \(-\lambda x+y=0\) and \(-\lambda y+z=0\). Hence \(y=\lambda x\) and \(z=\lambda^2x\). Taking \(x=1\) gives the candidate \(\mathbf{v}=(1,\lambda,\lambda^2)^{\top}\). The third equation becomes \(6-11\lambda+(6-\lambda)\lambda^2=0\), which is equivalent to \(-\lambda^3+6\lambda^2-11\lambda+6=0\), the characteristic-root equation.

Substituting the three roots gives \(\mathbf{v}_1=(1,1,1)^{\top}\), \(\mathbf{v}_2=(1,2,4)^{\top}\), and \(\mathbf{v}_3=(1,3,9)^{\top}\). Check each eigenvector directly:

$$ \mathbf{A}\mathbf{v}_1=\begin{bmatrix}1\\1\\1\end{bmatrix}=1\mathbf{v}_1,\qquad \mathbf{A}\mathbf{v}_2=\begin{bmatrix}2\\4\\8\end{bmatrix}=2\mathbf{v}_2,\qquad \mathbf{A}\mathbf{v}_3=\begin{bmatrix}3\\9\\27\end{bmatrix}=3\mathbf{v}_3. $$

Use these vectors as columns of \(\mathbf{P}\). Row reduction confirms that \(\mathbf{P}\) is invertible:

$$ \begin{bmatrix}1&1&1\\1&2&3\\1&4&9\end{bmatrix} \xrightarrow[\ R_3\to R_3-R_1\ ]{R_2\to R_2-R_1} \begin{bmatrix}1&1&1\\0&1&2\\0&3&8\end{bmatrix} \xrightarrow{R_3\to R_3-3R_2} \begin{bmatrix}1&1&1\\0&1&2\\0&0&2\end{bmatrix}. $$

There is a pivot in every column, so the square matrix \(\mathbf{P}\) is invertible. With \(\mathbf{D}=\begin{bmatrix}1&0&0\\0&2&0\\0&0&3\end{bmatrix}\), the multiplication check is

$$ \mathbf{A}\mathbf{P} =\begin{bmatrix}1&2&3\\1&4&9\\1&8&27\end{bmatrix} =\mathbf{P}\mathbf{D}. $$

Since \(\mathbf{P}\) is invertible, multiplying \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\) on the right by \(\mathbf{P}^{-1}\) gives \(\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\). The eigenvalue and eigenvector checks, the pivot calculation, and the matrix product all agree.

Why Three Distinct Eigenvalues Give Three Independent Vectors

Theorem: Let \(\mathbf{A}\in\mathbb{R}^{3\times3}\) have three distinct real eigenvalues \(\lambda_1,\lambda_2,\lambda_3\), with corresponding nonzero real eigenvectors \(\mathbf{v}_1,\mathbf{v}_2,\mathbf{v}_3\). Then these vectors are linearly independent. Consequently, the matrix with these vectors as columns is invertible, and \(\mathbf{A}\) is diagonalizable over \(\mathbb{R}\).

Proof. Suppose \(c_1\mathbf{v}_1+c_2\mathbf{v}_2+c_3\mathbf{v}_3=\mathbf{0}\). Apply \((\mathbf{A}-\lambda_2\mathbf{I}_3)(\mathbf{A}-\lambda_3\mathbf{I}_3)\) to both sides. The terms involving \(\mathbf{v}_2\) and \(\mathbf{v}_3\) vanish because \(\mathbf{A}\mathbf{v}_j=\lambda_j\mathbf{v}_j\). The remaining term is \(c_1(\lambda_1-\lambda_2)(\lambda_1-\lambda_3)\mathbf{v}_1=\mathbf{0}\). Both scalar factors are nonzero because the eigenvalues are distinct, and \(\mathbf{v}_1\ne\mathbf{0}\), so \(c_1=0\). Applying \((\mathbf{A}-\lambda_1\mathbf{I}_3)(\mathbf{A}-\lambda_3\mathbf{I}_3)\) gives \(c_2=0\), and applying \((\mathbf{A}-\lambda_1\mathbf{I}_3)(\mathbf{A}-\lambda_2\mathbf{I}_3)\) gives \(c_3=0\). Thus the vectors are independent. A square matrix has independent columns exactly when it is invertible, so \(\mathbf{P}=\begin{bmatrix}\mathbf{v}_1&\mathbf{v}_2&\mathbf{v}_3\end{bmatrix}\) is invertible. Column by column, \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\), where \(\mathbf{D}\) has diagonal entries \(\lambda_1,\lambda_2,\lambda_3\). Multiplication by \(\mathbf{P}^{-1}\) gives the required diagonalization. \(\square\)

This result explains why an invertibility check is still valuable in a calculation: it confirms that the eigenvectors were assembled correctly. The proof also shows why the distinctness hypothesis matters. If eigenvalues repeat, this argument cannot separate the corresponding coefficients using nonzero factors; the repeated-eigenvalue case requires a different check of how many independent eigenvectors are available.

Two Further Worked Examples

Worked Example: Eigenvectors from a Symmetric Matrix

Find three eigenpairs for \(\mathbf{B}=\begin{bmatrix}3&0&2\\0&3&0\\2&0&3\end{bmatrix}\), and form its eigenvector matrix.

Expanding \(\det(\mathbf{B}-\lambda\mathbf{I}_3)\) along row 2 gives

$$ p_{\mathbf{B}}(\lambda) =(3-\lambda)\bigl((3-\lambda)^2-4\bigr) =(3-\lambda)(1-\lambda)(5-\lambda). $$

The distinct real eigenvalues are \(1,3,5\). For \(\lambda=1\), the first and third equations of \((\mathbf{B}-\mathbf{I}_3)\mathbf{v}=\mathbf{0}\) give \(x+z=0\) and \(x+z=0\), while the second gives \(y=0\); choose \(\mathbf{u}_1=(1,0,-1)^{\top}\). For \(\lambda=3\), the equations give \(x=z=0\), with \(y\) free; choose \(\mathbf{u}_2=(0,1,0)^{\top}\). For \(\lambda=5\), they give \(z=x\) and \(y=0\); choose \(\mathbf{u}_3=(1,0,1)^{\top}\).

Direct multiplication checks all three claims: \(\mathbf{B}\mathbf{u}_1=(1,0,-1)^{\top}\), \(\mathbf{B}\mathbf{u}_2=(0,3,0)^{\top}\), and \(\mathbf{B}\mathbf{u}_3=(5,0,5)^{\top}\). Put the eigenvectors in the stated order:

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

Adding row 1 to row 3 changes the last row of \(\mathbf{P}\) to \((0,0,2)\), leaving pivots in all three columns. Also, the eigenpair checks give

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

Thus \(\mathbf{P}\) is invertible and \(\mathbf{B}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\).

Worked Example: Distinct Eigenvalues with Irrational Values

Find the eigenvalues and eigenvectors of \(\mathbf{C}=\begin{bmatrix}2&1&0\\1&2&1\\0&1&2\end{bmatrix}\), and verify that the eigenvector matrix is invertible.

Expanding along the first row, with \(s=2-\lambda\), gives

$$ \begin{aligned} p_{\mathbf{C}}(\lambda) &=(2-\lambda)\bigl((2-\lambda)^2-1\bigr)-(2-\lambda)\\ &=(2-\lambda)\bigl((2-\lambda)^2-2\bigr). \end{aligned} $$

The roots are \(2\), \(2+\sqrt{2}\), and \(2-\sqrt{2}\), which are real and distinct. For \(\lambda=2\), the system \((\mathbf{C}-2\mathbf{I}_3)\mathbf{v}=\mathbf{0}\) gives \(y=0\) and \(x+z=0\); choose \(\mathbf{w}_0=(1,0,-1)^{\top}\). For \(\lambda=2+s\), where \(s=\sqrt{2}\) or \(s=-\sqrt{2}\), choose \(\mathbf{w}_s=(1,s,1)^{\top}\). Indeed,

$$ \mathbf{C}\mathbf{w}_s =\begin{bmatrix}2+s\\2+2s\\2+s\end{bmatrix} =(2+s)\begin{bmatrix}1\\s\\1\end{bmatrix}, $$

because \(s^2=2\), so \((2+s)s=2s+2\). In particular, this verifies both eigenvectors \(\mathbf{w}_{\sqrt{2}}\) and \(\mathbf{w}_{-\sqrt{2}}\). For \(\mathbf{w}_0\), direct multiplication gives \(\mathbf{C}\mathbf{w}_0=(2,0,-2)^{\top}=2\mathbf{w}_0\).

Order the columns as \(\mathbf{w}_{\sqrt{2}},\mathbf{w}_0,\mathbf{w}_{-\sqrt{2}}\). The determinant of the resulting matrix is

$$ \det\begin{bmatrix}1&1&1\\\sqrt{2}&0&-\sqrt{2}\\1&-1&1\end{bmatrix} =-4\sqrt{2}\ne0. $$

So this eigenvector matrix is invertible. With \(\mathbf{D}=\operatorname{diag}(2+\sqrt{2},2,2-\sqrt{2})\), the three verified eigenpair equations give \(\mathbf{C}\mathbf{P}=\mathbf{P}\mathbf{D}\), and hence \(\mathbf{C}=\mathbf{P}\mathbf{D}\mathbf{P}^{-1}\).

Common Pitfalls and a Reliable Workflow

A cofactor sign error can change the roots. For the first matrix, expanding along row 1 gives a contribution \(+6\) from the second entry: the minor is \(\det\begin{bmatrix}0&1\\6&6-\lambda\end{bmatrix}=-6\), and the cofactor sign is negative, so the contribution is \(-1(-6)=+6\). Writing \(-6\) instead would give \(p_{\mathbf{A}}(0)=-6\), even though \(p_{\mathbf{A}}(0)=\det\mathbf{A}=6\). Checking at \(\lambda=0\) catches the error. The correct polynomial is \(-\lambda(\lambda^2-6\lambda+11)+6\).

Do not call a nonreal root a real eigenvalue. The characteristic polynomial can have nonreal roots even when the matrix has real entries. In this tutorial, only real roots are used with real vectors in \(\mathbb{R}^3\). If a calculation produces nonreal roots, interpreting them as eigenvalues requires working over \(\mathbb{C}\) and allowing complex eigenvectors.

A dependable calculation follows a fixed sequence: compute and factor the characteristic polynomial; identify its real roots; solve each corresponding homogeneous system; check each eigenvector by multiplication; place the vectors as columns of \(\mathbf{P}\); and verify invertibility and \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{D}\). Eigenvectors may be scaled by any nonzero real number, but the order of their columns must match the order of the diagonal entries in \(\mathbf{D}\).

Check Your Understanding

Show the determinant or multiplication checks that support each conclusion.

  1. For \(\mathbf{A}=\begin{bmatrix}0&1&0\\0&0&1\\6&-11&6\end{bmatrix}\), check that the characteristic polynomial has value \(6\) at \(\lambda=0\) as a consistency check, and then verify the whole polynomial by recomputing the determinant expansion.
  2. For the same matrix, compute \(\mathbf{A}(1,2,4)^{\top}\) and identify the eigenvalue.
  3. Explain why the three columns in the eigenvector matrix for \(\mathbf{B}\) are placed in the same order as the entries \(1,3,5\) in \(\mathbf{D}\).
  4. For \(\mathbf{C}\), why does \(s^2=2\) establish the middle coordinate of \(\mathbf{C}(1,s,1)^{\top}=(2+s)(1,s,1)^{\top}\)?
  5. State which scalar field and vector space are being used when the tutorial calls a root a real eigenvalue.

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