Linear Algebra, Interactive EditionXYZ Homework Edition

⇩ Download ▾

5.4 Diagonalization and Similarity

The chapter so far has been a census: real eigenlines that a matrix stretches, and complex pairs that make it spiral (setting aside the defective matrices, like a shear, that have too few eigenlines). What the census does not yet supply is a method. That arrives by combining eigenvectors with the idea of Chapter 2 — that a basis is a coordinate system — because in the right coordinate system the matrix from section 5.1 stops being a grid of nine numbers and becomes a list of three.

That matrix was

A = ( 2 1 0 1 2 0 0 0 − 1 ) A = \begin{pmatrix} 2 & 1 & 0 \\ 1 & 2 & 0 \\ 0 & 0 & -1 \end{pmatrix}

with characteristic polynomial −(λ−3)(λ−1)(λ+1)-(\lambda - 3)(\lambda - 1)(\lambda + 1), so its eigenvalues are 33, 11 and −1-1. The eigenvectors are (1,1,0)(1, 1, 0), (1,−1,0)(1, -1, 0) and (0,0,1)(0, 0, 1) — check the first: A(1,1,0)=(2+1,1+2,0)=(3,3,0)=3(1,1,0)A(1, 1, 0) = (2 + 1, 1 + 2, 0) = (3, 3, 0) = 3(1, 1, 0), as an eigenvector must satisfy.

Three eigenvectors, and they are independent, so they are a basis of ℝ3\mathbb{R}^3. Coordinates in that basis are what make AA simple: the matrix does nothing to the frame itself, it just scales along each axis of it.

Looking down at the horizontal plane, with the coordinate axes hidden. A gray circle of radius one sits at the origin, and two lines cross there at right angles running diagonally: a red one along (1, 1, 0) and a blue one along (1, -1, 0). A third line, green, rises vertically out of the plane. An amber curve lies on top of the gray circle at first; as a slider is dragged the amber curve stretches into a long ellipse whose long axis lies exactly along the red line and whose short axis stays exactly the width of the original circle along the blue line. The stretching happens only in the red direction, never turning the ellipse off those two axes.Explore in 3D (opens in a new tab)

Looking down at the horizontal plane, with the coordinate axes hidden. A gray circle of radius one sits at the origin, and two lines cross there at right angles running diagonally: a red one along (1, 1, 0) and a blue one along (1, -1, 0). A third line, green, rises vertically out of the plane. An amber curve lies on top of the gray circle at first; as a slider is dragged the amber curve stretches into a long ellipse whose long axis lies exactly along the red line and whose short axis stays exactly the width of the original circle along the blue line. The stretching happens only in the red direction, never turning the ellipse off those two axes.

Looking down at the plane z=0z = 0, with the coordinate axes hidden. The red and blue lines are the eigenlines for λ=3\lambda = 3 and λ=1\lambda = 1; the green line rising out of the plane is the third, for λ=−1\lambda = -1. The gray circle is the unit circle, and the amber curve is what becomes of it when each eigenline is stretched by its own eigenvalue raised to the power kk. At whole-number kk that is exactly AA applied that many times; in between, the slider interpolates — which means something here only because the two eigenvalues acting in this plane, 33 and 11, are both positive. The λ=−1\lambda = -1 eigenline is drawn for completeness but nothing moves along it, which is just as well: no real matrix is a half-power of a flip.

Explore the figure

  1. At k=0k = 0 the amber curve sits exactly on the gray circle — no transformation has happened yet.
  2. Drag kk up slowly. The circle stretches into an ellipse, and the stretching happens along the red line only. That is the λ=3\lambda = 3 direction, and 3k3^k is how far it has been pulled.
  3. Look at the blue direction as you drag. The ellipse's width across it never changes. Its eigenvalue is 11, and 1k=11^k = 1 for every kk: that direction is not merely un-turned, it is untouched.
  4. Notice what the ellipse never does. Its long axis stays welded to the red line and never swings around, at any kk. In the eigenbasis, AA has no ability to rotate anything — it can only stretch along the axes it is already given.

Writing the frame down

Put the eigenvectors in the columns of a matrix:

P = ( 1 1 0 1 − 1 0 0 0 1 ) , D = ( 3 0 0 0 1 0 0 0 − 1 ) P = \begin{pmatrix} 1 & 1 & 0 \\ 1 & -1 & 0 \\ 0 & 0 & 1 \end{pmatrix}, \qquad D = \begin{pmatrix} 3 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \end{pmatrix}

