The idea
A matrix transforms space: generic vectors get stretched and rotated somewhere new. An eigenvector is a direction the matrix does not rotate — it stays on its own line and is only scaled by the eigenvalue:
Why this is the single most reused idea in applied linear algebra: along an eigen-direction, the matrix behaves like multiplication by a plain number. If you can find a whole basis of eigenvectors, the matrix is just a list of numbers in the right coordinate system:
with eigenvectors in the columns of and eigenvalues on the diagonal of . A coupled -dimensional linear system becomes independent one-dimensional ones. Powers collapse to , which is why the largest-magnitude eigenvalue controls the fate of every repeated linear process: Markov chains, PageRank, gradient descent dynamics, RNN state propagation. Bigger than one in magnitude → explosion; smaller → decay.
To compute by hand, rearrange into : a nonzero solution exists only when is singular, giving the characteristic equation
For the matrices data scientists actually meet — covariance, correlation, kernel/Gram matrices, graph Laplacians, Hessians — there is a bonus, the spectral theorem: symmetric matrices have real eigenvalues and an orthonormal eigenbasis, . Covariance matrices are additionally positive semidefinite (), so their eigenvalues are nonnegative and readable as variances along perpendicular axes — the fact PCA is built on.
Play with a symmetric matrix directly — the eigenvector rays stay fixed in place as the unit circle stretches into an ellipse around them:
[[2, 1], [1, 1]] stretches the unit circle along its eigenvector rays by λ₁ = 2.62 and λ₂ = 0.38.
Worked example
Take the symmetric matrix
Eigenvalues. The characteristic polynomial factors as
Thus and . The trace and determinant checks are
Eigenvectors. Solve each null-space equation:
Verification is immediate:
The two eigenvectors are orthogonal, exactly as the spectral theorem promises for a symmetric matrix.
Geometry. stretches space by along the diagonal direction and leaves the anti-diagonal untouched. If were a covariance matrix, PCA would report first component with variance and second component with variance .
Power iteration in miniature. Start from the non-eigenvector and apply repeatedly:
The ratio of coordinates goes : the iterates swing toward the dominant eigen-direction , and each step multiplies the components along and by and respectively, so the dominant one wins at rate per step.
Cheat sheet
Definitions and hand computation
- , ; eigenvectors are defined only up to scale (and sign).
- Characteristic equation: . For : .
- , ; invertible no zero eigenvalue.
- Diagonalizable: ; then .
- Spectral theorem (symmetric ): real , orthonormal , . PSD adds ; positive definite, .
Where each fact earns money
| Appearance | Eigen-fact doing the work |
|---|---|
| PCA | covariance eigenvectors = variance axes; eigenvalues = variances |
| PageRank / power iteration | dominant eigenvector; converges at rate |
| Markov chains | stationary distribution = left eigenvector for of (equivalently the right eigenvector of ) — the right eigenvector of for is just the all-ones vector |
| Gradient descent / Hessian | positive definite Hessian = local min; sets step-size and convergence speed |
| Multicollinearity | near-zero covariance eigenvalue = redundant feature combination |
| Spectral clustering | small eigenvalues of graph Laplacian reveal cluster structure |
Gotchas
- Non-symmetric real matrices can have complex eigenvalues (rotation matrices: no real invariant direction) or too few eigenvectors to diagonalize at all. The symmetric case is the well-behaved one.
- Sample covariance with has rank at most : expect a pile of exactly-zero eigenvalues, and tiny negative ones from floating point — clip to zero or add a small ridge .
- Power iteration stalls when and never leaves the starting subspace if the seed is exactly orthogonal to the dominant eigenvector — restart from a random vector.
- Eigenvalues of are not the singular values of unless is symmetric PSD — do not interchange them for rectangular or non-symmetric matrices.