Show, using matrix notation and staring with the principle of least squares, that the least squares estimator of $\beta$ is given by:
$\hat\beta =$ $\frac{\sum_{i=0}^nx_iy_i}{\sum_{i=0}^n x_i^2}$
I'm not even sure how to start this problem. Would anyone be willing to help me start to solve it?
The OLS in matrix notations is $$ \hat{\beta} = (X^TX)^{-1}X^Ty, $$ where the design matris is $n\times 1$ matrix of the following form $$ X=\begin{pmatrix} x_1\\ x_2\\ \vdots\\ x_n \end{pmatrix}, $$ and $$ y=\begin{pmatrix} y_1\\ y_2\\ \vdots\\ y_n \end{pmatrix}. $$ Hence $$ X^TX = \sum_{i=1}^nx_i^2 \to(X^TX)^{-1}=\frac{1}{\sum_{i=1}^nx_i^2}, $$ and $$ X^Ty=\sum_{i=1}^nx_iy_i, $$ thus $$ \hat{\beta} = \frac{\sum_{i=1}^nx_iy_i}{\sum_{i=1}^nx_i^2}. $$