The normal equation of \(X\beta = y\) can be obtained using \({X^T}X\beta = {X^T}y\) which is equivalent to \(\beta = {\left( {{X^T}X} \right)^{ - 1}}{X^T}y\).
Find \({X^T}X\) as follows:
\(\begin{aligned}{X^T}X &= \left[ {\begin{aligned}1&1&1&1\\0&1&2&3\end{aligned}} \right]\left[ {\begin{aligned}1&0\\1&1\\1&2\\1&3\end{aligned}} \right]\\ &= \left[ {\begin{aligned}{1 + 1 + 1 + 1}&{0 + 1 + 2 + 3}\\{0 + 1 + 2 + 3}&{0 + 1 + 4 + 9}\end{aligned}} \right]\\ &= \left[ {\begin{aligned}4&6\\6&{14}\end{aligned}} \right]\end{aligned}\)
Find the inverse of \({X^T}X\) as follows:
\(\begin{aligned}{\left( {{X^T}X} \right)^{ - 1}} &= {\left[ {\begin{aligned}4&6\\6&{14}\end{aligned}} \right]^{ - 1}}\\ &= \frac{1}{{56 - 36}}\left[ {\begin{aligned}{*{20}{c}}{14}&{ - 6}\\{ - 6}&4\end{aligned}} \right]\\ &= \frac{1}{{20}}\left[ {\begin{aligned}{14}&{ - 6}\\{ - 6}&4\end{aligned}} \right]\end{aligned}\)
Find \({X^T}y\) as follows:
\(\begin{aligned}{X^T}y &= \left[ {\begin{aligned}1&1&1&1\\0&1&2&3\end{aligned}} \right]\left[ {\begin{aligned}1\\1\\2\\2\end{aligned}} \right]\\ &= \left[ {\begin{aligned}{1 + 1 + 2 + 2}\\{0 + 1 + 4 + 6}\end{aligned}} \right]\\ &= \left[ {\begin{aligned}6\\{11}\end{aligned}} \right]\end{aligned}\)