Skip to main content

Section 7.2 Diagonalization: Cracking the Walnut Open

We now arrive at the central question: when can we represent a matrix \(A\) in a form \(PDP^{-1}\text{?}\) This is the process of "cracking the walnut as pieces" that we mentioned at the beginning of the chapter.

Subsection 7.2.1 What Does It Mean to Diagonalize?

Definition 7.2.1. Diagonalizable Matrix.

An \(n \times n\) matrix \(A\) is diagonalizable if there exists an invertible matrix \(P\) and a diagonal matrix \(D\) such that:
\begin{equation*} P^{-1}AP = D \end{equation*}
Equivalently, \(A = PDP^{-1}\text{.}\)

Activity 7.2.1. Discovering the Criterion for Diagonalizability.

Suppose \(A\) is an \(n \times n\) diagonalizable matrix, so there exist an invertible matrix \(P\) and a diagonal matrix \(D\) such that \(P^{-1}AP = D\text{.}\) Write \(P = [v_1 \, v_2 \, \cdots \, v_n]\) and \(D = \text{diag}(\lambda_1, \lambda_2, \ldots, \lambda_n)\text{.}\)
(a) Diagonalizable \(\Rightarrow\) \(n\) linearly independent eigenvectors.
  1. Explain why \(P^{-1}AP = D\) is equivalent to \(AP = PD\text{.}\)
  2. Expand the matrix product \(AP\) and \(PD\) column by column. What equation does each column satisfy?
  3. What does this tell you about each \(v_i\text{?}\) Why must \(A\) have \(n\) linearly independent eigenvectors?
Solution.
Multiplying both sides of \(P^{-1}AP = D\) on the left by \(P\) gives \(AP = PD\text{.}\) Expanding column by column:
\begin{align*} A[v_1 \, v_2 \, \cdots \, v_n]\amp = [v_1 \, v_2 \, \cdots \,v_n]\begin{bmatrix} \lambda_1 \amp 0 \amp \cdots \amp 0 \\ 0 \amp \lambda_2 \amp \cdots \amp 0 \\ \vdots \amp \vdots \amp \ddots \amp \vdots \\ 0 \amp 0 \amp \cdots \amp \lambda_n \end{bmatrix}\\ [Av_1 \, Av_2 \, \cdots \, Av_n]\amp = [\lambda_1 v_1 \, \lambda_2 v_2 \, \cdots \, \lambda_n v_n] \end{align*}
Comparing columns gives \(Av_i = \lambda_i v_i\) for \(i = 1, 2, \ldots, n\text{.}\) So each column \(v_i\) of \(P\) is an eigenvector of \(A\) with eigenvalue \(\lambda_i\text{.}\) Since \(P\) is invertible, its columns are linearly independent. Therefore \(A\) has \(n\) linearly independent eigenvectors.
(b) \(n\) linearly independent eigenvectors \(\Rightarrow\) Diagonalizable.
Now suppose conversely that \(A\) has \(n\) linearly independent eigenvectors \(v_1, v_2, \ldots, v_n\) with eigenvalues \(\lambda_1, \lambda_2, \ldots, \lambda_n\text{.}\) Let \(P = [v_1 \, v_2 \, \cdots \, v_n]\) and \(D = \text{diag}(\lambda_1, \ldots, \lambda_n)\text{.}\)
  1. Why is \(P\) invertible?
  2. Verify that \(AP = PD\text{.}\) Conclude that \(A\) is diagonalizable.
Solution.
Since the columns of \(P\) are the \(n\) linearly independent eigenvectors, \(P\) is invertible. Because \(Av_i = \lambda_i v_i\) for each \(i\text{,}\) the \(i\)-th column of \(AP\) is \(Av_i = \lambda_i v_i\text{,}\) which is exactly the \(i\)-th column of \(PD\text{.}\) So \(AP = PD\text{,}\) giving \(P^{-1}AP = D\text{,}\) and \(A\) is diagonalizable.
Activity 7.2.1 leads us to a fundamental criterion for diagonalizability.

How to Diagonalize a Matrix.

To diagonalize an \(n \times n\) matrix \(A\text{:}\)
  1. Find all eigenvalues of \(A\) by solving \(\det(\lambda I - A) = 0\text{.}\)
  2. Find eigenvectors: For each eigenvalue \(\lambda_i\text{,}\) solve \((A - \lambda_i I)\mathbf{x} = \mathbf{0}\) to find eigenvectors.
  3. Check linear independence: Verify that you have \(n\) linearly independent eigenvectors. If not, \(A\) is not diagonalizable.
  4. Form \(P\) and \(D\text{:}\) Let \(P\) be the matrix whose columns are the eigenvectors, and \(D\) the diagonal matrix with corresponding eigenvalues.
