Singular value decomposition in this visualization
A linear transformation of the plane maps the unit circle to an ellipse (flattened to a segment or a point when is singular). As goes round the circle, the length is largest, , in one direction and smallest, , in the direction perpendicular to it. These are the singular values, and , with unit vectors along the ellipse’s axes. Putting the columns together, . In the picture the red arrows show a direction and the one perpendicular to it. The yellow arrows show their images under .
Why the right angle survives only there
The squared length is , and is symmetric, so it has perpendicular eigenvectors: they are , with eigenvalues . Their images are perpendicular too, because . When , this pair (up to signs) is the only perpendicular pair whose images stay perpendicular; the others come out skewed. For , and go to and , only 36.87° apart, and as turns the angle runs between 36.87° and 143.13°. When (a rotation or reflection times a positive number), every pair keeps its right angle; when , one image is the zero vector and there is no angle to speak of.
Turn, stretch, turn
Read from the right, turns onto the coordinate axes, stretches along the axes by , and turns the result onto (here also flips one axis when ). The frames between the steps are one path chosen for display; only the steps themselves are the factors. Areas scale by . Unlike diagonalization, this works for every matrix: the shear has no eigenbasis but has singular values and . For a symmetric matrix with positive eigenvalues the two factorizations coincide.
What the singular values tell
With one zero singular value the plane collapses onto a line; with two it collapses to a point: the number of nonzero singular values is the rank. When , the ratio says how elongated the ellipse is, and so how much solving with can magnify relative errors. Applied to a table of data, the same directions are the principal components of principal component analysis.
Things to notice
- Each pair can be flipped together; when the directions are not unique at all.
- Every real m × n matrix has a singular value decomposition, with as many singular values as the smaller of m and n; this page shows the 2 × 2 case.
Controls
- Drag the tip of v round the circle or turn the dial; turn the Steps wheel to watch the three factors one at a time.