advanced30 min studyLesson 305 in Mathematics

Singular values and low-rank approximation

Use the SVD to quantify discarded directions, select a numerical rank, and understand truncation bias.

On this page

What you’ll understand

  • Compute spectral and Frobenius errors of a truncated SVD.
  • Explain the difference between numerical rank and exact rank.
  • Track how singular-value truncation alters an inverse problem.

A matrix may have many rows and columns while acting meaningfully in only a few directions. The singular value decomposition identifies those directions without requiring symmetry or even a square matrix. Truncation then gives the best fixed-rank approximation in two common norms. In a solve, however, discarding a direction changes the problem rather than merely compressing its representation. Understanding that tradeoff connects matrix approximation with stable inference and regularization.

The SVD separates input directions, gains, and output directions

For a real m-by-n matrix, an SVD writes A as UΣVᵀ with orthogonal factors and nonnegative singular values in descending order. Using the r positive singular values, A is a sum of rank-one terms σⱼuⱼvⱼᵀ. Each right singular vector describes an input direction, each left singular vector its output direction, and the singular value its gain. This is not generally an eigenvalue decomposition: input and output spaces may differ, and singular values remain nonnegative even when eigenvalues are negative or complex.

Small singular values indicate directions that have a weak forward effect and a potentially strong inverse response. A singular value of exactly zero records an exact null direction, whereas a small nonzero value may be indistinguishable from zero at the scale of measurement or arithmetic uncertainty. Numerical rank therefore requires a declared threshold. A gap between successive singular values can make a rank decision robust; a cluster near the threshold makes it sensitive. Individual singular vectors in a repeated singular-value subspace are not uniquely determined, although the relevant subspace can be meaningful.

A=∑j=1rσjujvjT,Ak=∑j=1kσjujvjT,σ1≥⋯≥σr>0A=\sum_{j=1}^{r}\sigma_j u_jv_j^{\mathsf T},\qquad A_k=\sum_{j=1}^{k}\sigma_j u_jv_j^{\mathsf T},\qquad \sigma_1\ge\cdots\ge\sigma_r>0
The columns uⱼ and vⱼ are orthonormal in their respective spaces. Aₖ retains k singular directions, with 0≤k<r for a nontrivial truncation.↔ Scroll wide equations horizontally.

Best approximation depends on the norm being optimized

The truncated SVD minimizes both spectral-norm error and Frobenius-norm error among matrices of rank at most k. The spectral error is the largest discarded singular value, because one omitted orthogonal direction realizes that gain. The Frobenius error is the square root of the sum of squared discarded singular values, accumulating all omitted gains. These are distinct objectives. A matrix with many modest discarded values can have a small worst-direction error yet a substantial total energy error. Rank ties may yield multiple optimal approximations.

The spectral lower bound has a useful geometric argument. Any candidate rank-k approximation must annihilate some nonzero vector in the span of the first k+1 right singular vectors, by a dimension count. On a unit vector in that intersection, the original matrix has norm at least σk+1, so no candidate can have smaller operator error. The truncated SVD reaches this bound. The Frobenius version uses orthogonal invariance and the corresponding squared-energy minimization; this explanation is a theorem outline, not a replacement for every detail of its full proof.

min⁡rank⁡(B)≤k∥A−B∥2=σk+1,min⁡rank⁡(B)≤k∥A−B∥F=(∑j>kσj2)1/2\min_{\operatorname{rank}(B)\le k}\lVert A-B\rVert_2=\sigma_{k+1},\qquad \min_{\operatorname{rank}(B)\le k}\lVert A-B\rVert_F=\left(\sum_{j>k}\sigma_j^2\right)^{1/2}
These best-approximation identities hold for a finite real or complex matrix with ordered singular values, using conjugate transposes in the complex case.↔ Scroll wide equations horizontally.

Truncated inversion exchanges amplification for bias

