Orthogonal Projection
Every vector can be split uniquely into two pieces: one piece inside a subspace , and one piece in . This decomposition (with , ) is guaranteed to exist and be unique — this is the Orthogonal Projection Theorem.
Given an orthonormal basis for , the projection is computed as (apply weight finding to all of , not just vectors in ). The perpendicular piece is . The key fact is that : you can verify .
The component is called the orthogonal projection of onto , written . The matrix is called the projection matrix for . Importantly, does not depend on the choice of orthonormal basis — any orthonormal basis for gives the same .
Formal View
For the 1D case with : .
Interactive Visualization
Orthogonal Projection
Why This Matters
Orthogonal projection is the mathematical foundation of every "best fit" calculation in science and engineering.
- Least-squares regression: the best-fit line projects the response vector onto the column space of the design matrix
- Gram-Schmidt orthogonalization is repeated projection: each new vector is projected away from the previous ones
- Computer graphics: projecting 3D objects onto a 2D screen, or a viewpoint onto a surface normal
- Signal denoising: projecting a noisy signal onto the subspace of "smooth" signals removes the high-frequency noise component
Quiz
The projection matrix satisfies
The orthogonal projection of onto is always inside .
For a 1D subspace , the projection of onto is:
Common Mistakes
- Computing for a matrix whose columns are NOT orthonormal — the formula only works with orthonormal columns.
- Thinking the projection matrix is the identity — only fixes vectors already in ; it sends others to their projection.
- Confusing the projection with the error .