Lay's Linear Algebra

Chapter 5: Eigenvalues and Eigenvectors

5.3 Diagonalization

Study guide for Linear Algebra and Its Applications (David C. Lay, 6th edition)

Independent study guide. Not affiliated with or endorsed by Pearson.

Big idea

Diagonal matrices are easy. They scale each coordinate on its own, their powers are the powers of the diagonal entries, and their determinant is a product. Almost nothing else about a matrix is that simple.

Diagonalization asks whether a given matrix is a diagonal matrix in disguise. The disguise is a change of coordinates: if $A$ has enough eigenvectors to form a basis, then in the coordinates those eigenvectors set up, $A$ does nothing but scale. Written out, $A = PDP^{-1}$, with the eigenvectors as the columns of $P$ and the eigenvalues down the diagonal of $D$, matched in order.

The payoff is powers. $A^k = PD^kP^{-1}$, because the inner $P^{-1}P$ pairs cancel, and raising a diagonal matrix to the hundredth power costs $n$ multiplications. Everything that follows in this chapter, from population models to systems of differential equations, is that identity used on a different problem.

Decoder

$A$ is diagonalizable when it is similar to a diagonal matrix, which happens exactly when $A$ has $n$ linearly independent eigenvectors.

Read “similar to a diagonal matrix” as “equal to $PDP^{-1}$ for some invertible $P$ and some diagonal $D$”. The second half of the sentence says how to find out: collect a basis for each eigenspace, pool them, and count. If you end up with $n$ vectors, $A$ is diagonalizable and those vectors are the columns of $P$. If you end up short, it is not, and no cleverness will repair it.

Definitions and results

Diagonalizable. A square matrix $A$ is diagonalizable when $A = PDP^{-1}$ for some invertible $P$ and diagonal $D$.

The factorization theorem. An $n \times n$ matrix is diagonalizable exactly when it has $n$ linearly independent eigenvectors. In that case the columns of $P$ are those eigenvectors and the diagonal entries of $D$ are the matching eigenvalues, in the same order. Change the order of the columns of $P$ and you must change the order of the entries of $D$ to match.

Why it works. The equation $A = PDP^{-1}$ is the same as $AP = PD$. Column by column, the left side is $A$ applied to each column of $P$, and the right side is each column of $P$ scaled by the matching diagonal entry. So $AP = PD$ says precisely that every column of $P$ is an eigenvector. Requiring $P$ to be invertible is requiring those columns to be independent.

Checking without inverting. To verify a claimed factorization, check $AP = PD$. That is two matrix products and no inverse, and it catches ordering mistakes immediately.

Distinct eigenvalues suffice. If an $n \times n$ matrix has $n$ different eigenvalues, it is diagonalizable. Eigenvectors for distinct eigenvalues are independent, so one from each eigenvalue already gives a basis. The converse fails: a diagonalizable matrix can have repeated eigenvalues, and the identity matrix is the extreme case.

The general test with repeats. Suppose the characteristic polynomial factors completely over the reals. Then $A$ is diagonalizable exactly when every eigenvalue has geometric multiplicity equal to its algebraic multiplicity. Equivalently, the eigenspace dimensions add up to $n$. Bases drawn from different eigenspaces never overlap and always pool into an independent set, so counting dimensions is enough.

Not diagonalizable is not defective arithmetic. A matrix can fail the test and still be perfectly well behaved. A shear matrix has one eigenvalue and one eigenvector line, and that is a true fact about the geometry, not a computational failure. Two escape routes appear later: allowing complex eigenvalues rescues rotations, and the singular value decomposition handles every matrix.

Powers. If $A = PDP^{-1}$, then

$$ A^k = PD^kP^{-1} $$

where $D^k$ raises each diagonal entry to the $k$th power. The same identity works for negative $k$ when every eigenvalue is nonzero, and $A^{-1} = PD^{-1}P^{-1}$.

Reading a power qualitatively. Written out, $A^k$ is a sum of terms, one per eigenvalue, each carrying a factor $\lambda^k$. Eigenvalues with $|\lambda| < 1$ contribute terms that shrink to nothing, eigenvalues with $|\lambda| > 1$ contribute terms that blow up, and an eigenvalue of exactly $1$ contributes a term that never changes. That reading is the whole content of the applications later in the chapter.

Worked examples

