%---*-LaTeX-*-------

\documentclass{article}

\usepackage{amsmath,amssymb}

\usepackage{enumerate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\topmargin}{-.0in}
\setlength{\textheight}{8in}
\setlength{\oddsidemargin}{-.2in}
\setlength{\evensidemargin}{-.2in}
\setlength{\textwidth}{6.6in}
\setlength{\parindent}{.2in}
\newcounter{prob}
\newcounter{subprob}
\renewcommand{\theprob}{\textbf{\arabic{prob}}.}
\renewcommand{\thesubprob}{\textbf{(\alph{subprob}).~}}
\newenvironment{problem}
{       \par
        \noindent
        %\medskip
        \refstepcounter{prob} 
        \theprob 
        \setcounter{subprob}{0}
}
{
        \medskip
}
\newenvironment{subproblem}
{
        \par
        %\medskip
        \refstepcounter{subprob}
        \thesubprob 
}
{       
        \medskip
}


\newcommand{\theprof}{}
\newcommand{\theclass}{}
\newcommand{\theqdate}{}
\newcommand{\theexam}{}
\newcommand{\prof}[1]
{
  \renewcommand{\theprof}{#1}
}

\newcommand{\class}[1]
{
  \renewcommand{\theclass}{#1}
}

\newcommand{\quizdate}[1]
{
  \renewcommand{\theqdate}{#1}
}

\newcommand{\examname}[1]
{
  \renewcommand{\theexam}{#1}
}

\newcommand{\heading}
{\noindent
\begin{minipage}[t]{3in}
\noindent \theclass \\
\theprof 
\end{minipage}
\quad
\begin{minipage}[t]{3in}
\noindent Name: \rule{5cm}{.2mm} \\
\theqdate
\end{minipage}
\bigskip\bigskip
\pagestyle{myheadings}
\markright{\theprof \hfil \theclass \hfil}
}


\prof{Prof.\ Peter Cholak and Prof.\ Pit-Mann Wong}
\class{Math 221}
\quizdate{Wednesday, December 13}
\examname{Final}


\begin{document}
\pagestyle{empty}

\heading

\begin{problem}(25 pts -- 5 each.)
Define the following notions:
\begin{subproblem}
  Linear independence.
\end{subproblem} \vspace{1.5in}
\begin{subproblem}
  Orthogonal vectors.
\end{subproblem}\vspace{1.5in}
\begin{subproblem}
  Orthogonal projection.
\end{subproblem}\vspace{1.5in}
\begin{subproblem}
  Linear transformation.
\end{subproblem}\vspace{1.5in}
\begin{subproblem}
  Least-square solution to $A\vec{x} = \vec{b}$.
\end{subproblem}
\end{problem}
\newpage
\begin{problem}(20pts -- 2 each.) 
  Mark each of the following True or False.  There is no need to
  justify your answers.
 
\begin{enumerate}[(a)]
\item If 3 vectors span ${\Bbb R}^3$ then the vectors are linearly
  independent.\vspace{1.2cm}
  
\item If an $n\times n$-matrix $A$ is invertible then every
  $\vec{v}\in {\Bbb R}^n$ is in the column space of $A$.
  \vspace{1.2cm}

\item If $A$ is an $3\times 4$-matrix then the columns of $A$ are
  linearly independent.  \vspace{1.2cm}
  
\item The map $T : {\bf R}^3 \to {\bf R}^2$ defined by $T(x, y, z) =
  (x - y + z, x(y + z))$ is a linear transformation. \vspace{1.2cm}
  
\item For all matrices $A,B,C$, if $AC=BC$ then $A=B$.  \vspace{1.2cm}
  
\item rank(A) $= \dim$ Nul(A) $ + \dim$ column space of $A$.
  \vspace{1.2cm}
  
\item Let $A$ be an $n \times n$ matrix then $A$ is diagonalizable if
  it has $n$  eigenvalues.\vspace{1.2cm}
  
\item For any $m\times n$-matrix $A$ and any $\vec{b}\in {\Bbb R}^n$
  the system $A^TA\vec{x}=A^T\vec{b}$ always has a solution.
  \vspace{1.2cm}
  
\item The orthogonal projection of $\vec{x}$ onto $V$ is orthogonal to
  $V$.\vspace{1.2cm}
  
\item If $\hat{x}$ is a least square solution to $A\vec{x} =\vec{b}$
  then $\vec{b} - A\hat{x}$ is orthogonal to rowspace of $A$.
\end{enumerate}
\end{problem}

\newpage

\begin{problem}(20pts.)
  Find a basis for the column space, a basis for the row space, a
  basis for the null-space, the rank, and the dimension of the
  null-space of
\[ \left[\begin{array}{rrrr}
  1 & -2 &  2 & -1\\
  -3 & 6 & 1 & 10 \\
  1 & -2 & -4 & -7 \\
  1 & -2 & 2 & 0
  \end{array}\right] \]
\end{problem}

\newpage

\begin{problem}(10pts.)
  Let $A=\left[
\begin{array}{rrrr} 0 & 1 & 0 & 3\\ 0 & 0 & 1 & -2
\end{array}\right]$ and $\vec{b}=\left[\begin{array}{r}
 -4 \\ 7
\end{array}\right]$. 
\begin{subproblem}
  Find one solution to the linear equation $A\vec{x}=\vec{b}$.
\end{subproblem}
\begin{subproblem}
  Find a basis for the nullspace of $A$.
\end{subproblem}
\begin{subproblem}
  Using the above two parts find \emph{all} the solutions to
  $A\vec{x}=\vec{b}$.
\end{subproblem}
\end{problem}

\newpage
\begin{problem}(15pts.) 
  Let ${\bf b}_1 = 
  \begin{bmatrix}
     1 \\ 0 \\ 0
  \end{bmatrix}, {\bf b}_2 = 
  \begin{bmatrix}
    -1 \\ 1 \\ 0
  \end{bmatrix}, {\bf b}_3 = 
  \begin{bmatrix}
    -3 \\ 1 \\ 1
  \end{bmatrix}$. 
  \begin{subproblem}
    Show that $\mathcal{B} = \{{\bf b}_1, {\bf b}_2, {\bf
    b}_3\}$ is a basis.
  \end{subproblem}
  \begin{subproblem}
    Let $x = 
    \begin{bmatrix}
      1 \\ -2 \\ 3
    \end{bmatrix}$. Find the coordinates of
    ${\bf x}$ with respect to the basis $\mathcal{B}$.
  \end{subproblem}
  \begin{subproblem}
    Let $V$ be the subspace spanned by $\{{\bf b}_2, {\bf b}_3\}$.
    Find an orthonormal basis for $V$.
  \end{subproblem}
\end{problem}


\newpage

\begin{problem}(15pts.) 
  Find the least square solution to the system
  $$\begin{bmatrix}1&0\\0&1\\-1&1\\0&1\end{bmatrix}
\begin{bmatrix}x_1\\x_2\end{bmatrix} =
\begin{bmatrix}0\\1\\0\\1\end{bmatrix}.$$
\end{problem}

\newpage
\begin{problem}(10pts.) 
  Let ${\bf v}_1 = (\frac{2}{3}, - \frac{1}{3}, - \frac{2}{3}), {\bf
    v}_2 = (\frac{1}{\sqrt{2}}, 0, \frac{1}{\sqrt{2}})$. 
  \begin{subproblem}
    Show that ${\bf v}_1, {\bf v}_2$ is an orthonormal basis of the
    span $W =$ span $\{{\bf v}_1, {\bf v}_2\}$.
  \end{subproblem}
  \begin{subproblem}
    Let ${\bf x} = (2, 1, 3)$ find the distance from ${\bf x}$ to $W
    =$ span $\{{\bf v}_1, {\bf v}_2\}$.
  \end{subproblem}
\end{problem}

\newpage
\begin{problem}(15 pts.)
  Let $T : {\bf R}^4 \to {\bf R}^2$ be the linear tranformation
  $T(x_1, x_2, x_3, x_4) = (x_1 + x_2, x_3 - x_4)$. 
  \begin{subproblem}
    Find the matrix representing $T$ relative to the standard basis on
    ${\bf R}^4$ and the standard basis on ${\bf R}^2.$
  \end{subproblem}
  \begin{subproblem}
    $\mathcal{B} = \{(1, 1), (1, -1)\}$ is a basis of ${\bf R}^2$.
    Find the matrix representing $T$ relative to the standard basis on
    ${\bf R}^4$ and the basis $\mathcal{B} = \{(1, 1), (1, -1)\}$ on
    ${\bf R}^2.$
  \end{subproblem}
\end{problem}

\newpage




\begin{problem}(10pts.) 
  Let $T$ be a linear transformation from ${\mathbb R}^k$ to ${\Bbb
    R}^k$.  Show that the set of $\vec{v}\in {\Bbb R}^k$ such that
  $T(\vec{v}) = 4\vec{v}$ is a subspace of ${\Bbb R}^k$.
\end{problem}


\newpage



\begin{problem}(10pts.) 
  Let $A$ be an $m \times n$ matrix with \emph{row} vectors ${\bf
    v}_1, {\bf v}_2, ..., {\bf v}_m$ (so $A = 
  \begin{bmatrix}
    {\bf v}_1 \\ {\bf v}_2 \\ \vdots \\ {\bf v}_m
  \end{bmatrix}$)
  and let ${\bf v} = a_1 {\bf v}_1 + a_2 {\bf v}_2, ... + a_n {\bf
    v}_m$ be a linear combination of the row vectors. Show that if
  ${\bf v} \ne {\bf 0}$ then $A {\bf v} \ne {\bf 0}$.
  
  
%  Let $A =
%  \begin{bmatrix}
%    {\bf v}_1 & {\bf v}_2 & \ldots & {\bf v}_n
%  \end{bmatrix}$ be an $m \times n$ matrix.
%  Let ${\bf v} = a_1 {\bf v}_1 + a_2 {\bf v}_2 + \ldots + a_n {\bf
%    v}_n$ be a linear combination of the column vectors of $A$.  Show
%  that if ${\bf v} \neq {\bf 0}$ then $A^T {\bf v} \neq 0$.
\end{problem}



\end{document}                                                              
    
extra

Let $A$ be a $m \times n$ matrix and let $\vec{v}$ be a linear
combination of rows of $A$. Prove that if $A\vec{v}=\vec{0}$ then
$\vec{v}=\vec{0}$.

Find the QR decomposition of the matrix
$$A = \begin{bmatrix}1&1\\2&1\end{bmatrix}.$$
                              
\begin{subproblem}
    Find a basis for the plane $x+y+z=0$ in $\mathbb{R}^3$.
  \end{subproblem}
  \begin{subproblem}
    Transform the basis from (a) into an orthogonal basis.
  \end{subproblem}