It then follows that ∇f(x)=2MTa+2MTMx. Setting it to zero, we get the solution:
x∗=−(MTM)−1MTa
Note that Mx∗ is the projection of a onto the column space of M.
Thus the optimal value of x is the negative of the projection of a onto the column space of M. Ideally, if Mx were equal to −a, the norm of the sum would be zero. But that may not be possible if a is not in the column space of M. Simply said, the optimal value of x tries to get Mx as close as possible to −a.