Monash University · FACULTY OF MATHEMATICS

MTH2021 · Linear Algebra with Applications

- one subject, every graph, every model, every mark
Mathematics14 Chapters7-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 10 of 13 · MTH2021

Gram-Schmidt, Projection & Least Squares

Weeks 9–10 turn any basis into an orthonormal one via the Gram–Schmidt process, project vectors onto subspaces with the projection theorem, and solve overdetermined systems by least squares. The normal equations AᵀAx = Aᵀb (always consistent) give the best fit, and the same idea fits lines and polynomials to data. The Fundamental Theorem of Linear Algebra (row(A)^⊥ = ker(A)) ties it together. This is heavily examined in the comprehensive 50% final.

In this chapter

What this chapter covers

  • 01Orthogonal and orthonormal sets; an orthogonal set of nonzero vectors is automatically linearly independent
  • 02Gram–Schmidt process: v₁ = u₁, then vₖ = uₖ − Σ_{i
  • 03Projection Theorem: every u = w + w^⊥ with projᵥᵥ u = Σⱼ ⟨u, vⱼ⟩ vⱼ for an orthonormal basis of W
  • 04V = W ⊕ W^⊥; every finite-dimensional inner product space has an orthonormal basis
  • 05Fundamental Theorem of Linear Algebra: row(A)^⊥ = ker(A); ℝⁿ = row(A) ⊕ ker(A), ℝᵐ = col(A) ⊕ coker(A)
  • 06Closest-point / least-squares problem: minimise ‖b − Ax‖; the error vector is b − Ax
  • 07Normal equations AᵀAx = Aᵀb are always consistent; AᵀA invertible ⇔ A has independent columns
  • 08Data fitting: line y = a + bx and polynomial fits via MᵀMv = Mᵀy
Worked example · free

Gram–Schmidt in ℝ² producing an orthonormal basis

Q [4 marks]. Apply the Gram–Schmidt process to u₁ = (1, −3) and u₂ = (2, 2) in ℝ² (Euclidean inner product) to produce an orthonormal basis. (4 marks)
  • +1Take v₁ = u₁ = (1, −3). Its squared norm is ‖v₁‖² = 1² + (−3)² = 1 + 9 = 10.
  • +1Compute the projection coefficient: ⟨u₂, v₁⟩ = (2)(1) + (2)(−3) = 2 − 6 = −4, so ⟨u₂, v₁⟩/‖v₁‖² = −4/10 = −0.4.
  • +1Subtract the projection: v₂ = u₂ − (−0.4)v₁ = (2, 2) + 0.4·(1, −3) = (2.4, 0.8). Check orthogonality: ⟨v₂, v₁⟩ = 2.4·1 + 0.8·(−3) = 2.4 − 2.4 = 0 ✓. Note (2.4, 0.8) = 0.8·(3, 1), so v₂ ∝ (3, 1).
  • +1Normalise. ‖v₁‖ = √10 and ‖(3,1)‖ = √10, so e₁ = (1/√10)(1, −3) and e₂ = (1/√10)(3, 1). These are orthonormal: each has length 1 and ⟨e₁, e₂⟩ = (1·3 + (−3)·1)/10 = 0 ✓.
An orthonormal basis is e₁ = (1/√10)(1, −3) and e₂ = (1/√10)(3, 1). (The Gram–Schmidt vector v₂ = (2.4, 0.8) is parallel to (3, 1), which is the neat direction orthogonal to (1, −3).)
Sia tip — Do NOT normalise v₁ before using it — Gram–Schmidt subtracts the projection using ⟨uₖ, vᵢ⟩/‖vᵢ‖², and normalising midway just adds arithmetic. After each subtraction, check ⟨vₖ, vᵢ⟩ = 0 before moving on; a nonzero dot product means an error upstream. Normalise all the vectors only at the very end.
Glossary

Key terms

Orthonormal set
A set of mutually orthogonal unit vectors; any orthogonal set of nonzero vectors is linearly independent, and normalising gives an orthonormal one.
Gram–Schmidt process
An algorithm that converts a basis {u₁, …, uₙ} into an orthogonal (then orthonormal) basis by vₖ = uₖ − Σ_{i
Orthogonal projection
projᵥᵥ u = Σⱼ ⟨u, vⱼ⟩vⱼ for an orthonormal basis of W; it is the closest point of W to u, and u − projᵥᵥ u lies in W^⊥.
Projection Theorem
Every vector u splits uniquely as u = w + w^⊥ with w ∈ W and w^⊥ ∈ W^⊥; equivalently V = W ⊕ W^⊥.
Normal equations
AᵀAx = Aᵀb, the always-consistent system whose solutions are the least-squares solutions of Ax = b; AᵀA is invertible iff A has linearly independent columns.
Fundamental Theorem of Linear Algebra
The orthogonality relations row(A)^⊥ = ker(A) and col(A)^⊥ = coker(A), giving ℝⁿ = row(A) ⊕ ker(A) and ℝᵐ = col(A) ⊕ coker(A).
FAQ

Gram-Schmidt, Projection & Least Squares FAQ

Do I normalise during Gram–Schmidt or at the end?

At the end. Run the subtraction step vₖ = uₖ − Σ (⟨uₖ, vᵢ⟩/‖vᵢ‖²)vᵢ with the un-normalised orthogonal vectors, checking orthogonality after each one, and only divide by the norms once all the vₖ are found. Normalising midway is allowed but just multiplies the arithmetic.

Why are the normal equations always solvable?

Because AᵀAx = Aᵀb is exactly the condition that Ax equals the orthogonal projection of b onto col(A), and that projection always exists. So even when Ax = b has no solution, the least-squares problem does. If A has independent columns, AᵀA is invertible and the solution x = (AᵀA)⁻¹Aᵀb is unique.

What is least squares actually minimising?

The length of the error vector ‖b − Ax‖. Geometrically the best x makes Ax the point of col(A) closest to b, so the error b − Ax is orthogonal to col(A) — which is precisely Aᵀ(b − Ax) = 0, i.e. the normal equations. That is why projection and least squares are the same idea.

How does line/polynomial fitting use this?

You write the model as Mv = y, where each row of M holds the basis functions evaluated at a data point (for a line, rows [1, xᵢ]; for a polynomial, a Vandermonde row). Then you solve the normal equations MᵀMv = Mᵀy for the coefficients v. The result is the best-fit line or curve in the least-squares sense.

How central is this to the exam?

Very. Weeks 9–10 land after Test 2's window, so Gram–Schmidt, projection and least squares are assessed mainly in the comprehensive 50% final, and they are among its most reliable computation-and-proof topics. Expect both a numerical fit and a projection-theorem or Fundamental-Theorem argument.

Study strategy

Exam move

Drill Gram–Schmidt with the un-normalised orthogonal vectors, checking ⟨vₖ, vᵢ⟩ = 0 after every step and normalising only at the end. For least squares, always build AᵀA and Aᵀb first and solve the small square system rather than the tall one, and practise the line-of-best-fit setup Mv = y → MᵀMv = Mᵀy. Rehearse the projection-theorem and Fundamental-Theorem-of-Linear-Algebra proofs, since these are exam-favoured. This material is examined mainly in the 50% final. When a Gram–Schmidt vector fails the orthogonality check, ask Sia to trace the projection subtraction.

Working through Gram-Schmidt, Projection & Least Squares in MTH2021? Sia is AskSia’s AI Mathematics tutor — ask any MTH2021 Gram-Schmidt, Projection & Least Squares question and get a clear, step-by-step explanation grounded in how MTH2021 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 14 of your Monash University subjects - and 1,000+ Bibles across every Australian university.
Sia - your MTH2021 tutor, unlimited, worked the way the exam marks it
The full 7-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$25/ month
30-day money-back · cancel in one tap · how it works
MTH2021 · Linear Algebra with Applications - independent study guide on the AskSia Library. More Monash University subjects · Microeconomics across all universities
Unlock the full MTH2021 Bible + 14 Monash University subjects解锁完整 MTH2021 Bible + Monash University 14 门科目
$25/mo