= Solution
Assume $S_{xx}=\sum_i x_i^2>0$, which is necessary to identify the slope in <linear regression through the origin>. The joint normal likelihood has logarithm, apart from a constant,
$$
\ell(\beta,\sigma^2)=-\frac n2\log\sigma^2-\frac1{2\sigma^2}\sum_i(Y_i-\beta x_i)^2.
$$
Complete the square in $\beta$. With $\widehat\beta=\sum_i x_iY_i/S_{xx}$ and $\mathrm{RSS}=\sum_i(Y_i-\widehat\beta x_i)^2$,
$$
\sum_i(Y_i-\beta x_i)^2=\mathrm{RSS}+S_{xx}(\beta-\widehat\beta)^2.
$$
The <maximum likelihood estimation> therefore first minimizes at $\widehat\beta$; differentiating in $\sigma^2$ then maximizes at
$$
\boxed{\widehat\beta=\frac{\sum_i x_iY_i}{S_{xx}},\qquad \widehat\sigma^2=\frac{\mathrm{RSS}}n.}
$$
This is a genuine finite maximum when $\mathrm{RSS}>0$. If all $x_i=0$, the slope is unidentifiable. If $\mathrm{RSS}=0$, the likelihood is unbounded as $\sigma^2\downarrow0$, so no positive-variance maximum exists. For nonzero design and $n\geq2$, zero residual has probability zero under the stated positive-variance model.
Back to article page