Chapter 8: Eigenvalues and eigenvectors
Previous: LA 07 Determinants | LA 00 Course Map | Next: LA 09 Symmetric and Positive Definite Matrices
Most vectors get turned when a matrix acts on them. A few special directions do not turn: they only get stretched. Those are the eigenvectors, and the stretch factors are the eigenvalues. If you describe vectors using eigenvector coordinates, a complicated matrix becomes simple scaling, and repeated application (, long-run behaviour, stability) becomes easy to understand.
- Explain what eigenvectors and eigenvalues are, with pictures.
- Find them by hand for (and simple ) matrices.
- Use the trace and determinant to check your answers.
- Diagonalize a matrix, , and use it to compute powers.
- Predict whether a repeated process grows, decays or oscillates.
You need determinants (LA 07 Determinants), null spaces (LA 05 Subspaces Basis and Rank), and solving quadratic equations: gives .
8.1 The idea
A picture
Apply to a few vectors:
| Did it turn? | ||
|---|---|---|
| no, just doubled | ||
| no, just tripled | ||
| yes: it now points more steeply |
and are special: stretches them without changing their direction. Every other direction gets turned.
The definition
A nonzero vector is an eigenvector of a square matrix if
for some number . That number is the corresponding eigenvalue.
“Eigen” is German for “own” or “characteristic”: these are the matrix’s own directions.
What different eigenvalues mean
| What does to | |
|---|---|
| stretches it | |
| shrinks it | |
| leaves it exactly alone | |
| destroys it: is in the null space | |
| flips it to point the opposite way, and scales by |
Two details
- The zero vector is excluded. is true for every , so allowing it would make the idea meaningless. (But is allowed.)
- Only the direction matters. If is an eigenvector, so is , , or any nonzero multiple, with the same : . When we say “the eigenvector”, we mean “the eigen-direction”, and we pick a convenient representative.
Eigenvectors you can see without computing
- Diagonal matrix: the axes are eigenvectors, and the diagonal entries are the eigenvalues.
- Projection onto a line: vectors on the line are kept (); vectors perpendicular to it are destroyed ().
- Reflection across a line: vectors on the line are kept (); perpendicular vectors are flipped ().
- Rotation by : every vector is turned, so there are no real eigenvectors (section 8.5).
- Is an eigenvector of ? If so, with what eigenvalue?
- What are the eigenvalues of ?
- Reflection across the line : name an eigenvector for and one for .
Answers. 1. . Yes, . 2. and . 3. lies on the line: . is perpendicular: .
8.2 Finding eigenvalues: the characteristic equation
Turning the definition into an equation
Start from . Write as so both sides involve matrices, and move everything to one side:
We need a nonzero satisfying this. That means must have a nonzero null space, which means it must be singular. From chapter 7, singular means determinant zero:
The eigenvalues are exactly its solutions.
For an matrix, is a polynomial of degree in , the characteristic polynomial. So an matrix has eigenvalues, counted with repetition and allowing complex numbers.
The procedure
- Write (subtract from each diagonal entry).
- Compute its determinant: a polynomial in .
- Set it to zero and solve: these are the eigenvalues.
- For each eigenvalue, solve to find its eigenvectors (a null space calculation, chapter 5).
Worked example 8.1
Step 1.
Step 2.
Step 3. Factor: . Eigenvalues , .
Step 4a: eigenvector for .
The rows are multiples of each other (as they must be, since this matrix is singular). One equation remains: , so . Choose : eigenvector .
Step 4b: eigenvector for .
Equation: , so . Eigenvector .
Check. ✓. ✓.
When you compute for a genuine eigenvalue, its rows must be dependent. If elimination gives you a pivot in every column, your eigenvalue is wrong.
A shortcut
For any matrix,
where the trace is the sum of the diagonal entries. In example 8.1: trace 7, determinant 10, giving directly.
8.3 Trace and determinant: free checks
For any square matrix:
Example 8.1: ✓ and ✓.
These catch most arithmetic mistakes in seconds. They also give quick facts:
- A matrix is singular exactly when 0 is an eigenvalue (the product of eigenvalues is ).
- For a matrix, knowing the trace and determinant is enough to find both eigenvalues.
- A matrix has trace 6 and determinant 8. Find its eigenvalues.
- A matrix has eigenvalues , , . What are its trace and determinant? Is it invertible?
Answers. 1. : and . 2. Trace , determinant . Invertible, since no eigenvalue is 0.
8.4 Diagonalization
The idea
Suppose an matrix has independent eigenvectors with eigenvalues . Put the eigenvectors as columns of , and the eigenvalues on the diagonal of (capital lambda):
The equations , all at once, say . Since the columns are independent, is invertible, so
What it means: three steps
Read from right to left:
- : rewrite in eigenvector coordinates (how much of each it contains).
- : scale each coordinate by its own eigenvalue. No mixing between coordinates.
- : convert back to ordinary coordinates.
So in the right coordinate system, every diagonalizable matrix is just independent scaling along a set of axes. The difficulty of a matrix is only that its natural axes are not the standard ones. (Chapter 11 develops this “change of viewpoint” idea.)
Worked example 8.2
For :
You can check that multiplies out to .
The payoff: powers
and in general
Powers of a diagonal matrix are trivial: raise each diagonal entry to the power. Computing directly needs 99 matrix products; this way needs a handful of operations.
Worked example 8.3. Compute for with from example 8.1.
Step 1: write in eigenvector coordinates. Solve : and . Subtract: , so , . So .
Step 2: apply . Each eigenvector is simply scaled:
For : .
Step 3: long-run behaviour. As grows, dwarfs . So points more and more along , and grows by a factor of about 5 each step.
When is a matrix diagonalizable?
- If the eigenvalues are all different, the eigenvectors are automatically independent, and is diagonalizable. (Most matrices you meet.)
- If some eigenvalue is repeated, it may or may not work (section 8.5).
- Symmetric matrices are always diagonalizable, with perpendicular eigenvectors (chapter 9).
8.5 When things are less tidy
Complex eigenvalues: rotation
No real solutions, because a quarter-turn changes the direction of every real vector. The complex eigenvalues are not meaningless: complex eigenvalues signal rotation or oscillation. For a general rotation the eigenvalues are : their size says “no growth”, and their angle says “turn by each step”.
For real matrices, complex eigenvalues always come in conjugate pairs .
Repeated eigenvalues
The harmless case. has eigenvalue 1 twice, and every vector is an eigenvector. Plenty of independent eigenvectors; diagonalizable (it already is diagonal).
The defective case. The shear
has , so twice. But has a one-dimensional null space: only multiples of . There is only one eigen-direction, not two. is defective and cannot be diagonalized.
Geometrically: the shear leaves the horizontal direction alone, but tilts every other direction. There is no second direction that it merely stretches.
- Find the eigenvalues of . What does the matrix do?
- Is diagonalizable? Is ?
Answers. 1. , . It rotates by and doubles lengths. 2. The first yes (already diagonal). The second no: only is an eigenvector.
8.6 Why this matters: dynamics and stability
Discrete time
Many systems evolve by repeated multiplication:
Population models, Markov chains, iterative algorithms, and robot controllers sampled at fixed time steps all look like this. Write the starting state in eigenvector coordinates, . Then, as in example 8.3,
Each eigen-direction evolves on its own, by its own factor. So:
| Eigenvalues | Long-run behaviour |
|---|---|
| all | everything decays to : stable |
| some | that component explodes: unstable |
| largest | settles to a steady pattern (Markov chains) |
| negative or complex | oscillation |
The eigenvalue with the largest , the dominant eigenvalue, wins in the end, and lines up with its eigenvector.
Worked example 8.4: a two-stage population
Each year, juveniles and adults change as follows: each adult produces 2 juveniles; half the juveniles survive to become adults; adults survive with probability .
Trace , determinant , so and : and .
Since , the population grows about 28% per year in the long run. The negative eigenvalue produces a dying-out oscillation in the early years.
Continuous time
For a system described by (rate of change proportional to state), each eigen-direction evolves as . Now the test is the real part:
- every eigenvalue with negative real part: decays, stable;
- any with positive real part: grows, unstable;
- imaginary parts produce oscillation.
This is how control engineers check that a feedback controller keeps a robot stable (03 Dynamics and Feedback).
Summary
| Idea | Formula or fact |
|---|---|
| definition | , |
| find | |
| find | null space of |
| checks | , |
| diagonalize | |
| powers | |
| stability (discrete) | all |
| stability (continuous) | all |
Three facts to remember:
- Eigenvectors are the directions a matrix only stretches.
- In eigenvector coordinates, a matrix is just scaling, so powers are easy.
- The largest controls long-run growth or decay.
Exercises
Part A: warm-up
A1. Find the eigenvalues and eigenvectors of . Check with trace and determinant.
A2. Find the eigenvalues of without computing a determinant.
A3. If , what is ? What is ? What is (assuming invertible)?
A4. A matrix has trace 1 and determinant . Find its eigenvalues.
A1. gives . For 3: . For 1: . Trace ✓, det ✓.
A2. Triangular: the diagonal entries and .
A3. ; ; . The eigenvector is the same; the eigenvalue is transformed.
A4. : and .
Part B: core
B1. Diagonalize and use it to compute .
B2. Find the eigenvalues and eigenvectors of .
B3. Show that is not diagonalizable.
B4. For , find the eigenvalues. Does go to zero, grow, or settle?
B5. Fibonacci numbers satisfy . Find the eigenvalues of the matrix, and explain why approaches the larger one.
B6. A controller produces closed-loop matrix (discrete time). For , are both eigenvalues inside the unit circle? (Hint: compute them; they may be complex, and .)
B1. Eigenvalues and , eigenvectors and . . So .
B2. Lower triangular: . For : gives , , , so . For : , then , so . For : and , so .
B3. twice. has null space spanned by only. One eigenvector, two needed.
B4. Trace , det . : : and . Both below 1: .
B5. : . The component dominates, so consecutive terms grow by a factor approaching , the golden ratio.
B6. Trace , det . . . Stable, with slowly decaying oscillation.
Part C: explain and prove
C1. Prove that if , then for every positive integer .
C2. Prove that eigenvectors for two different eigenvalues are independent. (Hint: suppose ; apply ; subtract times the original equation.)
C3. Prove that and have the same eigenvalues. (Hint: determinant of a transpose.)
C4. Explain why a matrix with an eigenvalue of 0 cannot be invertible, in two ways: using the determinant, and using the definition of an eigenvector.
C5. Show that similar matrices and have the same eigenvalues. How are their eigenvectors related?
C1. By induction: .
C2. Apply : . Subtract : . Since and , ; then gives .
C3. . Same characteristic polynomial.
C4. Determinant: . Definition: for some , so sends two different vectors ( and ) to the same output and cannot be undone.
C5. . If , then : eigenvectors of are times those of .
Part D: practise with code
D1. vals, vecs = np.linalg.eig(A). Run it on example 8.1. NumPy normalizes eigenvectors to length 1: check that its vectors are multiples of and .
D2. Implement power iteration: start from a random , repeat x = A @ x; x = x / np.linalg.norm(x) 50 times. Compare with the dominant eigenvector, and estimate by x @ A @ x. Why does it work?
D3. Simulate the population of example 8.4 for 30 years from . Plot total population on a log scale. What is the slope, and how does it relate to ?
D4. Plot the trajectories for starting from . Compute its eigenvalues and explain the spiral.
D2. Repeated multiplication amplifies the dominant eigen-component most (section 8.6). Normalizing just stops the numbers overflowing.
D3. The log of the population grows by about per year after the first few years.
D4. , . Each step rotates by and shrinks by about 5%: an inward spiral.
Where this is used
- Stability of controllers (03 Dynamics and Feedback).
- Markov chains: the long-run distribution is an eigenvector with eigenvalue 1 (PS 12 Markov Chains and Information).
- Optimization: the speed of gradient descent depends on the eigenvalues of the Hessian (LA 12 Matrix Calculus and Numerical Practice).
- PageRank, vibration modes of structures, and principal component analysis all reduce to eigenvectors.
Next: LA 09 Symmetric and Positive Definite Matrices, where eigenvectors become perpendicular and everything becomes cleaner.