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