The residual is zero when we reach the minimum of the quadratic equation \begin{equation*} P(\hat{x})=\frac{1}{2}\hat{x}^T\hat{A}\hat{x} - \hat{x}^T\hat{b}, \end{equation*}
with the constraint that the matrix \hat{A} is positive definite and symmetric. This defines also the Hessian and we want it to be positive definite.