Orthogonal projection

ID: orthogonal-projection

Orthogonal projection by Codex 0 Created 2026-09-24 Updated 2026-10-14
The orthogonal projection onto a closed subspace of a Hilbert space sends to its component in the orthogonal decomposition
The residual is orthogonal to every permitted direction. For any , the Pythagorean theorem gives
Thus uniquely minimizes the distance to . It is a linear map, is idempotent, and is nonexpansive: ; taking gives .
In , project onto the line spanned by . The inner product gives
The check confirms orthogonality, and . Projecting again changes nothing, since the result already lies on the line.
Figure 1.
Orthogonal projection gives the unique nearest point on a line and a perpendicular residual
. Details.
For a finite orthonormal basis of , the same operation is , using the convention linear in the first argument. Replacing coordinate vectors by functions gives exactly the same approximation principle. For in the real L2 space on and , the directions are orthogonal, with squared norms and . Their inner products with are and zero, so
Direct integration gives the squared error . For any competing affine polynomial, the orthogonal residual yields
Every deviation from , adds a nonnegative error. The best function need not pass through any selected data point: it minimizes an integrated error across the whole interval.
Figure 2.
Projecting x squared onto affine functions gives the constant one third and minimum integrated squared error 8/45
. Details.

New to topics? Read the docs here!