Read this lesson as text
Computing Projections
Linear Algebra (Matrices) · Axiom Academy
EXAMPLE Projecting a Vector onto a Subspace Project onto with an orthogonal basis, then check the residual is perpendicular to W . Let where and . Project onto W using , then find the residual and confirm and . Nice work! You projected a vector onto a 2-dimensional subspace and confirmed the leftover is perpendicular to it. The key moves: Orthogonal basis first: the formula only works because — each direction is handled independently. Each coefficient is a ratio: scales by how much of points along it. Result: is the closest point in W to . Orthogonality check: satisfies , so it is orthogonal to all of W . This decomposition into a part in W plus a part orthogonal to W is exactly what powers least-squares solutions.
This is the written version of the interactive lesson above. See the full Linear Algebra (Matrices) course.