Hence we can minimize
Expanding this, we have:
This is quadratic in , hence it has a global minimum which we can find by taking the derivative, setting it to zero, and solving for . Doing this yields:
These are the famous normal equations whose solution is given by:
The matrix
is known as the pseudo-inverse of the matrix .