Diagonalizing a two by two

Let

$$ A = \begin{bmatrix} 4 & -2 \\ 1 & 1 \end{bmatrix} $$

The trace is $5$ and the determinant is $4 + 2 = 6$, so the characteristic polynomial is $\lambda^2 - 5\lambda + 6 = (\lambda - 2)(\lambda - 3)$. Two distinct eigenvalues in a $2 \times 2$ matrix, so it is diagonalizable before any eigenvector work.

The eigenspaces were found earlier in the chapter: $(1,1)$ for $\lambda = 2$ and $(2,1)$ for $\lambda = 3$. Set

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

Check with $AP = PD$:

$$ AP = \begin{bmatrix} 4 - 2 & 8 - 2 \\ 1 + 1 & 2 + 1 \end{bmatrix} = \begin{bmatrix} 2 & 6 \\ 2 & 3 \end{bmatrix}, \qquad PD = \begin{bmatrix} 2 & 6 \\ 2 & 3 \end{bmatrix} $$

They agree. Since $\det P = 1 - 2 = -1$, the inverse is

$$ P^{-1} = \begin{bmatrix} -1 & 2 \\ 1 & -1 \end{bmatrix} $$

A fifth power without multiplying five times

Keep $A$, $P$, $D$ from above. Then $D^5 = \operatorname{diag}(32, 243)$ and

$$ A^5 = P D^5 P^{-1} = \begin{bmatrix} 32 & 486 \\ 32 & 243 \end{bmatrix} \begin{bmatrix} -1 & 2 \\ 1 & -1 \end{bmatrix} = \begin{bmatrix} 454 & -422 \\ 211 & -179 \end{bmatrix} $$

Check the trace and determinant against the eigenvalues: $A^5$ should have eigenvalues $32$ and $243$, so its trace should be $275$ and its determinant $7776$. Indeed $454 - 179 = 275$, and $454(-179) - (-422)(211) = -81266 + 89042 = 7776$. Both match, so the arithmetic is right.

Repeated eigenvalue, still diagonalizable

Let

$$ B = \begin{bmatrix} 1 & 2 & 2 \\ 2 & 1 & 2 \\ 2 & 2 & 1 \end{bmatrix} $$

Its characteristic polynomial factors as $-(\lambda - 5)(\lambda + 1)^2$, so the eigenvalues are $5$ once and $-1$ twice. The eigenspace for $5$ is spanned by $(1,1,1)$, since $B(1,1,1) = (5,5,5)$. The eigenspace for $-1$ is the null space of $B + I$, a matrix with every entry $2$, so it is the plane $x_1 + x_2 + x_3 = 0$, spanned by $(1,-1,0)$ and $(1,0,-1)$.

Dimensions $1$ and $2$ add to $3$, so $B$ is diagonalizable. Take

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

Check $AP = PD$ one column at a time. $B(1,1,1) = (5,5,5)$, and the first column of $PD$ is $5(1,1,1)$. $B(1,-1,0) = (1-2, \, 2-1, \, 2-2) = (-1,1,0)$, and the second column of $PD$ is $-1(1,-1,0)$. $B(1,0,-1) = (1-2, \, 2-2, \, 2-1) = (-1,0,1)$, matching the third column of $PD$. Also $\det P = 3$, so $P$ is invertible and the factorization stands.

Compare this with the earlier $2 \times 2$ shear, whose repeated eigenvalue came with only one eigenvector line. A repeated eigenvalue is a warning, not a verdict: you have to compute the eigenspace dimension to know.

Practice

Find the eigenvalues, build a basis for each eigenspace, and assemble $P$ and $D$, or state why no such pair exists.

Practice

Generated problems for this section, graded instantly.

Then use the factorization for what it is best at: large powers, and the long-run shape of $A^k$.

Practice

Generated problems for this section, graded instantly.

Videos

The first video shows why an eigenvector basis makes a transformation look diagonal. The second carries the same idea straight into powers; watch how the middle terms collapse when you multiply $PDP^{-1}$ by itself.

Eigenvectors and eigenvalues | Chapter 14, Essence of linear algebra

3Blue1Brown

22. Diagonalization and Powers of A

MIT OpenCourseWare

Quiz

Five items on building a factorization, deciding when one exists, and computing powers with it.

Quiz

5 problems with a score at the end.