LU factorisation as recorded Gaussian elimination, permutations (PA = LU), solving systems with forward and back substitution, LDU and Cholesky; the singular value decomposition, how to compute it from AᵀA, its geometric meaning, rank, matrix norms and condition number, the Eckart–Young low-rank approximation, the pseudo-inverse, and the link to PCA.
Gaussian elimination without row swaps factors a square matrix as
A=LU,
where U is the upper-triangular result of elimination and L is unit lower triangular holding the multipliers: ℓij is the multiple of row j subtracted from row i.
Solving with LU
Ax=b⟺L(Ux)=b:
Forward substitution: solve Ly=b.
Back substitution: solve Ux=y.
Factoring costs 32n3 once; each new right-hand side then costs only 2n2. This is why libraries factor once and solve many times.
Pivoting and variants
If a zero pivot appears, swap rows: PA=LU with a permutation matrix P. Every invertible matrix has such a factorisation; partial pivoting also improves numerical stability.
An LU factorisation without pivoting exists iff all leading principal minors are non-zero.
LDU: factor the pivots out of U: A=LDU with both triangular factors unit-diagonal; for symmetric A, A=LDL⊤.
Cholesky: a symmetric positive definite A factors as A=LL⊤ (about half the work of LU, no pivoting needed). Its existence is itself a test for positive definiteness.
Singular value decomposition
Every real m×n matrix factors as
A=UΣV⊤=i=1∑rσiuivi⊤,
U (m×m) orthogonal — left singular vectors, eigenvectors of AA⊤;
V (n×n) orthogonal — right singular vectors, eigenvectors of A⊤A;
Σ (m×n) diagonal with σ1≥σ2≥⋯≥σr>0, the singular values, σi=λi(A⊤A), and r=rankA.
Computing it by hand
Form A⊤A; find its eigenvalues λi and orthonormal eigenvectors vi.
σi=λi.
ui=Avi/σi for each non-zero σi (complete to an orthonormal basis if needed).
Geometry
Any linear map is a rotation/reflection (V⊤), then an axis-aligned stretch (Σ), then another rotation/reflection (U). The unit sphere maps to an ellipsoid whose semi-axes have lengths σi along ui.
A = UΣVᵀ: rotate, scale along the axes, rotate again.
What the SVD gives you
Quantity
In terms of singular values
Rank
number of non-zero σi
Spectral norm ∥A∥2
σ1
Frobenius norm ∥A∥F=∑aij2
∑σi2
∣detA∣ (square)
∏σi
Condition number
κ=σ1/σn
Bases of the four subspaces
v1..vr: row space; vr+1..vn: null space; u1..ur: column space; ur+1..um: left null space
Low-rank approximation (Eckart–Young)
The best rank-k approximation to A — in both the spectral and Frobenius norms — is the truncated SVD
Used for image compression, latent semantic analysis, recommender systems (matrix factorisation) and denoising. Storing Ak takes k(m+n+1) numbers instead of mn.
Pseudo-inverse
A+=VΣ+U⊤,Σ+=diag(1/σ1,…,1/σr,0,…).
A+b is the least-squares solution of Ax≈b with the smallest norm. If A has full column rank, A+=(A⊤A)−1A⊤; if A is invertible, A+=A−1.
SVD and PCA
For a centred data matrix X (n samples × p features), the covariance is n−11X⊤X=Vn−1Σ2V⊤. So the principal directions are the right singular vectors vi, the variance explained by each is σi2/(n−1), and the principal component scores are XV=UΣ. Libraries compute PCA via the SVD of X for numerical stability. See PCA.
Quick revision
Practice questions
GATE-style questions: 3 one-mark and 7 two-mark. Wrong MCQs cost ⅓ of their marks in the real exam; MSQ and NAT have no negative marking. Attempt each before opening the solution.
Q1NAT2 marks
A=(2437)=LU with L unit lower triangular and U upper triangular. The entry u22 of U is ______.
Q2NAT2 marks
The largest singular value of (3405) is ______ (round to two decimals).
Q3MCQ1 mark
The number of non-zero singular values of a matrix equals its
Q4NAT2 marks
A=diag(5,3,1). The Frobenius-norm error ∥A−A1∥F of the best rank-1 approximation A1 is ______ (round to two decimals).
Q5MSQ2 marks
Which statements about the singular value decomposition A=UΣV⊤ of a real m×n matrix are true?
One or more options are correct.
Q6NAT1 mark
The spectral norm ∥A∥2=max∥x∥=1∥Ax∥ of A=(1221) is ______.
Q7MCQ2 marks
Gaussian elimination without row exchanges applied to A=(0111)
Q8NAT2 marks
The 2-norm condition number κ(A)=σmax/σmin of A=diag(10,0.1) is ______.
Q9NAT2 marks
A=LU with L=(1301) and U=(2014). Then detA is ______.