Linear AlgebraSVDCondition NumbersPseudoinverseNumerical Stability

Singular Value Decomposition and Condition Numbers

Module 4 of 528 min readLevel: Hard

Setup

Every matrix — whether square or rectangular, rank-deficient or full-rank — admits a singular value decomposition (SVD). This is a strictly stronger result than eigendecomposition, which applies only to square matrices and fails for non-diagonalisable ones. The SVD is the canonical tool for understanding the geometry of a linear map and the sensitivity of the linear system Ax=bAx = b.

Where this lives on a desk. The SVD appears in three distinct quant workflows:

  1. Calibration and least-squares fitting. When you fit a volatility surface or calibrate a yield curve model, you solve an overdetermined system minθF(θ)market2\min_\theta \|F(\theta) - \text{market}\|^2. The normal equations AAθ=AbA^\top A\theta = A^\top b are solved via the pseudoinverse A+=VΣ+UA^+ = V\Sigma^+ U^\top — the SVD-based answer that minimises the residual with minimum-norm θ\theta.

  2. Risk factor models. Returns matrices XRT×nX \in \mathbb{R}^{T \times n} are decomposed into orthogonal factors. SVD of XX gives the principal components directly without forming XXX^\top X — numerically more stable when TT is small relative to nn.

  3. Numerical stability diagnostics. The condition number κ2(A)=σ1/σn\kappa_2(A) = \sigma_1 / \sigma_n quantifies how much the solution xx of Ax=bAx = b amplifies errors in bb. An ill-conditioned calibration problem signals that the model has redundant parameters or the data is insufficient to identify them separately.

Mathematical setting. Let ARm×nA \in \mathbb{R}^{m \times n} with mnm \geq n (the overdetermined case common in calibration). No symmetry assumption. r=rank(A)min(m,n)r = \text{rank}(A) \leq \min(m, n).

Notation. σ1σ2σr>0=σr+1==σn\sigma_1 \geq \sigma_2 \geq \cdots \geq \sigma_r > 0 = \sigma_{r+1} = \cdots = \sigma_n are the singular values of AA. Subscripts follow the usual convention: σ1\sigma_1 is the largest (spectral norm of AA).

INSIGHT

Financial Insight. SVD makes the geometry of the calibration problem explicit: UU rotates the output space (market observables), VV rotates the input space (model parameters), and Σ\Sigma stretches/compresses each independent direction by its singular value. Directions with σi0\sigma_i \approx 0 are directions in parameter space that barely affect market observables — the model is near-unidentifiable in those directions.


Theory

1. The Singular Value Decomposition

THEOREM

Theorem 4.1 (SVD Existence). For any ARm×nA \in \mathbb{R}^{m \times n} there exist orthogonal matrices URm×mU \in \mathbb{R}^{m \times m} and VRn×nV \in \mathbb{R}^{n \times n}, and a matrix ΣRm×n\Sigma \in \mathbb{R}^{m \times n} with Σii=σi0\Sigma_{ii} = \sigma_i \geq 0 and Σij=0\Sigma_{ij} = 0 for iji \neq j, such that A=UΣV.A = U \Sigma V^\top. The diagonal entries of Σ\Sigma, taken in non-increasing order σ1σ20\sigma_1 \geq \sigma_2 \geq \cdots \geq 0, are unique and called the singular values of AA.

Derivation. The key is to relate singular values to eigenvalues of the symmetric matrices AAA^\top A and AAA A^\top.

Since AARn×nA^\top A \in \mathbb{R}^{n \times n} is symmetric positive semi-definite (SPSD), the Spectral Theorem (Module 3) guarantees AA=VΛV,Λ=diag(λ1,,λn),λi0,V orthogonal.A^\top A = V \Lambda V^\top, \quad \Lambda = \text{diag}(\lambda_1, \ldots, \lambda_n), \quad \lambda_i \geq 0, \quad V \text{ orthogonal.}

Define σi=λi\sigma_i = \sqrt{\lambda_i} for i=1,,ri = 1, \ldots, r (the non-zero eigenvalues). For iri \leq r, set ui=1σiAviRm.u_i = \frac{1}{\sigma_i} A v_i \in \mathbb{R}^m.

