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