Math Core

Lesson 5.3 · Eigenvalues and Eigenvectors

Diagonalization

Diagonal matrices are the easiest matrices there are: you multiply, invert and raise them to powers entry by entry. Diagonalization is the process of rewriting a matrix as a diagonal matrix in disguise, A=PDP−1A = PDP^{-1}, so that questions about AA (especially about AkA^k for large kk) become questions about a diagonal matrix.

Why diagonal is easy

If D=[5002]D = \begin{bmatrix} 5 & 0 \\ 0 & 2 \end{bmatrix}, then Dk=[5k002k]D^k = \begin{bmatrix} 5^k & 0 \\ 0 & 2^k \end{bmatrix}. Now suppose A=PDP−1A = PDP^{-1} for some invertible PP. Then

A2=(PDP−1)(PDP−1)=PD(P−1P)DP−1=PD2P−1,A^2 = (PDP^{-1})(PDP^{-1}) = PD(P^{-1}P)DP^{-1} = PD^2P^{-1},

and in the same way Ak=PDkP−1A^k = PD^kP^{-1} for every positive integer kk. The inner P−1PP^{-1}P pairs cancel, and all the hard work is on the diagonal.

Definition

Diagonalizable

A square matrix AA is diagonalizable if it is similar to a diagonal matrix, that is, if A=PDP−1A = PDP^{-1} for some invertible matrix PP and diagonal matrix DD.

Which matrices can be diagonalized?

Write P=[v1 ⋯ vn]P = [\mathbf{v}_1\ \cdots\ \mathbf{v}_n] and let DD have diagonal entries λ1,…,λn\lambda_1, \dots, \lambda_n. Then

AP=[Av1 ⋯ Avn]andPD=[λ1v1 ⋯ λnvn].AP = [A\mathbf{v}_1\ \cdots\ A\mathbf{v}_n] \qquad\text{and}\qquad PD = [\lambda_1\mathbf{v}_1\ \cdots\ \lambda_n\mathbf{v}_n].

So AP=PDAP = PD says precisely that Avi=λiviA\mathbf{v}_i = \lambda_i\mathbf{v}_i for each column. If PP is also invertible, its columns are linearly independent (in particular nonzero), and AP=PDAP = PD is the same as A=PDP−1A = PDP^{-1}. That proves the central theorem.

The Diagonalization Theorem

An n×nn \times n matrix AA is diagonalizable if and only if AA has nn linearly independent eigenvectors.

In that case A=PDP−1A = PDP^{-1}, where the columns of PP are nn linearly independent eigenvectors and the diagonal entries of DD are the corresponding eigenvalues, in the same order.

Geometrically, the columns of PP form an eigenvector basis of Rn\mathbb{R}^n. In that basis, AA just scales each coordinate by its eigenvalue. The picture shows this for A=[4123]A = \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix}, whose eigen-directions are (1,1)(1, 1) with λ=5\lambda = 5 and (1,−2)(1, -2) with λ=2\lambda = 2. The vector x=(2,−1)\mathbf{x} = (2, -1) equals (1,1)+(1,−2)(1, 1) + (1, -2), so Ax=5(1,1)+2(1,−2)=(7,1)A\mathbf{x} = 5(1, 1) + 2(1, -2) = (7, 1).

In the eigenvector basis, A multiplies the v1-coordinate by 5 and the v2-coordinate by 2. So x = v1 + v2 maps to Ax = 5v1 + 2v2 = (7, 1).Open in grapher →

The recipe

  1. Find the eigenvalues from the characteristic equation.
  2. For each eigenvalue, find a basis of its eigenspace.
  3. If the bases together contain nn vectors, they are automatically linearly independent; use them as the columns of PP. If there are fewer than nn, AA is not diagonalizable.
  4. Build DD from the eigenvalues, matching the order of the columns of PP.
  5. Check by verifying AP=PDAP = PD (easier than computing P−1P^{-1}).

Worked example: Diagonalizing a 2 × 2 matrix

Diagonalize A=[4123]A = \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix}.

The characteristic polynomial is λ2−7λ+10=(λ−5)(λ−2)\lambda^2 - 7\lambda + 10 = (\lambda - 5)(\lambda - 2).

For λ=5\lambda = 5: A−5I=[−112−2]A - 5I = \begin{bmatrix} -1 & 1 \\ 2 & -2 \end{bmatrix} gives x1=x2x_1 = x_2, so v1=(1,1)\mathbf{v}_1 = (1, 1).

For λ=2\lambda = 2: A−2I=[2121]A - 2I = \begin{bmatrix} 2 & 1 \\ 2 & 1 \end{bmatrix} gives 2x1+x2=02x_1 + x_2 = 0, so v2=(1,−2)\mathbf{v}_2 = (1, -2).

P=[111−2],D=[5002].P = \begin{bmatrix} 1 & 1 \\ 1 & -2 \end{bmatrix}, \qquad D = \begin{bmatrix} 5 & 0 \\ 0 & 2 \end{bmatrix}.

Check: AP=[525−4]=PDAP = \begin{bmatrix} 5 & 2 \\ 5 & -4 \end{bmatrix} = PD.

Worked example: A formula for the powers

Use the diagonalization above to find a formula for AkA^k.

P−1=1−3[−2−1−11]=13[211−1]P^{-1} = \dfrac{1}{-3}\begin{bmatrix} -2 & -1 \\ -1 & 1 \end{bmatrix} = \dfrac{1}{3}\begin{bmatrix} 2 & 1 \\ 1 & -1 \end{bmatrix}, so

