Answer
The equation of the least squares line associated with the given set of data points is $y=\frac{6}{5}x+\frac{7}{5}$
Work Step by Step
The matrices can be formed as:
$A=\begin{bmatrix}
0& 1 \\
1& 1 \\
2 & 1\\
4 & 1
\end{bmatrix} \rightarrow A^T=\begin{bmatrix}
0& 1&2&4 \\
1 & 1&1 &1\\\end{bmatrix}$
$x=\begin{bmatrix}
a \\
b \\
\end{bmatrix}$
$b=\begin{bmatrix}
3\\
-1\\
6 \\
6
\end{bmatrix}$
Apply matrices to the least square solution:
$x_0=(A^TA)^{-1}A^Tb$
$=(\begin{bmatrix}
0& 1&2&4 \\
1 & 1&1 &1\\\end{bmatrix}\begin{bmatrix}
0& 1 \\
1& 1 \\
2 & 1\\
4 & 1
\end{bmatrix})^{-1}\begin{bmatrix}
0& 1&2&4 \\
1 & 1&1 &1\\\end{bmatrix} \begin{bmatrix}
3\\
-1\\
6 \\
6
\end{bmatrix}$
$=\begin{bmatrix}
21 &7\\
7&4
\end{bmatrix}^{-1}\begin{bmatrix}
0& 1&2&4 \\
1 & 1&1 &1\\\end{bmatrix}\begin{bmatrix}
3\\
-1\\
6 \\
6
\end{bmatrix}$
$=\frac{1}{35}\begin{bmatrix}
4 & -7 \\
-7& 21
\end{bmatrix}\begin{bmatrix}
0& 1&2&4 \\
1 & 1&1 &1\\\end{bmatrix}\begin{bmatrix}
3\\
-1\\
6 \\
6
\end{bmatrix}$
$=\frac{1}{35}\begin{bmatrix}
-7 &-3&1&9 \\
21& 14 &7&-7
\end{bmatrix}\begin{bmatrix}
3 \\
-1 \\ 6 \\ 6
\end{bmatrix}$
$=\frac{1}{35}\begin{bmatrix}
42 \\
49
\end{bmatrix}$
$=\begin{bmatrix}
\frac{6}{5} \\
\frac{7}{5}
\end{bmatrix}$
The equation of the least squares line associated with the given set of data points is $y=\frac{6}{5}x+\frac{7}{5}$