\documentclass[12pt]{article}
\usepackage{fullpage,amsmath,amsfonts,graphicx}

\def\d{{\mathrm d}}
\def\e{{\mathrm e}}
\def\R{{\mathbb R}}
\def\bx{\boldsymbol{x}}
\def\by{\boldsymbol{y}}
\def\v{\boldsymbol{v}}
\def\bb{\boldsymbol{b}}
\def\be{\boldsymbol{e}}
\def\A{{\boldsymbol A}}
\def\B{{\boldsymbol B}}
\def\I{{\boldsymbol I}}

\begin{document}

\title{Finite Mathematics}
\author{Homework 5}
\date{Due in class Monday, March 16, 2020}
\maketitle

% \emph{Note:} Assignments marked (*) are \emph{not} for bonus credit.
% They will not be graded.  Do not turn them in.  However, they will be
% discussed in the tutorial and typically example solutions are
% available online (in case of Hefferon's book, there is a PDF with
% solutions available on the book's web site.)

\begin{enumerate}


\item Recall that if the columns of an $m\times n$ matrix with $m \geq
n$ (the matrix is taller than wide) are linearly independent, the
least-square solution to the potentially over-determined linear system
$A \bx = \bb$ is given by
\[
  \bx = (A^T A)^{-1}A^T \bb \,.
\]
Show that this expression is equivalent to solving the linear system
\begin{gather*}
  A^T \by = 0 \,, \\
  A \bx + \by = \bb \,.
\end{gather*}


\item Find the least square solution of the system
\begin{equation*}
\begin{pmatrix}
 1 & 0 \\ 0 & 1 \\ 1 & 1
\end{pmatrix} \, \bx
=
\begin{pmatrix}
1 \\ 1 \\ 0
\end{pmatrix} \,.
\end{equation*}

\item Find the best straight line fit (in the least-square sense) to
the points $(0, 3)$, $(1, 3)$, and $(1, 6)$.

\item Find the best plane fit (in the least-square sense) to the
points 
$(1,1,1)$,                                                      
$(0,1,0)$,                                                     
$(1,0,2)$, and                                                     
$(0,0,0)$.

\emph{Hint:} Describe the plane by the equation $z = a + b \, x + c \,
y$ and write out $4$ equations in the $3$ unknowns $a$, $b$, and $c$
for the plane to pass through these points.  Then find the
least-square solution of this over-determined system of equations.


\end{enumerate}
\end{document}