These are orthonormal: for iji \neq j, ui,uj=1σiσjviAAvj=1σiσjviVΛVvj=λjσiσjδij=0.\langle u_i, u_j \rangle = \frac{1}{\sigma_i \sigma_j} v_i^\top A^\top A v_j = \frac{1}{\sigma_i \sigma_j} v_i^\top V \Lambda V^\top v_j = \frac{\lambda_j}{\sigma_i \sigma_j} \delta_{ij} = 0.

Extend {u1,,ur}\{u_1, \ldots, u_r\} to an orthonormal basis {u1,,um}\{u_1, \ldots, u_m\} for Rm\mathbb{R}^m. Then A=UΣVA = U \Sigma V^\top holds by construction.

Note: σi2=λi(AA)=λi(AA)\sigma_i^2 = \lambda_i(A^\top A) = \lambda_i(A A^\top) for imin(m,n)i \leq \min(m,n) — the non-zero eigenvalues of AAA^\top A and AAA A^\top coincide.

DEFINITION

Definition 4.1 (Thin SVD). The thin (economy) SVD retains only the rr non-zero singular values: A=UrΣrVr,A = U_r \Sigma_r V_r^\top, where UrRm×rU_r \in \mathbb{R}^{m \times r}, Σr=diag(σ1,,σr)Rr×r\Sigma_r = \text{diag}(\sigma_1, \ldots, \sigma_r) \in \mathbb{R}^{r \times r}, VrRn×rV_r \in \mathbb{R}^{n \times r}. For mrm \gg r this is far cheaper to compute and store than the full SVD.

2. Geometric Interpretation

The decomposition A=UΣVA = U \Sigma V^\top factors the action of AA into three steps:

  1. VV^\top: rotate the input vector xx into the right singular vector basis.
  2. Σ\Sigma: independently scale each coordinate by σi\sigma_i (and discard the null space).
  3. UU: rotate the stretched vector into the output (column) space.
INSIGHT

Financial Insight. Think of VV^\top as transforming raw model parameters into uncorrelated "eigen-parameters". Σ\Sigma tells you how sensitively observable prices respond to each eigen-parameter. Eigen-parameters with near-zero singular values are unobservable from the data — the calibration is degenerate along those directions.

3. The Four Fundamental Subspaces via SVD

The SVD gives explicit orthonormal bases for all four subspaces first seen in Module 1.

THEOREM

Theorem 4.2 (Fundamental Subspaces). Let A=UΣVA = U \Sigma V^\top with rank rr. Then:

  • Column space (image): col(A)=span(u1,,ur)\text{col}(A) = \text{span}(u_1, \ldots, u_r) — first rr left singular vectors.
  • Left null space: null(A)=span(ur+1,,um)\text{null}(A^\top) = \text{span}(u_{r+1}, \ldots, u_m) — last mrm - r left singular vectors.
  • Row space: row(A)=span(v1,,vr)\text{row}(A) = \text{span}(v_1, \ldots, v_r) — first rr right singular vectors.
  • Null space: null(A)=span(vr+1,,vn)\text{null}(A) = \text{span}(v_{r+1}, \ldots, v_n) — last nrn - r right singular vectors.

Proof sketch. Avi=σiuiAv_i = \sigma_i u_i for iri \leq r (so virow(A)v_i \in \text{row}(A), uicol(A)u_i \in \text{col}(A)), and Avi=0Av_i = 0 for i>ri > r (so vinull(A)v_i \in \text{null}(A)). The orthogonality of UU and VV gives the subspace dimensions. \square

4. The Moore-Penrose Pseudoinverse

When Ax=bAx = b is overdetermined (m>nm > n, more equations than unknowns) the system generally has no exact solution. The least-squares solution minimising Axb2\|Ax - b\|_2 is:

DEFINITION

Definition 4.2 (Pseudoinverse). The Moore-Penrose pseudoinverse of AA is A+=VΣ+U,A^+ = V \Sigma^+ U^\top, where Σ+\Sigma^+ replaces each non-zero σi\sigma_i by 1/σi1/\sigma_i and leaves zero entries as zero.

The full lesson requires Premium

The complete derivation, the C++ / Python implementation, the validation tables, the quiz, and the interview-angle notes are part of Premium. Start a Premium plan to unlock every module in this track.