*Additional question (to be turned in)
Consider the points (0,1), (1, 1), (2, 2), (3, 2) in the plane. One wants to find the "best line" that
fits these data points. If that line were $y = mx + b$, then if the points actually sat all of this line, we
would have
$0m + b = 1$
$1m + b = 1$
$2m + b = 2$
$3m + b = 2$
(We get these equations just by plugging in each point into $y = mx + b$.)
However, this is an inconsistent system of linear equations because all of the points don't line on
a single line. Instead, we should find the least square solution to the equation.
(a) Rewrite the above system of linear equations as a matrix equation $A \begin{pmatrix} m \\ b \end{pmatrix} = b$.
(b) Find the least squares solution to this equation.
(c) Draw the line that you found and plot the points. Does the solution make sense?