Theorem (normal equations)

$\v c^\ast\in \R^m$ is the solution to the least squares problem iff it solves the normal equations $$ \begin{align*} A^TA\v c^\ast = A^T \v y. \end{align*} $$ $A^TA$ is called the Gram matrix, and $\v c^\ast$ is the normal solution.

Moreover if $A$ has full rank, then $\v c^\ast = (A^T A)\inv A^T \v y$ is unique.

Proof