Processing math: 100%

The geometry of the normal equations

Oct 17, 2018

In this article, I show that the normal equations define the orthogonal projection of a vector onto a linear subspace.

Setup

Let S be a vector space and XS a linear subspace. Let X be a matrix whose column vectors are a basis for X, i.e. X=Mspan(X). Each vector in X can be expressed as a linear combination of the column vectors in X:

vX,w:v=Xw

The orthogonal projection

Given a vector yS, the orthogonal projection of y onto X is the vector y in X such that the residual y=yy// is orthogonal to every vector in X:

  1. (y)X,
  2. y=(y)+(y),
  3. wS,(y)(Xw).

Solving the equations

A vector v is orthogonal to every vector in X if and only if Xv=0, hence we are looking to solve the following equation:

X(y)=0X(yy)=0

Since (y)X, we can find a vector wS such that:

y=Xw

So the equation to be solved is:

X(yXw)=0

Which is the matrix form of the normal equations.