Then \(P^{-1}AP = D\text{,}\) or equivalently \(A = PDP^{-1}\text{.}\)

Example 7.2.3. Diagonalizing a Matrix.

Diagonalize the matrix \(A = \begin{bmatrix} 2 \amp -12 \\ 1 \amp -5 \end{bmatrix}\text{.}\)
Solution.
From Example 7.1.5, we found: eigenvalues \(\lambda_1 = -1\) and \(\lambda_2 = -2\text{,}\) with eigenvectors \(\mathbf{v}_1 = \begin{bmatrix} 4 \\ 1 \end{bmatrix}\) and \(\mathbf{v}_2 = \begin{bmatrix} 3 \\ 1 \end{bmatrix}\text{.}\)
Since we have 2 linearly independent eigenvectors for a \(2 \times 2\) matrix, \(A\) is diagonalizable. We form:
\begin{equation*} P = \begin{bmatrix} 4 \amp 3 \\ 1 \amp 1 \end{bmatrix}, \quad D = \begin{bmatrix} -1 \amp 0 \\ 0 \amp -2 \end{bmatrix} \end{equation*}
Then \(P^{-1}AP = D\text{.}\)

Example 7.2.4. Diagonalizing a Matrix with Distinct Eigenvalues.

Diagonalize the matrix
\begin{equation*} A = \begin{bmatrix} 1 \amp -1 \amp 0 \\ -1 \amp 2 \amp -1 \\ 0 \amp -1 \amp 1 \end{bmatrix} \end{equation*}
Solution.
From Example 7.1.6, we found that \(A\) has three distinct eigenvalues:
  • \(\lambda_1 = 0\) with eigenvector \(\mathbf{v}_1 = \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}\)
  • \(\lambda_2 = 1\) with eigenvector \(\mathbf{v}_2 = \begin{bmatrix} -1 \\ 0 \\ 1 \end{bmatrix}\)
  • \(\lambda_3 = 3\) with eigenvector \(\mathbf{v}_3 = \begin{bmatrix} 1 \\ -2 \\ 1 \end{bmatrix}\)
Form the matrices:
\begin{equation*} P = \begin{bmatrix} 1 \amp -1 \amp 1 \\ 1 \amp 0 \amp -2 \\ 1 \amp 1 \amp 1 \end{bmatrix}, \quad D = \begin{bmatrix} 0 \amp 0 \amp 0 \\ 0 \amp 1 \amp 0 \\ 0 \amp 0 \amp 3 \end{bmatrix} \end{equation*}
where the columns of \(P\) are the eigenvectors (in order corresponding to the eigenvalues in \(D\)).
Then \(P^{-1}AP = D\text{,}\) or equivalently \(A = PDP^{-1}\text{.}\)

Checkpoint 7.2.5.

For the matrix
\begin{equation*} B = \begin{bmatrix} 1 \amp 2 \amp -2 \\ -2 \amp 5 \amp -2 \\ -6 \amp 6 \amp -3 \end{bmatrix} \end{equation*}
find matrices \(P\) and \(D\) such that \(P^{-1}BP = D\text{.}\)
The Lemma Lemma 7.1.27 leads to a very useful sufficient condition for diagonalizability.

Subsection 7.2.2 Why Diagonalization Matters: Computing its Powers

Now we see the payoff of diagonalization! If \(A = PDP^{-1}\text{,}\) then computing powers of \(A\) becomes easy:

Proof.

We have:
\begin{align*} A^2 \amp= AA = (PDP^{-1})(PDP^{-1}) = PD(P^{-1}P)DP^{-1} = PD^2P^{-1}\\ A^3 \amp= A^2A = (PD^2P^{-1})(PDP^{-1}) = PD^3P^{-1} \end{align*}
By induction, \(A^k = PD^kP^{-1}\text{.}\) Since \(D\) is diagonal, \(D^k\) is just \(D\) with each entry raised to the \(k\)-th power.

Insight 7.2.9. Why This Is Powerful.

Computing \(A^{100}\) directly would require 99 matrix multiplications. But if \(A\) is diagonalizable:
\begin{equation*} A^{100} = P\begin{bmatrix} \lambda_1^{100} \\ \amp \ddots \\ \amp \amp \lambda_n^{100} \end{bmatrix}P^{-1} \end{equation*}
We just raise numbers to the 100th power (easy!), then do two matrix multiplications. This is dramatically faster!
This is why eigenvalues "crack open" the matrix—they reveal its underlying structure in a way that makes computation simple.