Singular Value Decomposition
Recall prompts
Section titled “Recall prompts”Attempt these from memory before reading.
- State the SVD of a matrix . What are the shapes of the three factors?
- Does every matrix have one? What about a non-square matrix?
- How are the singular values related to the eigenvalues of ?
- State the Eckart-Young theorem.
- What is the condition number, and what does a large one tell you?
Check your answers against the text. Prompt 2 is the one that separates the SVD from the spectral theorem: the spectral theorem needs a square, normal matrix, and the SVD does not care.
Motivation: the theorem that works for every matrix
Section titled “Motivation: the theorem that works for every matrix”Diagonalisation is the tool of section 5, and it has a catch: it needs a square matrix with a full set of eigenvectors. Rectangular matrices — the ones that describe data, transformations between different spaces, and every least-squares problem — are left out.
The singular value decomposition removes every one of those restrictions. Any matrix, real or complex, singular or not, admits a factorisation
with and orthogonal and diagonal with non-negative entries. Those entries are the singular values, and they are the answer to a geometric question rather than an algebraic one.
The geometric picture is the best way in. Every linear map does three things, in this order: rotate, scale along the axes, rotate again. That is all the SVD says. The columns of are the directions in the domain that get mapped to the directions of in the codomain, and says how much each is stretched.
Why the singular values are what they are. They are the square roots of the eigenvalues of , which is symmetric and positive semidefinite — so the spectral theorem applies and the square roots are real and non-negative. That is the whole relationship to section 5: the SVD is the spectral theorem applied to , written so that it says something about .
What it buys you. The Eckart-Young theorem says that truncating the SVD to the largest singular values gives the best rank- approximation, in the least-squares sense — not a good approximation, the best one. That single theorem is the basis of data compression, principal component analysis, noise reduction and recommender systems, and it is why the SVD is the most useful theorem in applied linear algebra.
8.1 Existence of the SVD
Section titled “8.1 Existence of the SVD”Theorem 8.1 (Singular Value Decomposition). Every matrix can be factored as
Where is orthogonal, is orthogonal, and is diagonal with non-negative entries (where ).
The are called the singular values of . The columns of are the left singular vectors, and the columns of are the right singular vectors.
Proof. The matrix is an symmetric positive semi-definite matrix, so by the spectral theorem it has real non-negative eigenvalues and an orthonormal eigenbasis. Let be these eigenvalues (some may be zero) with corresponding orthonormal eigenvectors forming the columns of .
For each with Define . We verify that these form an orthonormal set:
Extend to an orthonormal basis of to form . Then for any vector :
Since this holds for all We have .
8.2 Relationship to Eigenvalues
Section titled “8.2 Relationship to Eigenvalues”Proposition 8.2. The singular values of are the square roots of the eigenvalues of (equivalently, of ). The non-zero singular values of and are identical.
Proof. From the construction above, . For :
So is an eigenvector of with eigenvalue . The non-zero eigenvalues of and coincide (since if with Then and ).
Proposition 8.3. If is symmetric with eigenvalues Then the singular values of are .
Proof. Whose eigenvalues are . The singular values are .
8.3 Geometric Interpretation
Section titled “8.3 Geometric Interpretation”The SVD decomposes the linear transformation into three steps:
- rotates (or reflects) into a coordinate system aligned with the right singular vectors.
- scales each axis by the corresponding singular value (and possibly drops dimensions where ).
- rotates (or reflects) the result into the coordinate system of the left singular vectors.
Unit circle image. Under The unit circle in is mapped to an ellipse with semi-axes and aligned with the columns of .
8.4 Low-Rank Approximation
Section titled “8.4 Low-Rank Approximation”Theorem 8.4 (Eckart—Young—Mirsky). Let be the SVD with singular values . For any The best rank- approximation to (in both the Frobenius and spectral norms) is
And the approximation error is
Proof (Frobenius norm). Any rank- matrix can be written in terms of an orthonormal basis of its column space. Let have orthonormal columns spanning the column space of . Then for some And:
The minimum over is achieved when spans the subspace spanned by (the top right singular vectors), giving:
The spectral norm result follows because is the largest singular value of .
8.5 Pseudoinverse
Section titled “8.5 Pseudoinverse”Definition. The Moore—Penrose pseudoinverse of is
Where is obtained from by transposing and inverting each non-zero singular value:
Theorem 8.5. The pseudoinverse satisfies the four Moore—Penrose conditions:
Proof. Direct computation using and :
Since (the non-zero singular values are preserved, zeros remain zero). The remaining conditions follow similarly.
Theorem 8.6 (Minimum-Norm Least Squares). If is inconsistent, then is the least-squares solution of minimum norm.
Proof. The least-squares solutions to are for arbitrary . Since and These two components are orthogonal. The minimum-norm solution is obtained when Giving .
8.6 Condition Number
Section titled “8.6 Condition Number”Definition. The condition number of (with respect to the spectral norm) is
Where is the largest and is the smallest non-zero singular value.
Theorem 8.7 (Sensitivity of Linear Systems). If and Then
Proof. From : . From : … Wait, and . Combining: .
A matrix with large condition number is ill-conditioned: small perturbations in can cause large changes in .
8.7 Worked Example: Computing the SVD
Section titled “8.7 Worked Example: Computing the SVD”Problem. Find the SVD of .
Solution
Step 1: Compute .
Step 2: Eigenvalues of : .
So and Giving , .
Step 3: Eigenvectors of . For : So . Normalised: .
For : So . Normalised: .
.
Step 4: Compute .
.
.
Since is We need a third left singular vector orthogonal to and . Compute .
Verification: and are orthogonal, has the correct singular values on the diagonal, and recovers the original matrix.
8.8 Worked Example: Low-Rank Approximation
Section titled “8.8 Worked Example: Low-Rank Approximation”Problem. Let . Find the best rank-1 approximation.
Solution
.
Setting to zero and solving: . Testing : . Testing : . By numerical methods or the rational root theorem (no rational roots), the eigenvalues are approximately , , .
Wait, should be positive semi-definite, so all eigenvalues should be non-negative. Let me recompute.
.
So .
.
of principal minors .
Characteristic polynomial: .
Testing : . Testing : .
By the trigonometric method for cubics or numerical approximation, , , .
The best rank-1 approximation uses only and its corresponding singular vectors, yielding with error .
8.9 Worked Example: Condition Number and Numerical Stability
Section titled “8.9 Worked Example: Condition Number and Numerical Stability”Problem. Compute the condition number of and discuss its implications.
Solution
.
.
This means relative errors in can be amplified by a factor of up to in the solution . The matrix is nearly singular (the two rows are almost linearly dependent), and solving in floating-point arithmetic will lose approximately digits of precision.
8.10 Intuition: What Does the SVD Really Do?
Section titled “8.10 Intuition: What Does the SVD Really Do?”The SVD answers the question: what is the simplest description of a linear transformation? Every matrix, whether square or rectangular, can be decomposed as a rotation, followed by independent stretching along perpendicular axes, followed by another rotation. The singular values tell you how much stretching occurs along each axis, and they are always non-negative because stretching is a magnitude, not a signed quantity.
Think of the SVD as finding the “natural coordinate system” for a transformation. The right singular vectors are the input directions that matter most, and the left singular vectors are the corresponding output directions. The singular values rank these directions by importance, which is why truncating the SVD gives the best low-rank approximation. This is the mathematical foundation of principal component analysis, image compression, and recommendation systems. The condition number, the ratio of largest to smallest singular value, measures how close a matrix is to being degenerate: a high condition number means the matrix nearly collapses some direction to zero, making the system sensitive to noise.
8.11 Common Pitfalls
Section titled “8.11 Common Pitfalls”- Singular values are always non-negative. Unlike eigenvalues, which can be negative or complex, singular values are the square roots of eigenvalues of Hence always real and non-negative.
- The SVD is not unique. If has repeated singular values, the corresponding singular vectors can be any orthonormal basis of the eigenspace. The signs of singular vectors can also be flipped in pairs.
- The pseudoinverse equals the inverse only for square, full-rank matrices. When is not full rank, ; instead, is the orthogonal projection onto .
- The SVD and eigendecomposition are different decompositions. The SVD always exists for any matrix, but the eigendecomposition requires the matrix to be square. Even for symmetric matrices, the singular values are Not .
Counterexamples worth knowing by name
Section titled “Counterexamples worth knowing by name”| Claim | True? | Counterexample |
|---|---|---|
| Singular values are eigenvalues | no | they are the square roots of the eigenvalues of , which are not eigenvalues of ; for a non-symmetric they differ |
| Only square matrices have an SVD | no | every matrix has one, and that is the whole point |
| The singular values are distinct | no | repeated singular values are common and make the factors and non-unique |
| The SVD is unique | no | is unique up to ordering, but and are not unique when singular values coincide |
| Zero singular values mean the matrix is useless | no | they tell you the rank, and the corresponding right singular vectors span the null space — which is what you want when solving |
| A large condition number means the answer is wrong | no | it means the answer may be sensitive; the computed solution can still be accurate if the data is exact |
| Truncating the SVD loses information | yes, and that is the point | the rank- truncation is the closest rank- matrix there is, so what is lost is the part that is least well determined |
| The pseudoinverse is computed by inverting | no | it is computed from the SVD by inverting the non-zero singular values, which works when is not invertible at all |
The first row is the most common confusion, and it is worth being precise: for a symmetric positive semidefinite the singular values and eigenvalues coincide, and that special case is why the two ideas get muddled.
The condition number row is the practical one. measures how much a relative error in the input can be amplified, and a large value is why some linear systems cannot be solved reliably no matter how good the algorithm is.
Where the research frontier is
Section titled “Where the research frontier is”- Randomised numerical linear algebra. Computing a rank- SVD by sampling rather than by exact factorisation, which is how very large matrices are handled in practice.
- Robust low-rank approximation. Eckart-Young is optimal in least squares, which is catastrophic under outliers; replacing the norm is the active question.
- Matrix completion. The Netflix problem: recover a matrix from a tiny sample of entries, using low rank as the prior, with theory that is still being sharpened.
- Tensor decompositions. The SVD does not generalise uniquely to higher orders, and the competing generalisations — CP, Tucker, tensor train — are an active design space.
- Non-negative matrix factorisation. Restricting the factors to be non-negative makes the problem non-convex but interpretable, and the theory is far less complete than for the SVD.
Interleaving problems
Section titled “Interleaving problems”Mix these with Eigenvalues and Eigenvectors, Inner Product Spaces, Systems of Linear Equations, Real Analysis.
- (Eigenvalues.) Show that the singular values of are the square roots of the eigenvalues of , and hence that the largest singular value equals the operator norm . Then compute both for a rotation matrix and explain the answer.
- (Inner product spaces.) Prove that the best rank- approximation in the Frobenius norm keeps the largest singular values. Identify which part of the proof uses orthogonality and would fail in a general norm.
- (Systems of equations.) Use the SVD to write down the solution of of minimum norm when is rank-deficient, and explain what the small singular values do to it.
- (Optimisation.) Principal component analysis centres a data matrix and takes its SVD. Show that the leading right singular vectors maximise the projected variance, which is why PCA is an optimisation problem rather than a definition.
- (Numerical analysis.) A matrix with condition number cannot be reliably inverted in double precision. Explain what that number means in terms of the singular values, and why it is a statement about the problem rather than the algorithm.
- (Research.) State the Eckart-Young theorem precisely and explain why it fails if the Frobenius norm is replaced by the operator norm — and what the correct answer is in that norm.
Cross-References
Section titled “Cross-References”Eigenvalues and Eigenvectors: Singular values are the square roots of eigenvalues of , linking SVD to spectral theory.
Inner Product Spaces: The SVD uses orthonormal bases derived from inner products on the column and row spaces of a matrix.
Systems of Linear Equations: The pseudoinverse derived from the SVD provides minimum-norm least squares solutions to inconsistent linear systems.