Singular value decomposition is a matrix factorization used throughout linear algebra, data science, statistics, engineering, and numerical computing. This cheat sheet helps students connect the formula to geometry, rank, least squares, compression, and stability. It is especially useful because SVD works for any real matrix, including non-square and singular matrices.
The core idea is that a matrix transformation can be broken into a rotation or reflection, a coordinate-wise scaling, and another rotation or reflection. The singular values measure the strength of the transformation along special orthogonal directions. The columns of are right singular vectors, the columns of are left singular vectors, and the diagonal entries of are nonnegative singular values.
Key Facts
- Every real matrix has an SVD , where and have orthonormal columns and is diagonal or rectangular diagonal.
- The singular values satisfy and are usually ordered as .
- The right singular vectors are eigenvectors of , and .
- The left singular vectors are related by for every nonzero singular value .
- The rank of equals the number of nonzero singular values, so .
- The spectral norm of is , and the Frobenius norm is .
- The Moore-Penrose pseudoinverse from the SVD is , where each nonzero becomes .
- The best rank- approximation in the -norm or Frobenius norm is .
Vocabulary
- Singular Value Decomposition
- A factorization that expresses a matrix as orthogonal directions, nonnegative scalings, and orthogonal directions.
- Singular Value
- A nonnegative number on the diagonal of that measures how much stretches a corresponding singular vector direction.
- Right Singular Vector
- A column vector of that is an eigenvector of and represents an input direction for the transformation.
- Left Singular Vector
- A column vector of that gives the output direction produced by .
- Pseudoinverse
- The matrix that generalizes the inverse for rectangular or singular matrices and is used in least squares problems.
- Low-Rank Approximation
- An approximation that keeps only the largest singular values and their singular vectors to capture the strongest structure in .
Common Mistakes to Avoid
- Confusing eigenvalues with singular values is wrong because singular values are always nonnegative and come from , not necessarily from eigenvalues of .
- Forgetting the transpose in is wrong because the right singular vectors must act through , not through .
- Assuming SVD requires a square matrix is wrong because SVD exists for every matrix, including rectangular matrices.
- Inverting zero singular values in is wrong because only nonzero singular values become , while zeros stay zero.
- Keeping the smallest singular values for compression is wrong because the largest singular values contain the strongest action and minimize approximation error.
Practice Questions
- 1 A matrix has singular values , , , and . Find , , and .
- 2 If and has nonzero diagonal entries , , and , what are the corresponding nonzero diagonal entries of ?
- 3 For singular values , , , and , write the Frobenius norm error for the best rank- approximation.
- 4 Explain why SVD can solve least squares problems even when is singular or poorly conditioned.
Understanding SVD Singular Value Decomposition Reference
A useful way to read an SVD is as a list of independent input-output channels. Start with one right singular direction. A vector pointing exactly in that direction is sent to the matching left singular direction, with its length multiplied by the matching singular value.
Directions with a zero singular value disappear completely under the matrix transformation. Those lost directions form the null space. This explains why some systems have no unique solution.
Different input vectors can produce the same output when their difference lies in the null space. The nonzero left singular directions describe the column space, meaning every output the matrix can actually create.
Singular values reveal more than rank. Their sizes show how sensitive a calculation is to small errors. If the largest singular value is much bigger than the smallest nonzero one, the matrix is ill-conditioned.
A tiny measurement error in an output can then cause a large error when trying to recover an input. This happens because solving a system requires dividing by singular values. Dividing by a very small value magnifies noise.
In numerical work, a value may be treated as zero when it is too small compared with the largest value. This is a practical decision based on machine precision and the accuracy of the data, not just a theorem about exact numbers.
The pseudoinverse is especially important for data that give too many equations or too few. With more equations than unknowns, an exact solution may not exist because measurements disagree slightly. The pseudoinverse chooses an input whose predicted output is as close as possible to the measured output in ordinary distance.
With fewer equations than unknowns, there may be many exact solutions. It selects the one with the smallest length. These choices are useful in fitting a line to noisy data, estimating forces from sensor readings, reconstructing images, and training simple linear models.
Small singular values can make these answers unstable, so analysts often use truncated SVD. They keep only reliable large directions and discard weak directions that mostly amplify noise.
Low-rank approximation works because many real data sets contain repeated patterns. A grayscale image can be stored as a matrix of brightness values. The first few singular components often capture broad lighting, large shapes, and major edges.
Later components add fine detail. Keeping only some components reduces storage, though it removes information. The same idea appears in recommendation systems, document analysis, genetics, and signal processing.
When studying SVD, pay attention to dimensions at every step. Track which vectors live in the input space and which live in the output space.
Remember that singular vectors are not always unique, especially when singular values repeat. What remains meaningful is the subspace spanned by those vectors and the amount of stretching represented by the singular values.