Chapter 5 showed a matrix stretching, rotating, and flipping a vector. Every direction you dragged got bent somewhere else — except, it turns out, two of them. Are there directions a matrix leaves alone?
Drag around. Most of the time, points somewhere completely different — the angle between them swings all over the place. But two opposite directions are special: keep dragging near the diagonal and watch that rotation angle collapse toward .
A vector is an eigenvector of if doesn't rotate it at all — only scales it:
- — the matrix being analyzed.
- — the eigenvector: a direction only scales, never rotates.
- — the eigenvalue: how much that direction gets stretched (or flipped, if negative).
- What the eigenvalue means
is the corresponding eigenvalue: how much that direction gets stretched (or, if , stretched and flipped).
For a symmetric matrix, the eigenvectors are always perpendicular to each other, and can be rebuilt exactly from them:
- — the matrix whose columns are the (unit) eigenvectors of .
- — the diagonal matrix holding the eigenvalues, in the same order as 's columns.
- Naming the eigendecomposition
Here 's columns are the (unit) eigenvectors and is diagonal with the eigenvalues on it — this is the eigendecomposition.
- Generalizing to the SVD
The singular value decomposition (SVD), , is the same idea generalized to any matrix, square or not — but its diagonal is always non-negative, so a negative eigenvalue's direction gets its sign absorbed into instead.
Watch the stretch ratio alongside the rotation angle. At the two special directions, the ratio locks onto a fixed number — that number is for that direction, no matter how far out you drag along it.
For :
- Solve the characteristic equation
, so and .
- Solve for each eigenvector
- For : , giving direction .
- For : , giving direction .
Normalized, these are and — exactly the and directions from the demo above.
- Turn it into an SVD
Singular values are , sorted:
Since is negative, its left singular vector flips sign:
Each term is a rank-1 outer product, scaled by its singular value:
Adding the two terms entrywise reconstructs exactly:
Drag v until Av points the same direction as v — angle under 2°. Hint: it's near the diagonal, like (0.71, 0.71).
Every matrix has a set of directions it only stretches, never rotates — the eigendecomposition finds them exactly, by solving one polynomial. This isn't just an algebra exercise: later, Part II's PCA (Principal Component Analysis) chapter finds "the direction of maximum variance" by eyeballing a scatter plot. That direction is the top eigenvector of the data's covariance matrix — this chapter's machinery is what actually computes it, instead of eyeballing it.