Ak=PDkP−1=13[111−2][5k002k][211−1]=13[2⋅5k+2k5k−2k2⋅5k−2k+15k+2k+1].A^k = PD^kP^{-1} = \frac{1}{3}\begin{bmatrix} 1 & 1 \\ 1 & -2 \end{bmatrix}\begin{bmatrix} 5^k & 0 \\ 0 & 2^k \end{bmatrix}\begin{bmatrix} 2 & 1 \\ 1 & -1 \end{bmatrix} = \frac{1}{3}\begin{bmatrix} 2 \cdot 5^k + 2^k & 5^k - 2^k \\ 2 \cdot 5^k - 2^{k+1} & 5^k + 2^{k+1} \end{bmatrix}.

At k=1k = 1 this gives 13[12369]=A\frac{1}{3}\begin{bmatrix} 12 & 3 \\ 6 & 9 \end{bmatrix} = A, as it should.

When it fails, and when it is guaranteed

Worked example: Not enough eigenvectors

Is A=[3103]A = \begin{bmatrix} 3 & 1 \\ 0 & 3 \end{bmatrix} diagonalizable?

The only eigenvalue is 33 (algebraic multiplicity 22). But A−3I=[0100]A - 3I = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} has one free variable, so the eigenspace is the line spanned by (1,0)(1, 0). There are not two independent eigenvectors, so AA is not diagonalizable. This matrix is a shear; no basis makes it act by pure scaling.

The dimension of the eigenspace for λ\lambda is called its geometric multiplicity. It is always at least 11 and at most the algebraic multiplicity. The theorem can be restated in those terms:

  • If AA has nn distinct eigenvalues, it is diagonalizable. (Eigenvectors for distinct eigenvalues are independent, and there are nn of them.)
  • In general, AA is diagonalizable if and only if the geometric multiplicities add up to nn, which happens exactly when each eigenvalue's geometric multiplicity equals its algebraic multiplicity (assuming all eigenvalues are real).

Worked example: Repeated eigenvalue, still diagonalizable

In the first lesson of this unit, A=[4−121221−15]A = \begin{bmatrix} 4 & -1 & 2 \\ 1 & 2 & 2 \\ 1 & -1 & 5 \end{bmatrix} had a two-dimensional eigenspace for λ=3\lambda = 3, with basis (1,1,0)(1, 1, 0) and (−2,0,1)(-2, 0, 1). Since tr⁡A=11\operatorname{tr} A = 11, the third eigenvalue is 11−3−3=511 - 3 - 3 = 5. Solving (A−5I)x=0(A - 5I)\mathbf{x} = \mathbf{0} gives (1,1,1)(1, 1, 1), which you can check: A(1,1,1)=(5,5,5)A(1, 1, 1) = (5, 5, 5). Three independent eigenvectors, so

P=[1−21101011],D=[300030005].P = \begin{bmatrix} 1 & -2 & 1 \\ 1 & 0 & 1 \\ 0 & 1 & 1 \end{bmatrix}, \qquad D = \begin{bmatrix} 3 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 5 \end{bmatrix}.

A repeated eigenvalue does not prevent diagonalization; a deficient eigenspace does.

Common mistake

Diagonalizable and invertible are unrelated. [1000]\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} is diagonalizable but not invertible, while [3103]\begin{bmatrix} 3 & 1 \\ 0 & 3 \end{bmatrix} is invertible but not diagonalizable. Invertibility is about whether 00 is an eigenvalue; diagonalizability is about whether there are enough eigenvectors.

Practice

Practice 1

Let A=PDP−1A = PDP^{-1} with P=[1112]P = \begin{bmatrix} 1 & 1 \\ 1 & 2 \end{bmatrix} and D=[200−1]D = \begin{bmatrix} 2 & 0 \\ 0 & -1 \end{bmatrix}. Find the (1,1)(1, 1) entry of A5A^5.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

A=[1232]A = \begin{bmatrix} 1 & 2 \\ 3 & 2 \end{bmatrix}. An eigenvector for the larger eigenvalue of AA has the form (2,k)(2, k). Find kk.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

For A=[4123]A = \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix}, use the formula Ak=13[2⋅5k+2k5k−2k2⋅5k−2k+15k+2k+1]A^k = \dfrac{1}{3}\begin{bmatrix} 2 \cdot 5^k + 2^k & 5^k - 2^k \\ 2 \cdot 5^k - 2^{k+1} & 5^k + 2^{k+1} \end{bmatrix} to find the (1,2)(1, 2) entry of A3A^3.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Is A=[15−3027004]A = \begin{bmatrix} 1 & 5 & -3 \\ 0 & 2 & 7 \\ 0 & 0 & 4 \end{bmatrix} diagonalizable?

Practice 5

Is A=[50015000−2]A = \begin{bmatrix} 5 & 0 & 0 \\ 1 & 5 & 0 \\ 0 & 0 & -2 \end{bmatrix} diagonalizable?

Practice 6

Find the geometric multiplicity of λ=2\lambda = 2 for A=[200021002]A = \begin{bmatrix} 2 & 0 & 0 \\ 0 & 2 & 1 \\ 0 & 0 & 2 \end{bmatrix}.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

A=[20013−1420]A = \begin{bmatrix} 2 & 0 & 0 \\ 1 & 3 & -1 \\ 4 & 2 & 0 \end{bmatrix} has eigenvalues 2,2,12, 2, 1. An eigenvector for λ=1\lambda = 1 has the form (0,1,k)(0, 1, k). Find kk.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.