Guides / Linear algebra
Eigenvalues and eigenvectors: det(A − λI) = 0, then solve (A − λI)v = 0
Short answer
Subtract λ from every diagonal entry and set the determinant to 0: the roots of det(A − λI) = 0 are the eigenvalues. Check them: they add up to the trace (the sum of the diagonal) and multiply to det A. For each eigenvalue, solve (A − λI)v = 0; any nonzero solution is an eigenvector. For a 2×2, the two rows of A − λI are multiples of each other, so one equation is left, and a row (a, b) is solved by v = (b, −a). A repeated eigenvalue can have just one eigenvector, so check the rank before assuming two.
Why it works
Av = λv is the same as Av − λv = 0, and writing λv as λIv lets you factor out the v: (A − λI)v = 0. The zero vector always solves that, and it doesn't count. A nonzero solution exists exactly when A − λI squashes some direction flat, which is when it isn't invertible, which is when its determinant is 0. So the eigenvalues are the values of λ that make det(A − λI) zero, and the eigenvectors are the directions that get squashed.
The trace and determinant checks come from the polynomial itself. For a 2×2, det(A − λI) = λ2 − (trace)λ + det A, and a quadratic (λ − λ1)(λ − λ2) expands to λ2 − (λ1 + λ2)λ + λ1λ2. Matching coefficients gives both checks, and they hold for every size of matrix.
Example 1: a 2×2 matrix, start to finish
Find the eigenvalues and eigenvectors of A = 5222.
- det 5 − λ222 − λ = (5 − λ)(2 − λ) − 4Subtract λ from the diagonal only, then ad − bc.
- λ2 − 7λ + 6 = (λ − 6)(λ − 1)Expand: 10 − 7λ + λ² − 4. The roots are λ = 6 and λ = 1.
- 6 + 1 = 7 = 5 + 2, 6 · 1 = 6 = 10 − 4The trace and determinant checks pass.
- λ = 6: A − 6I = −122−4(A − 6I)v = 0 says −x + 2y = 0; the second row is −2 times the first, so it adds nothing. Choose y = 1: v = (2, 1).
- λ = 1: A − I = 4221Again one equation, 2x + y = 0. Choose x = 1: v = (1, −2).
- λ = 6, v = (2, 1); λ = 1, v = (1, −2)Check: A(2, 1) = (12, 6) = 6(2, 1) and A(1, −2) = (1, −2). A is symmetric, so the two eigenvectors are perpendicular: 2 − 2 = 0.
Example 2: a triangular matrix
Find the eigenvalues and eigenvectors of A = 4−102.
- det(A − λI) = (4 − λ)(2 − λ)A − λI is still triangular, and the determinant of a triangular matrix is the product of its diagonal. The eigenvalues are the diagonal entries, 4 and 2.
- λ = 4: A − 4I = 0−10−2Both rows say y = 0, and x is anything: v = (1, 0).
- λ = 2: A − 2I = 2−100One equation, 2x − y = 0, so v = (1, 2). Check: A(1, 2) = (4 − 2, 4) = (2, 4) = 2(1, 2).
Example 3: a repeated eigenvalue with one eigenvector
Find the eigenvalues and eigenvectors of A = 31−11.
- λ2 − 4λ + 4 = (λ − 2)2det(A − λI) = (3 − λ)(1 − λ) − (1)(−1): subtracting bc = −1 adds 1. One eigenvalue, λ = 2, a double root.
- A − 2I = 11−1−1, rank 1The rows are multiples of each other, so the null space is a single line.
- v = (1, −1) and its multiplesThe one equation is x + y = 0. A double root, but only one eigenvector direction. This matrix can't be diagonalized: there aren't two independent eigenvectors to build P from.
Example 4: powers of a matrix by diagonalizing
Compute A4 for A = 1221.
- λ2 − 2λ − 3 = (λ − 3)(λ + 1)Trace 2, determinant 1 − 4 = −3. The eigenvalues are 3 and −1.
- λ = 3: v = (1, 1); λ = −1: v = (1, −1)A − 3I has rows (−2, 2); A + I has rows (2, 2).
- A = PDP−1, P = 111−1, D = 300−1The eigenvectors are the columns of P, and D lists their eigenvalues in the same order.
- A4 = PD4P−1 = 1281 + 181 − 181 − 181 + 1The P−1P pairs in the middle cancel, so only D is raised to the power: 3⁴ = 81 and (−1)⁴ = 1. Here P−1 = ½P.
- A4 = 41404041Check by squaring twice: A² = [5 4; 4 5], and A⁴ = (A²)² has 25 + 16 = 41 on the diagonal and 20 + 20 = 40 off it.
Common mistakes, and the exact line they happen on
1. Writing A + λI
The matrix from Example 1.
- Av = λvRight so far.
- det(A + λI) = 0 ⇒ λ = −6, −1This is the mistake. (5 + λ)(2 + λ) − 4 = (λ + 6)(λ + 1). Moving λv to the left side gives Av − λv, so the matrix is A − λI. The plus sign negates every eigenvalue. The trace check catches it at once: the eigenvalues must add to 5 + 2 = 7, and these add to −7.
2. Reading the eigenvector off a row
The eigenvalue λ = 6 from Example 1.
- A − 6I = −122−4Right so far.
- v = (−1, 2)This is the mistake. The row is an equation the eigenvector must satisfy, −x + 2y = 0, not the eigenvector itself; the solution (2, 1) is perpendicular to the row. Here A(−1, 2) = (−1, 2), so (−1, 2) is the eigenvector for λ = 1, not 6.
3. Counting a double root as two eigenvectors
The matrix from Example 3.
- det(A − λI) = (λ − 2)2Right so far.
- A = P 2002 P−1This is the mistake. λ = 2 twice was taken to mean two eigenvectors. But P[2 0; 0 2]P−1 is 2I for any P, and A isn't 2I. A double root only says λ = 2 appears twice in the polynomial; the number of eigenvectors is set by the null space of A − 2I, which has rank 1 and so leaves one direction.
Practice
Find the eigenvalues and eigenvectors of 300−2.
Show answer
A diagonal matrix: λ = 3 with (1, 0), and λ = −2 with (0, 1).
Find the eigenvalues and eigenvectors of 2332.
Show answer
(2 − λ)2 = 9, so λ = 5 with (1, 1) and λ = −1 with (1, −1).
Find the eigenvalues and eigenvectors of 1423.
Show answer
λ2 − 4λ − 5 = (λ − 5)(λ + 1). λ = 5: −4x + 4y = 0, so (1, 1). λ = −1: 2x + 4y = 0, so (2, −1).
A 2×2 matrix has eigenvalues 2 and 7. What are its trace and determinant?
Show answer
Trace 2 + 7 = 9, determinant 2 · 7 = 14.
If Av = 3v and A is invertible, what are A2v and A−1v?
Show answer
A2v = A(3v) = 9v. Multiplying Av = 3v by A−1 gives v = 3A−1v, so A−1v = 13v. Same eigenvector, eigenvalues 9 and 1/3.