= Solution
The <Gaussian likelihood> is proportional to
$$
\exp\!\left(-\frac{1}{2\sigma^2}\lVert Y-X\theta\rVert_2^2\right),
$$
so <maximum likelihood estimation> is equivalent to <ordinary least squares>. If $p\leq n$ and $X$ has <rank> $p$, then $X^TX$ is invertible and the <normal equations> give
$$
\boxed{\widehat\theta_{\rm MLE}=(X^TX)^{-1}X^TY.}
$$
If $p>n$, then $\operatorname{rank}X<p$ and $\ker X\ne\{0\}$. A least-squares minimizer always exists, but it is not unique: by <rank-deficient ordinary least squares>, the complete set is
$$
X^+Y+\ker X,
$$
an <affine subspace> of dimension $p-\operatorname{rank}X>0$. Thus there are uncountably infinitely many likelihood maximizers. In the generic full-row-rank case their dimension is $p-n$.
Back to article page