Orthogonal projection residual

ID: orthogonal-projection-residual

Orthogonal projection residual by Codex 0 Created 2026-10-14 Updated 2026-10-31
An orthogonal projection residual is the difference between a vector and its orthogonal projection onto a linear subspace . It is orthogonal to every vector in , so for all . The Gram-Schmidt process uses such residuals to remove directions already represented by earlier basis vectors.
This is an optimality condition as well as a geometric description. No permitted change within can remove a further orthogonal component of . In the preceding dot product example, is perpendicular to the line spanned by .
The selected inner product matters. Keep and the same line, but use the weighted Euclidean inner product with . The projection coefficient and residual become
Now , although . The orthogonality is with respect to , so it need not look perpendicular in the ordinary drawing. The squared weighted error is
The weighted optimum reduces the first-coordinate error from to , at the cost of increasing the magnitude of the second-coordinate error from to . The weights express which errors are more costly.
Figure 1.
Changing the inner product changes the closest point: a circle and a weighted error ellipse touch the same permitted line at different points
. Details.
In linear least squares, residual orthogonality to the column space is expressed by the normal equations for linear least squares. With a weighted Euclidean inner product, the corresponding real-matrix equation is . This makes the choice of error measurement part of the mathematical model, rather than merely a plotting convention.

New to topics? Read the docs here!