The eigenvectors side by side
The matrix A = (4 −1; 2 1) has the eigenvector (1, 1) with eigenvalue 3 and the eigenvector (1, 2) with eigenvalue 2. Stand the two eigenvectors side by side as the columns of a matrix P, and put the eigenvalues on the diagonal of a matrix D, in the same order: 3 first, because (1, 1) is the first column.
So P = (1 1; 1 2), and D = (3 0; 0 2).
A P and P D
In the product A P, each column of P is multiplied by A on its own. The first column of A P is A times (1; 1), which is (3; 3), and the second is A times (1; 2), which is (2; 4). So A P = (3 2; 3 4). Each column has come out multiplied by its own eigenvalue.
In the product P D, multiplying on the right by a diagonal matrix scales each column of P by the number below it on the diagonal: the first column by 3, giving (3, 3), and the second by 2, giving (2, 4). So P D = (3 2; 3 4) as well.
A P = P D is the two eigenvector equations, A(1, 1) = 3(1, 1) and A(1, 2) = 2(1, 2), written side by side as one matrix equation.
A times the first column of P, (1, 1), is the first column of A P, (3, 3): three times the column.
P D scales the first column of P by 3 and the second by 2, and lands on the same matrix as A P.
Undoing P
P has determinant 1 × 2 − 1 × 1 = 1, which is not 0, so P has an inverse. Swap the diagonal entries, change the signs of the other two and divide by the determinant: the inverse of P is the matrix (2 −1; −1 1).
Multiply both sides of A P = P D on the left by . On the right side, , so . Multiply both sides of A P = P D on the right by instead, and on the left side, so . The two forms say the same thing: in the right coordinates, A is the diagonal matrix D.
Check it by multiplying
Work out times A P, that is (2 −1; −1 1) times (3 2; 3 4). Row 1 gives 2 × 3 − 1 × 3 = 3 and 2 × 2 − 1 × 4 = 0. Row 2 gives −1 × 3 + 1 × 3 = 0 and −1 × 2 + 1 × 4 = 2. The result is (3 0; 0 2), which is D exactly, so these two eigenvectors diagonalize A.
The other way round, P D times the inverse of P is (3 2; 3 4) times (2 −1; −1 1). Row 1 gives 6 − 2 = 4 and −3 + 2 = −1; row 2 gives 6 − 4 = 2 and −3 + 4 = 1. That is (4 −1; 2 1), which is A.
What the three factors do
Read from the right, as every product of transformations is read. Take the column (3, 1). The inverse of P sends it to (2 × 3 − 1 × 1, −1 × 3 + 1 × 1) = (5, −2): this says (3, 1) is 5 steps along (1, 1) and −2 steps along (1, 2), and indeed 5(1, 1) − 2(1, 2) = (3, 1).
D then stretches each step count by its own eigenvalue, 5 × 3 = 15 and −2 × 2 = −4. P turns the step counts back into a point: 15(1, 1) − 4(1, 2) = (15 − 4, 15 − 8) = (11, 7). That is exactly where A sends (3, 1), since A times (3; 1) is (12 − 1; 6 + 1) = (11; 7).
The column (3, 1) reached by 5 steps along (1, 1) and then −2 steps along (1, 2). These two step counts, 5 and −2, are what the inverse of P works out.
The order of the columns
The columns of P may be taken in either order, as long as D follows the same order. With the columns (1, 2) then (1, 1), D must be (2 0; 0 3). With P left as (1 1; 1 2) but D written as (2 0; 0 3), P D is (2 3; 2 6), which is not A P, and the product is not A.
When no P exists
P needs two columns that point in different directions, so that it has an inverse. Take (2 1; 0 2). Its characteristic polynomial is , so is its only eigenvalue, repeated. Then A − 2I = (0 1; 0 0), whose rows say only y = 0, so every eigenvector lies along (1, 0).
Any two eigenvectors are multiples of (1, 0), so a P built from them has a second row of zeros and determinant 0, and it has no inverse. This matrix cannot be diagonalized.
A repeated eigenvalue does not always cause this. The matrix 2I = (2 0; 0 2) sends every column to twice itself, so every column is an eigenvector, and it is already diagonal. And when the two eigenvalues are different, their eigenvectors always point in different directions, so a P always exists.
Under (2 1; 0 2), the unit square's bottom edge stays on the x-axis and doubles: (1, 0) goes to (2, 0). The corner (0, 1) goes to (1, 2), off its own line. The x-axis is the only direction kept.
The usual mistakes
Putting the eigenvalues in D in a different order from the eigenvectors in P. Each column of P must stand above its own eigenvalue.
Writing the eigenvectors as the rows of P. A P works on the columns of P, so it is the columns that must be eigenvectors.
Writing . A P = P D rearranges only to , with on the right.
Thinking a zero determinant stops diagonalization. A matrix with determinant 0 has 0 as an eigenvalue, and with a second, different eigenvalue it diagonalizes with a 0 in D. What stops it is having only one eigenvector direction.
A faulty copier
In the application below, a copier distorts every poster by a matrix. Its eigenvalues and eigenvectors write the distortion as a stretch by 3 along one direction and a stretch by 2 along another, and is multiplied out to check that it gives the matrix back.
Worked example: A Faulty Copier That Distorts a Poster, Written as Two Stretches Along Two Fixed Directions
Question A faulty copier distorts every poster it copies. With the center of the poster at the origin, the distortion is modeled by M = 3102. A technician wants to describe it as two simple stretches along two fixed directions. (a) Find the eigenvalues of M and an eigenvector for each. (b) Write M = PDP−1, where D is a diagonal matrix, giving P, D and P−1, and check the product.
1.det(M − λ I) = (3 − λ)(2 − λ) − 1 × 0 = (3 − λ)(2 − λ), so the eigenvalues are λ = 3 and λ = 2.
The copier turns the square poster into the green parallelogram. det(M − λ I) = (3 − λ)(2 − λ), so λ = 3 or 2. 2.For λ = 3: (M − 3I)v = 010−1xy = 0 gives y = 0, so v = 10: horizontal lengths are stretched by a factor of 3.
For λ = 3, y = 0: horizontal lengths are stretched by a factor of 3, along 10. 3.(a) For λ = 2: (M − 2I)v = 1100xy = 0 gives x + y = 0, so v = 1−1. Check: M1−1 = 3 − 1−2 = 2−2 = 21−1.
(a) For λ = 2, x + y = 0: lengths along 1−1 are stretched by a factor of 2. 4.Put the eigenvectors in the columns: P = 110−1 and D = 3002. det P = 1 × (−1) − 1 × 0 = −1, so P−1 = 1−1−1−101 = 110−1.
The eigenvectors go in the columns of P = 110−1 and the eigenvalues down D = 3002; here P−1 = P. 5.(b) PD = 320−2, and PDP−1 = 320−2110−1 = 33 − 200 + 2 = 3102 = M. The copier stretches the poster by a factor of 3 along the horizontal and by a factor of 2 along the slanting direction 1−1.
(b) PDP−1 = 3102 = M: a stretch by 3 along the horizontal and by 2 along the slanting direction.
Answer: (a) λ = 3 with eigenvector 10, and λ = 2 with eigenvector 1−1; (b) P = 110−1, D = 3002 and P−1 = 110−1, and PDP−1 = 3102 = M
Common mistakes
- Putting the eigenvalues down D in a different order from the eigenvectors in P, such as D = 2003 with the same P. Then PDP−1 = 2−103, which is not M: each column of P must stand above its own eigenvalue.
- Writing the eigenvectors in the rows of P instead of the columns. MP = PD multiplies each column of P by M, so it is each column that must be an eigenvector.
More eigenvalues and eigenvectors problems, worked step by step →