A full-rank least-squares inverse weights the observed component uⱼᵀb by 1/σⱼ in each retained right singular direction. Noise in a weak direction can therefore be amplified substantially. A truncated inverse sets coefficients associated with discarded singular values to zero. This can reduce noise amplification, but it also discards any real signal in those directions. The resulting estimate generally is not the full-rank least-squares minimizer. Its extra residual is a deliberate regularization cost, which should be evaluated against the noise model and desired output.

A stable SVD computation normally uses orthogonal reductions and a specialized bidiagonal problem rather than explicitly diagonalizing AᵀA, which squares singular values and can lose relative information in small ones. Even then, tiny singular values can be difficult to interpret relative to input uncertainty. Validate a selected rank by checking reconstruction error, sensitivity to the tolerance, and task-level performance. If a matrix is compressed for storage, a small norm error may be enough; if it is used for inversion, the discarded directions and subsequent inverse gains need separate analysis.

Worst-direction error versus total discarded energy

Let A=diag(6,2,1). Find best rank-one and rank-two approximation errors in spectral and Frobenius norms.

  1. The coordinate axes already form singular vectors and the singular values are 6, 2, and 1. A best rank-one approximation is diag(6,0,0).

  2. Its residual has singular values 2 and 1, so spectral error is 2 and Frobenius error is √(2²+1²)=√5.

  3. A best rank-two approximation is diag(6,2,0). Its residual has only singular value 1, giving error 1 in both norms. The approximation theorem certifies that no equal-or-lower-rank matrix improves either respective optimum.

The result

Rank one gives errors 2 and √5; rank two gives 1 and 1. Total discarded energy contains information absent from the largest-discarded-value test.

Explore the model

Interactive lab

Interactive lab · matrix

Predict the best rank-one error from a readout

Reset, set a=0.5 and b=0. Predict singular values 1 and 0.5, so best rank-one spectral error is 0.5. For a fresh comparison, Reset, set a=1 and b=1.5: singular values are 2 and 0.5, again giving best rank-one error 0.5 but a different condition number. The instrument shows the full selected map and its singular values, not its reconstructed rank-one approximation.

Predict the best rank-one error from a readoutThe selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. Current readings: Area scale · det A: 1.4; Singular values · σmax, σmin: 1.597, 0.876; Condition number · κ₂(A): 1.823. All parameters are adjustable with the labeled controls below.Matrix A with first row 1.4, 0.6 and second row zero, one; display interpolates between identity and A while final determinant remains 1.4.−4−2024−2−1012x · equal geometric scaleyA = [ 1.4 0.6 ; 0 1 ]Display blend: 0% · final values below
Interpolated geometryOriginal unit squareSelected final transform
Area scale · det A
1.4
Singular values · σmax, σmin
1.597, 0.876
Condition number · κ₂(A)
1.823
t = 0 s

The selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forThe discarded singular value controls rank-one operator error, while the ratio of singular values controls inversion sensitivity.

Check your understanding

A truncated SVD retains only the largest k singular directions. What is its spectral-norm approximation error?

Try it yourself

Use A=[[3,0],[0,1],[0,0]] and b=(0,1,1). Compare the full least-squares solution with the rank-one truncated-SVD solution and their residual norms.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

The first singular direction has gain 3, but b has no component in its left singular direction.

Compare with the solution

The full minimizer is x=(0,1), producing Ax=(0,1,0) and residual norm 1. Retaining only the gain-3 direction gives x=(0,0), because its data coefficient is zero. Its residual is b, with norm √2. Truncation removes the second direction rather than solving the original full-rank fit exactly. It may be justified by an uncertainty model, but in this noise-free algebraic comparison it sacrifices a genuine fitted component.

Take it with you

  • Singular values quantify gains even for nonsymmetric rectangular matrices.
  • Spectral and Frobenius truncation errors measure different aspects of what is discarded.
  • A truncated inverse regularizes by changing retained information and introducing possible bias.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.