Given a target vector and a feature vector, how to computer the weight In page 13 of the slide, given $t$ and $X$ as following. I don't understand how we get $w$. 

$$t=[t^{(1)},t^{(2)}, \ldots, t^{(N)} ]^T$$
$$X=\begin{bmatrix}1, x^{(1)} \\ 1, x^{(2)} \\ \vdots\\1, x^{(N)} \end{bmatrix}$$


Then:


$$w=(X^TX)^{-1}X^Tt$$
The least square problem is to minimize $$\|Xw-t\|^2$$

Differentiating it with respect to $w$ and equating it to $0$, we have 

$$2X^T(Xw-t)=0$$

Hence, we have

$$X^TXw-X^Tt=0$$

That is $$X^TXw=X^Tt$$

$$w=(X^TX)^{-1}X^Tt$$