The Singular Value Decomposition
Every matrix, square or not, does the same three things: turn, stretch along perpendicular axes by the singular values, and turn again. That's , and it works because is always symmetric, so it always has perpendicular eigenvectors to use as those axes.
What the symbols mean
- Output directions
Orthonormal columns: where the stretched axes land.
- Singular values
Nonnegative stretch factors σ₁ ≥ σ₂ ≥ ⋯ on the diagonal.
- Input directions
Orthonormal: the axes that get stretched.
Explanation
The singular value decomposition, or SVD, is simply a way to break any matrix, even a non-square one, into three simple moves: a turn (or flip), a stretch along perpendicular axes, and another turn. "Decomposition" just means taking it apart into pieces, and the stretch factors are called singular values. The name fits nicely: a square matrix is singular (not invertible) exactly when one of its singular values is , because then it squashes some direction flat. What it's good for: it tells you the most and least a matrix can stretch anything, and it's the engine behind image compression. All we're really saying here is that in , picks out the input directions (the axes that get stretched), stretches along them by , and says where the stretched axes land. The stretch factors come from (square roots of the eigenvalues of ). Three moves, each of which you've met before; bear with it.
Take a look at the spectral theorem from earlier in this unit. Symmetric matrices get : perpendicular axes, stretch, done. Most matrices aren't symmetric, and non-square ones can't even have eigenvalues. The SVD gives every matrix something almost as good, using two different orthogonal matrices instead of one.
Geometry. Any matrix sends the unit circle (sphere) to an ellipse (ellipsoid). The singular values are the lengths of its semi-axes; 's columns are the input directions that map to those axes, and 's columns are the axis directions. There's an animation further down that shows this for a matrix.
Computing: the eigenvalues of the symmetric matrix are ; its eigenvectors are the columns of ; then . Think about why is the right thing to look at. The squared length of is , which is a quadratic form! From the last lesson, its largest value over unit vectors is the largest eigenvalue of . So the biggest stretch is , and it happens along the top eigenvector .
Facts: the rank equals the number of nonzero singular values. Keeping only the largest terms of gives the best rank- approximation of : that's compression.
A common mistake. It's tempting to think the singular values are just the eigenvalues of , because both describe stretching. They aren't, in general. has eigenvalues and but singular values and . And singular values are never negative: has eigenvalue , but singular value .
See it
Worked examples
Find the singular values of .
- 1
Form . Its trace is 2 and its determinant is 0, so its eigenvalues are 2 and 0, and the singular values are their square roots.
, (rank 1).
Practice
Type your answer and check it. Solve them all to complete the lesson.
Find the singular values of .
Find the singular values of .
What is the largest singular value of ?
Is the rank of a matrix equal to its number of nonzero singular values?
How many singular values does the best rank-1 approximation keep?
A robot arm's Jacobian turns joint speeds into hand velocity. If the joint-speed vector has length , what's the fastest the hand can move?
The hardest one here. Get it, and you've got this lesson.
Find the best rank-1 approximation of . Row by row.
Where it's used
Image and video compression, recommender systems (the Netflix prize), noise reduction and latent semantic analysis of text are all built on the SVD.