







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








A topic-by-topic guide covering Gaussian elimination, QR factorisation, iterative methods,
least squares, the singular value decomposition, and eigenvalue problems — with full
derivations, proofs, and worked examples throughout.
Original study notes — independently written summary and explanation
To solve Ax=b for invertible A, the main idea is to write A=MN, then solve My=b for y and
Nx=y for x, choosing M and N (typically triangular) so both solves are cheap. Gaussian
elimination is precisely LU factorisation: A=LU, with L unit lower triangular (1s on the
diagonal) and U upper triangular.
Lemma: if L is unit lower triangular with non-zero entries below the diagonal only in column
k, then L ¹ has the same form with (L ¹)ᵢ⁻ ⁻ ₖ = −Lᵢ ₖ for i>k. Proof: writing L=I+u·e ᵀ, one checksₖ
directly that (I−u·e ᵀ)(I+u·e ᵀ)=I. A second lemma shows that the product of two suchₖ ₖ
elementary matrices with disjoint non-zero column ranges again has the expected combined
form — this is the key algebraic fact that lets Gaussian elimination's sequence of row
operations, L(n-1) ⋯L₂L₁A=U, be inverted directly to give A=L₁ ¹ ⁻ ⋯ L(n-1) ¹U=LU with L again ⁻
unit lower triangular.
Algorithm LU computes L,U with A=LU by, for each column k=1,...,n−1, computing
multipliers ℓ =u /uⱼₖ ⱼₖ ₖₖand updating the remaining rows. Once A=LU, solving Ax=b proceeds
in two cheap steps: forward substitution (FS) solves Ly=b, and back substitution (BS) solves
Ux=y.
Worked example: for A=[[2,1,0],[4,3,3],[6,7,8]], b=(4,10,24)ᵀ, LU factorisation gives
L=[[1,0,0],[2,1,0],[3,4,1]], U=[[2,1,0],[0,1,3],[0,0,−4]]. Forward substitution gives y=(4,2,4)ᵀ;
back substitution then gives x=(−1/2, 5, −1)ᵀ.
The cost of LU factorisation is C(n) = (2/3)n³ + (1/2)n² − (7/6)n = O(n³), derived by summing
the multiplication/subtraction/division costs of the inner and outer loops using the standard
formulas for Σℓ and Σℓ². The cost of back substitution is C(n)=n²=O(n²) — negligible by
comparison, so Gaussian elimination overall costs C(n) = (2/3)n³ + O(n²) = O(n³).
Plain Gaussian elimination (without pivoting) is unstable: dividing by a very small pivot
amplifies machine epsilon dramatically. Worked example: for A=[[10 ² ,1],[1,1]], the exact⁻ ⁰
LU factors involve entries of size 10² ; in floating point arithmetic, catastrophic cancellation⁰
means the computed L
h Û does not equal A at all — a striking demonstration that naive
Gaussian elimination can fail completely even for a well-conditioned, simple 2×2 matrix.
A permutation matrix P has exactly one 1 in each row and column; P·A swaps the rows of A,
PᵀP=I (P is orthogonal). GEPP swaps rows at each step to bring the largest available entry
(in absolute value) to the pivot position, avoiding division by small numbers. This produces a
factorisation PA=LU, with L unit lower triangular, U upper triangular, P a permutation matrix.
The correctness of PA=LU (rather than just A=LU as before) follows by tracking how each
elementary elimination matrix commutes with each subsequent permutation: the product
L₃P₃L₂P₂L₁P₁A=U can be rewritten, using PPᵀ=I repeatedly to move all the permutations to
the front, as L₃′L₂′L₁′·PA=U for appropriately conjugated L′ᵢ — each still unit lower triangular
— giving PA=(L₃′L₂′L₁′) ¹U=LU.⁻
Algorithm GEPP: (1) find PA=LU using LUPP; (2) solve Ly=Pb using FS; (3) solve Ux=y
using BS. The additional cost of pivoting (finding the maximum of n−k+1 numbers, at each of
n−1 steps) is O(n²) — negligible against the O(n³) cost of LU itself, giving overall cost C(n) =
(2/3)n³ + 3n² − (5/3)n for GEPP.
Definition: an algorithm to solve Ax=b is backward stable if the computed xh exactly solves a
nearby problem, (A+∆A)xh=b+∆b, with ‖∆A‖p/‖A‖p + ‖∆b‖p/‖b‖p ≤ α·ε ₘfor α independent of A
and b.
Theorem: GEPP is backward stable, with ‖∆A‖∞/‖A‖∞ ≤ p(n)·2^(n-1)·ε ₘ, where p(n) is a low-
degree (cubic) polynomial. The factor 2^(n-1) is a worst-case growth bound — in practice
GEPP is reliable for essentially all matrices encountered, but this shows the theoretical
guarantee is weaker than one might hope.
Definition: the condition number of A ∈ℝ^(n×n) with respect to the p-norm is κp(A) =
‖A‖p·‖A ¹‖p if A is invertible, and ∞ otherwise. A is badly conditioned if κp(A) is large; always⁻
κp(A)≥1.
Theorem: if ‖∆A‖p/‖A‖p < 1/κp(A), then ‖x−xh‖p/‖x‖p ≤ κp(A)·[‖∆A‖p/‖A‖p] /
[1−κp(A)‖∆A‖p/‖A‖p] — the relative error in the solution is controlled by the condition number
times the relative perturbation.
Theorem: for A with real eigenvalues |λ₁|≥...≥|λ | and orthonormal eigenvectors, κ₂(A) = |λ₁|/|ₙ
λ | = |λmax|/|λmin| (requires A normal, AᵀA=AAᵀ — holds e.g. for symmetric matrices). Thisₙ
follows from proving ‖A‖₂=|λ₁|: writing any x as x=Σcᵢxᵢ in the eigenbasis, ‖Ax‖₂² = Σ(λᵢcᵢ)², so
‖A‖₂ = max over x ‖Ax‖₂/‖x‖₂ is maximised by concentrating all weight on the dominant
eigenvector, giving exactly |λ₁|.
reflection property of H₁, and the inductive step follows because the leading (k−1)×(k−1)
block is untouched by Q , while the trailing block gains the needed zero structure.ₖ
Lemma 2: each Q ₖ is both orthogonal and symmetric, since Q ᵀ=Qₖ ₖ (as H ₖis symmetric by
construction) and Q ᵀQₖ ₖ = I follows directly from H ᵀHₖ ₖ= (I−2wwᵀ)² = I − 4wwᵀ + 4w(wᵀw)wᵀ
= I (using ‖w‖₂=1). Combining both lemmas: Q(n-1) ⋯Q₁A=R, and since each Q ₖis both
orthogonal and symmetric, A = Q₁ ⋯Q(n-1)R = QR with Q=Q₁ ⋯Q(n-1) orthogonal.
Computational cost of Householder QR is C(n) = (8/3)n³ + O(n²) — more expensive than
MGS's 2n³ + O(n²), but with markedly better stability guarantees. Cost of SQR overall is C(n)
= (4n³)/3 + O(n²) once the y=Qᵀb computation is folded efficiently into the reflection steps
(replacing the need to form Q explicitly), compared to (2/3)n³ for GEPP.
Theorem (backward stability of SQR): the computed xh satisfies (A+∆A)xh=b with ‖∆A‖₂/‖A‖₂ ≤
α·n^(3/2)·ε ₘ— the same style of bound as GEPP, but with n^(3/2) replacing GEPP's worst-
case 2ⁿ growth factor, making Householder QR a genuinely more robust (if more expensive)
alternative for solving square linear systems.
Direct methods (GEPP, SQR) have a fixed O(n³) cost and don't exploit sparsity (many zero
entries). Iterative methods instead approximate the solution, starting from an initial guess x
and generating a sequence x →x, using a splitting A=M+N with M chosen (diagonal orₖ
triangular) so that Mx=y is cheap to solve. Algorithm GI: while ‖Ax −b‖p > εᵣ, computeₖ
y =b−Nxₖ ₖ₋₁ and solve Mx =y. ₖ ₖ
Convergence theorem: if the error satisfies e ₖ = Rᵏe₀ for R=−M ¹N, and ‖R‖p<1, then e →0⁻ ₖ
as k→∞ — proved directly from ‖e ‖p = ‖Rᵏe₀‖p ≤ ‖R‖p^k·‖e₀‖p → 0.ₖ
Writing A=D+L+U (diagonal, strictly lower, strictly upper triangular), Jacobi takes M=D,
N=L+U. Algorithm JAC: compute y =b−(L+U)xₖ ₖ₋₁, solve Dx =y ₖ ₖ(trivial, since D is diagonal).
Theorem: if A is (strictly) diagonally dominant, |aᵢᵢ| > Σ(j≠i)|aᵢ |, then the Jacobi methodⱼ
converges. Proof: R=−D ¹(L+U) has entries rᵢ =−aᵢ /aᵢᵢ (i≠j), 0 (i=j), so ‖R‖∞ = max over i Σ(j≠i)⁻ ⱼ ⱼ
|aᵢ |/|aᵢᵢ| < 1 exactly by the diagonal dominance assumption.ⱼ
Computational cost: CJAC(n,kmax) = (2n²+2n)·kmax = O(n²kmax) — better than direct
methods provided kmax not small — a concrete illustration of why the residual term in the theorem matters in
practice, not just in the abstract bound.
Using the (reduced) SVD A=U₁Σ₁Vᵀ, LSQ-SVD is more expensive than LSQ-QR but the
most numerically stable option, particularly useful when A is close to rank-deficient.
Algorithm: (1) compute the reduced SVD; (2) compute z=U₁ᵀb; (3) solve Σ₁y=z (trivial,
diagonal); (4) compute x=Vy. Verification: AᵀAx = VΣ₁U₁ᵀU₁Σ₁Vᵀx = VΣ₁Σ₁y = VΣ₁z = VΣ₁U₁ᵀb
= Aᵀb — confirming the normal equations are satisfied exactly.
A Singular Value Decomposition of A ∈ℝ^(m×n) is a factorisation A=UΣVᵀ, with U ∈ℝ^(m×m)
orthogonal, V ∈ℝ^(n×n) orthogonal, and Σ ∈ℝ^(m×n) diagonal with entries σ₁≥...≥σ_p≥0,
p=min(m,n) — the singular values of A. Columns of U (uᵢ) are the left singular vectors;
columns of V (vᵢ) are the right singular vectors. A SVD always exists.
Geometrically, A maps the unit sphere in ℝⁿ to an ellipsoid in ℝᵐ, with the singular values
giving the lengths of the ellipsoid's principal semi-axes, and the left singular vectors giving
their directions.
From A=UΣVᵀ: AV=UΣVᵀV=UΣ, so column-by-column, Avᵢ=σᵢuᵢ. Similarly UᵀA=UᵀUΣVᵀ=ΣVᵀ,
giving Aᵀuᵢ=σᵢvᵢ. Combining these: AᵀAvᵢ = σᵢAᵀuᵢ = σᵢ²vᵢ — the right singular vectors are
exactly the eigenvectors of AᵀA, with eigenvalues σᵢ² (and xᵀAᵀAx=‖Ax‖₂²≥0 confirms AᵀA is
positive semi-definite, consistent with real non-negative σᵢ²).
Theorem: for A ∈ℝ^(m×n), ‖A‖₂ = σmax = max over i σᵢ. Proof: writing ‖UΣVᵀx‖₂ = ‖ΣVᵀx‖₂
(using orthogonality of U), and substituting y=Vᵀx (so x=Vy, ‖x‖₂=‖y‖₂ since V is orthogonal),
gives ‖A‖₂ = max over y ‖Σy‖₂/‖y‖₂ = max over y √(Σσᵢ²yᵢ²/Σyᵢ²), which is bounded above and
below by σmax, with equality achieved by taking y to be the standard basis vector
corresponding to the largest σᵢ.
(For symmetric A, AᵀAvᵢ=σᵢ²vᵢ and A²vᵢ=λᵢ²vᵢ together give σᵢ=|λᵢ| directly.) It can similarly be
shown that ‖A ‖₂ = 1/σ_min.⁺
Theorem: κ₂(A) = σmax/σ_min. Proof: if rank(A) decomposition Z ᵏ =QR (QᵀQ=I) — without this re-orthogonalisation step, all columns of Z ᵏ⁽ ⁾ ⁽ ⁾
would converge to the same dominant eigenvector direction; with it, the columns of Q
converge instead to approximate the full set of eigenvectors of A.
This guide was written independently as a personal revision resource, condensing and
explaining the core concepts and derivations covered across a Numerical Linear Algebra
module. It is intended to support understanding and exam preparation rather than to replace
engagement with the original course material.