PP is exactly the coordinate matrix of section 2.7: hand it a list of eigenbasis coordinates and it returns the point in standard coordinates. Then

A = P D P − 1 A = PDP^{-1}

and each factor has a job you can name. Read right to left, following what happens to a vector: P−1P^{-1} converts it into eigenbasis coordinates, DD scales each coordinate by its eigenvalue, and PP converts back to the standard grid. Doing all three is doing AA — because in the middle, where the coordinates are the right ones, AA is the diagonal matrix.

[1212012−120001]\begin{bmatrix}\frac{1}{2} & \frac{1}{2} & 0 \\ \frac{1}{2} & -\frac{1}{2} & 0 \\ 0 & 0 & 1\end{bmatrix}
Translating into the eigenbasis ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text Translating into the eigenbasis, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

The inverse of the eigenvector matrix, which is the translator from standard coordinates into eigenbasis coordinates. Its first row reads off the amount of (1,1,0)(1, 1, 0) in a vector, its second the amount of (1,−1,0)(1, -1, 0), and its third the amount of (0,0,1)(0, 0, 1).

−2-2
The eigenvectors really are a basis ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text The eigenvectors really are a basis, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

The determinant of PP is −2-2, and the only thing that matters is that it is not zero. By the Invertible Matrix Theorem the columns are independent, so P−1P^{-1} exists and the factorization is legitimate. A matrix whose eigenvectors failed to be independent would have a singular PP and could not be diagonalized at all — which is exactly what goes wrong for the matrices this book has been careful to avoid.

Two matrices AA and BB are called similar when B=P−1APB = P^{-1}AP for some invertible PP. The definition looks like a technicality and is not: similar matrices are the same transformation written in two different bases. Everything basis-independent survives the translation — determinant, rank, eigenvalues, the characteristic polynomial — while the entries themselves, which are only ever coordinates, do not.

Powers, for free

Here is the payoff that makes diagonalization more than a change of viewpoint. Compute A2A^2 from the factorization:

A 2 = P D P − 1 · P D P − 1 = P D ( P − 1 P ) D P − 1 = P D 2 P − 1 A^2 = PDP^{-1} \cdot PDP^{-1} = PD(P^{-1}P)DP^{-1} = PD^2P^{-1}

The inner P−1PP^{-1}P collapses to the identity, and the same cancellation happens however many factors you stack:

A k = P D k P − 1 A^k = PD^kP^{-1}

Raising a diagonal matrix to a power is just raising each diagonal entry to that power, so Dk=diag(3k,1k,(−1)k)D^k = \operatorname{diag}(3^k, 1^k, (-1)^k) and no matrix multiplication is needed at all. That formula is what the figure is drawing: a point at eigen-coordinates (c1,c2,c3)(c_1, c_2, c_3) goes to (3kc1,c2,(−1)kc3)(3^k c_1, \; c_2, \; (-1)^k c_3), so the circle in the z=0z = 0 plane becomes an ellipse with semi-axes 3k3^k and 11 along the two eigenlines.

It also tells you the long run without any computation. As kk grows, 3k3^k swamps everything else, so almost every vector's image swings toward the λ=3\lambda = 3 eigenline and grows by roughly a factor of 33 per step. What licenses that reading is the strict gap |3|>|1|=|−1||3| > |1| = |-1|: when one eigenvalue is strictly larger in absolute value than every other, it decides the long-term behavior — a fact the next section turns into a working prediction. The strictness is not decoration. Drop the 33 and the remaining eigenvalues 11 and −1-1 tie in absolute value, and the long run never settles down to one direction at all.

An original work of XYZ Homework, built around interactive XYZ 3D figures. Chapters 1–6 follow the topic sequence of Interactive Linear Algebra (Margalit & Rabinoff, Georgia Tech, GNU FDL). Chapter 0's scope (its topics, their order, and the idea each figure shows) follows the Vectors chapter of Ximera's Linear Algebra: An Interactive Introduction. The prose, worked examples and figures were written for this book, which is not affiliated with or endorsed by the authors of either work. License: CC-BY-NC-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or any other accessibility standard. Every page is built against an automated accessibility gate, and our target for the published editions is WCAG 2.2 Level AA. If something is unusable, please tell us.