Every matrix turns a circle into an ellipse. Watch it happen in three moves: a turn, a stretch, and another turn.
A matrix as turn, stretch, turn
A = [3 0; 4 5] sends the unit circle to an ellipse, in three moves.
The unit circle with two perpendicular arrows on it, and a faint ghost of where A sends the circle.
Describe this picture
One panel with the unit circle, a faint grid and two perpendicular arrows on the circle, and . A faint ghost ellipse shows where sends the circle in one step. Over 12 s the circle gets there in three moves of 4 s each. First it turns by −45°, so the two arrows land on the axes. Then the axes are stretched, the first by 6.708 and the second by 2.236, and the circle becomes an upright ellipse. Last the ellipse turns by 71.57° and lands exactly on the ghost. Readouts give the two stretches. One control after the clip: drag either column tip of ; the three moves and both stretches are worked out again. When the columns line up, the ellipse flattens to a segment and the second stretch is 0.
A circle becomes an ellipse
Take the matrix . As on A matrix moves the plane, it moves every point of the plane, and the unit circle lands on some curve. For every matrix that curve is an ellipse, or a segment if the matrix flattens the plane.
The picture at the top builds that ellipse in three moves. A turn by −45° (that is, rad) brings two special perpendicular arrows onto the axes. A stretch along the axes pulls the circle into an upright ellipse. A second turn, by 71.57°, swings the ellipse into place. Turn, stretch, turn, with a flip in one of the turns when the matrix flips the plane: that is all any matrix does to the plane.
Name the pieces
The two arrows that land on the axes are the right singular vectors, and . The stretch factors are the singular values, . On this page is a stretch factor, not a standard deviation or the real part of . Where each arrow ends up, as a unit vector, is a left singular vector, or . Together:
Put the as the columns of , the as the columns of , and the on the diagonal of . Both and have orthonormal columns, as in Orthonormal bases and Gram–Schmidt, so their inverses are their transposes. Then
Read it right to left: turns, stretches, turns. When the matrix flips the plane, one of the two turns also flips. This is the singular value decomposition, or SVD. These and play the same part as the unitary of the Fourier matrix page and the basis of Independence, basis and dimension: sets of perpendicular directions.
Watch out
Singular values are not eigenvalues. This is triangular, so its eigenvalues are 3 and 5. Its singular values are 6.708 and 2.236. The products agree, , because both equal . The sums do not: 8 against 8.944. Eigenvectors are the directions a matrix keeps; singular vectors are the directions it stretches most and least.
Where the singular values come from
Multiply by its own transpose. With and :
That is the spectral form of Symmetric matrices. So the are the eigenvectors of the symmetric matrix , and its eigenvalues are the squares . Once you have and , the left vectors follow from .
For our matrix:
Its eigenvalues are 45, along , and 5, along . So and . Then , of length , gives , at 71.57°. With , gives . In matrices:
Both are turns. Each singular vector could also be flipped, together with its partner; the choice of signs is a convention.
Two checks need no vectors. The largest stretch of any unit arrow is , so for every . And the squares of all the entries add up to the squares of the singular values. That sum is the Frobenius norm squared, : here .
Rank and the four subspaces
Now a matrix that flattens the plane:
Its columns are equal, so every output lies on the line of . Here and : the circle collapses to a segment. The singular vectors hand you all four subspaces of The four fundamental subspaces at once:
- spans the column space;
- spans the left null space;
- spans the row space;
- spans the null space, the direction stretched by 0.
The rank is the number of singular values that are not zero.
A sum of rank-one pieces
Multiply out by columns times rows, as in Matrix multiplication:
Each piece is a column times a row, a matrix of rank one. For our the pieces are
Rebuild from pieces
A as two rank-one pieces, and a 3 × 2 matrix as its three factors.
The first piece, σ_1 u_{1} v_{1}ᵀ with σ_1 = √45: every row a multiple of (1, 1), rank one.
Describe this picture
Two panels of cells, each cell shaded by its number. Above, the two rank-one pieces of , and , appear one after the other, and a third grid fills cell by cell with their sum, . Below, the matrix appears, then its three factors: of size , of size with and 1 on its diagonal, and of size . There is no control.
The SVD works for any shape. The matrix of A matrix moves the plane has , with eigenvalues 3 and 1. So and , with and . It turns the flat circle into an ellipse tilted in space.
In signal processing · the Fourier matrix
The DFT as a matrix, in the signal processing course, shows that . So stretches every direction by the same amount: all its singular values are , which is 2 for . The DFT turns a signal and scales it evenly, and loses nothing. Matrix entries count from 1, while DFT indices count from 0.
Worked example
1. The full decomposition. For : has eigenvalues 45 and 5, so and 2.236. has the same two eigenvalues (trace 50, determinant 225), with eigenvectors and : the left singular vectors. The pieces rebuild , , and .
2. Rank one. , a column times a row: , , rank 1.
3. A tall matrix. has and 1.
4. The Fourier matrix. Every singular value of for is 2.
Try these before you read the answers.
- Singular values of ? 3 and 3: the circle stays a circle.
- The longest for a unit , for the worked ? 6.708.
- A symmetric matrix has eigenvalues 3 and . Its singular values? 3 and 2: the sign moves into or , which then flips.
Where you’ll meet this
The engine of later pages. Keeping only the large pieces compresses a matrix, in Low-rank approximation. The SVD of a data table finds its main directions, in Principal components. Least-squares routines in software solve through it, in The pseudo-inverse, and the ratio measures how sensitive a system is, in Conditioning.
Recommendations and text. A table of ratings, people by films, is factored by its SVD; the few largest pieces capture tastes. The same is done to tables of words by documents to find topics.
Antenna and microphone arrays. The SVD of an array’s recorded data splits it into a few strong directions, the signals, and many weak ones, the noise.
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| Decomposition | turn, stretch, turn, with a flip in one turn if the matrix flips the plane; any shape | |
| Singular pair | ||
| From | eigenvalues , eigenvectors | gives the |
| Pieces | each piece has rank one | |
| Largest stretch | ||
| Frobenius norm | sum of squared entries | |
| Determinant | square matrices | |
| Rank | number of | the zero ones span the null space |