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