Solve where has size .

Because we use the 2-norm, the solution is found when (Pythagorean theorem).

This is equivalent to the equation

See dot product and orthogonality.

This equation is a linear equation in with a square matrix .