Solution (source code)

= Solution

With $\Sigma=I_d$, constrained likelihood maximization minimizes $\|\theta-\overline X\|^2$. On the <unit sphere> this is $1+\|\overline X\|^2-2\theta^T\overline X$. By the <Cauchy-Schwarz inequality> its minimizer is
$$
\boxed{\widehat\theta=\frac{\overline X}{\|\overline X\|}\quad\text{if }\overline X\ne0.}
$$
If $\overline X=0$, every <unit vector> is a <maximum-likelihood estimator>; a specified measurable tie-breaking choice makes an estimator defined everywhere. This event has probability zero in the nonsingular normal model, but the optimization still has that exceptional case.