The setup is as before: we are given a subspace and a vector . The questions are then:
- Is there a vector satisfying the property that for all ?
- If such a vector exists, is it unique?
As one might imagine from the previous section, the answer is “yes.” More precisely, the vector in we are looking for is exactly the projection of onto :
- Proof
- Write as . Let be an arbitrary vector, and let . Then , so one has This shows that the projection satisfies (LS1). However we have already shown that the projection of onto is unique, so (LS2) follows as well.
The vector is referred to as the least-squares approximation of by a vector in , because satisfies the property that , which is computed as a sum of squares of differences in coordinates, is minimized. This turns out to have an important application to finding the best approximation to a system of equations in the event no actual solution exists. We discuss this next.