SVD (Singular Value Decomposition)

The singular value decomposition is arguably the most important matrix factorization in SLAM. Any matrix ARm×nA \in \mathbb{R}^{m \times n} can be written as

A=UΣVTA = U \Sigma V^T

where URm×mU \in \mathbb{R}^{m \times m} and VRn×nV \in \mathbb{R}^{n \times n} are orthogonal (UTU=IU^T U = I, VTV=IV^T V = I) and ΣRm×n\Sigma \in \mathbb{R}^{m \times n} is diagonal with non-negative entries σ1σ20\sigma_1 \geq \sigma_2 \geq \cdots \geq 0, the singular values. The columns of UU and VV are the left and right singular vectors.

Geometric interpretation: every linear map is a rotation/reflection (VTV^T), followed by an axis-aligned scaling (Σ\Sigma), followed by another rotation/reflection (UU). The singular values measure how much the map stretches space along its principal directions.

What SVD tells you about a matrix

The workhorse uses in SLAM

Homogeneous least squares (DLT). Problems like triangulation, homography estimation, camera calibration, and the eight-point algorithm all reduce to

minxAxsubject tox=1\min_{\mathbf{x}} \lVert A\mathbf{x} \rVert \quad \text{subject to} \quad \lVert \mathbf{x} \rVert = 1

whose solution is the right singular vector of AA corresponding to the smallest singular value.

Enforcing matrix constraints. The closest (in Frobenius norm) rank-2 matrix to an estimated fundamental matrix is obtained by zeroing its smallest singular value. Similarly, a valid essential matrix must have singular values (s,s,0)(s, s, 0), enforced by replacing Σ\Sigma with diag(1,1,0)\mathrm{diag}(1, 1, 0).

Essential matrix decomposition. Given E=UΣVTE = U \Sigma V^T with Σ=diag(1,1,0)\Sigma = \mathrm{diag}(1,1,0), the four candidate relative poses are built from R1=UWVTR_1 = U W V^T, R2=UWTVTR_2 = U W^T V^T, and t=±u3\mathbf{t} = \pm\mathbf{u}_3 (third column of UU), where

W=[010100001]W = \begin{bmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}

The correct pose is selected by the cheirality check (triangulated points must lie in front of both cameras).

Rigid alignment of point sets (Kabsch / Procrustes). Given matched, centered 3D point sets, form the cross-covariance H=ipiqiTH = \sum_i \mathbf{p}_i \mathbf{q}_i^T and compute H=UΣVTH = U \Sigma V^T. The optimal rotation is

R=Vdiag(1,1,det(VUT))UTR = V\, \mathrm{diag}\big(1,\, 1,\, \det(V U^T)\big)\, U^T

with the determinant correction guarding against reflections. This closed-form solution is the inner step of ICP and the standard solver for 3D-3D correspondence.

Projecting onto the rotation group. A noisy “almost rotation” matrix (e.g., from averaging or numerical drift) is repaired the same way: take its SVD and rebuild with unit singular values and the determinant fix.

Pseudo-inverse and low-rank approximation. The Moore-Penrose pseudo-inverse is A+=VΣ+UTA^{+} = V \Sigma^{+} U^T (invert nonzero singular values), giving minimum-norm least-squares solutions. Truncating the SVD after kk terms yields the best rank-kk approximation of AA (Eckart-Young theorem), used in dimensionality reduction and matrix conditioning analysis.

Why it matters for SLAM

SVD appears at nearly every geometric stage of a SLAM pipeline: initializing relative pose from the essential matrix, triangulating landmarks via DLT, aligning point clouds inside ICP, enforcing the internal constraints of estimated fundamental/essential matrices, and diagnosing degeneracies (planar scenes, pure rotation) by inspecting singular-value gaps. Being fluent in “the answer is the singular vector of the smallest singular value” unlocks a large fraction of multiple-view geometry.