\documentclass{article}
%\pagestyle{empty}
\setlength{\topmargin}{-.5in}
\setlength{\oddsidemargin}{-.3in}
\setlength{\textheight}{9in}
\setlength{\textwidth}{7.2in}


\usepackage{amssymb}
\usepackage{amsmath}


\newcommand{\adj}{\mathrm{Adj}}
\newcommand{\mbf}{\mathbf}
\newcommand{\R}{\mathbb{R}}
\newcommand{\ra}{\rightarrow}
\newcommand{\proj}{\mathrm{proj}}
\newcommand{\dotprod}{\bullet}
\newcommand{\sol}{\textbf{Solution}}

\begin{document}

\begin{center}
{\Large Key to TEST 2

Math 315}
\end{center}

\begin{enumerate}

\item  Consider the matrix $A$ below.

  \[
  A = \left[
    \begin{array}{rrrrr}
      1 & 0 & 3 & 4 & 0 \\
      0 & 1 & 8 & -1 & 1 \\
      1 & 1 & 11 & 3 & 1
    \end{array}
    \right]
  \]
  \begin{enumerate}
  \item  What is the rank of $A$? (justify your answer)
    \\
    \sol:
    If we perform elimination on $A$ we get:
  \[
  \left[
    \begin{array}{rrrrr}
      1 & 0 & 3 & 4 & 0 \\
      0 & 1 & 8 & -1 & 1 \\
      1 & 1 & 11 & 3 & 1
    \end{array}
    \right]
  \stackrel{\mbox{rref}}{\longrightarrow}
  \left[
    \begin{array}{rrrrr}
      1 & 0 & 3 & 4 & 0 \\
      0 & 1 & 8 & -1 & 1 \\
      0 & 0 & 0 & 0 & 0
    \end{array}
    \right]
  \]
  And therefore $A$ has rank 2.

    
  \item  \label{row space}
    Find a basis for the row space of $A$. (justify your answer)
    \\
    \sol:
    This means a basis for the row space is $B=\{\mathbf{v}_1, \mathbf{v}_2\}$
    \[
    \mathbf{v}_1 = \left[
      \begin{array}{r}
	1 \\ 0 \\ 3 \\ 4 \\ 0
      \end{array}
      \right]
    \qquad
    \mathbf{v}_2 = \left[
      \begin{array}{r}
	0 \\ 1 \\ 8 \\ 1 \\ 1
      \end{array}
      \right]
    \]

  \item  Find a basis for the column space of $A$. (justify your answer)
    \\
    \sol: from the reduced matrix, we can see that the basis for the column space
    is the original two columns of the matrix $A$ (and NOT the first 2 columns of the reduced matrix).
    Therefore, a basis for the column space is: $\{\mathbf{u}_1, \mathbf{u}_2\}$
    \[
    \mathbf{u}_1 = \left[
      \begin{array}{r}
	1 \\ 0 \\ 1
      \end{array}
      \right]
    \qquad
    \mathbf{u}_2 = \left[
      \begin{array}{r}
	0 \\ 1 \\ 1
      \end{array}
      \right]
    \]

  \item  What is the dimension of the null space of $A$? (justify your answer)
    \\
    \sol: Rank nullity theorem tells us that the dimension of the null space is $3$.

  \item  Given that the vector $\mathbf{v}=[8, -5, -16, 37, -5]^t$ is in the row space of $A$, 
    write $\mathbf{v}$ in the coordinates determined by your basis in part~\ref{row space}.
    \\
    \sol: Just look and see that
    \[
    \mathbf{v} = 8\mathbf{v}_1 - 5 \mathbf{v}_2
    \]

  \end{enumerate}

\item  Consider the subspace of $\R^4$:
  \[
  W = \mathrm{Span}\{ [4,-5,1,1]^t \}
  \]
  Let $v=[-12,8,4,-2]^t$.
  \begin{enumerate}
  \item  Find the orthogonal projection of $\mathbf{v}$ onto the subspace $W$, 
    $\mathrm{Proj}_W(\mathbf{v})$.
    \\
    \sol: let $\mathbf{w}=[4,-5,1,1]^t$ so that $W=\mathrm{Span}\{\mathbf{w}\}$.
    We just compute using the formula:
    \[
    \mathrm{Proj}_W(\mathbf{v}) = \frac{v\dotprod w}{w\dotprod w} w
    = \frac{-86}{43}[4,-5,1,1]^t
    = [-8,10,-2,-2]^t
    \]

  \item  Determine a vector, $\mathbf{u}$, orthogonal to $W$ so that 
    $\mathrm{Proj}_W(\mathbf{v}) + \mathbf{u} = \mathbf{v}$.
    Show that the vector you found is orthogonal to $W$.
    \\
    \sol: just subtract and solve for $u$:
    \[
    \mathbf{u} = \mathbf{v} - \mathrm{Proj}_W(\mathbf{v}) = [-4,-2,6,0]^t
    \]
    It is an easy check to see that $\mathbf{u} \dotprod \mathbf{w} = 0$.
  \end{enumerate}

\item  Let $A$ be an arbitrary $3 \times 2$ matrix.
  \begin{enumerate}
  \item  $A$ determines a linear transformation from $\R^n$ to $\R^m$, what is $n$ and $m$?
    \\
    \sol: $n=2$ and $m=3$, so the transformation is $\R^2 \ra \R^3$.
  \item  Determine all possibilities for the Rank of $A$ and nullity of $A$.  (justify your answer)
    \\
    \sol:  I just make a chart of possibilities

    \begin{tabular}{|c|c|}
      \hline
      Rank $A$ & Nullity of $A$ \\
      \hline
      \hline
      0 & 2 \\
      1 & 1 \\
      2 & 0 \\
      \hline
    \end{tabular}

  \item  Determine all possibilities for the Rant of $A^t$ and nullity of $A^t$, the transpose of $A$.
    (justify your answer).
    \\
    \sol:  I just make a chart of possibilities

    \begin{tabular}{|c|c|}
      \hline
      Rank $A^t$ & Nullity of $A^t$ \\
      \hline
      \hline
      0 & 3 \\
      1 & 2 \\
      2 & 1 \\
      \hline
    \end{tabular}
    Note that it is not possible for $A^t$ to have rank 3 because there are only 2 rows.
  \end{enumerate}


\item  \label{p trans}
  Suppose $T:\R^2 \ra \R^3$ is a linear transformation such that
  \[
  T\left( \left[
    \begin{array}{r}
      1 \\ 0
    \end{array}
    \right]
  \right)
  = 
  \left[
    \begin{array}{r}
      1 \\ 2 \\ -5
    \end{array}
    \right]
  \qquad
  T\left( \left[
    \begin{array}{r}
      2 \\ 1
    \end{array}
    \right]
  \right)
  = 
  \left[
    \begin{array}{r}
      -1 \\ 0 \\ 1
    \end{array}
    \right]
  \]
  \begin{enumerate}
  \item  Write the vector $[0,1]^t$ as a linear combination of $[1,0]^t$ and $[2,1]^t$.
    \\
    (This isn't supposed to be very hard, you should be able to do this without solving equations.
    But, I certainly won't stop you from solving equations.)
    \\
    \sol: here it is:
    \[
    \left[ \begin{array}{r} 0 \\ 1 \end{array}\right]
    =
    -2 \left[ \begin{array}{r} 1 \\ 0 \end{array}\right]
    + \left[ \begin{array}{r} 2 \\ 1 \end{array}\right]    
    \]

  \item  Using the combination found above, find $T([0,1]^t)$
    \\
    \sol: we just use that combination and the properties of a linear transformation:
    \begin{eqnarray*}
      T\left( \left[ \begin{array}{r} 0 \\ 1 \end{array}\right] \right)
      & = & T \left(
        -2 \left[ \begin{array}{r} 1 \\ 0 \end{array}\right]
	+ \left[ \begin{array}{r} 2 \\ 1 \end{array}\right]          
	\right) \\
	& = & -2 T \left( \left[ \begin{array}{r} 1 \\ 0 \end{array}\right] \right)
	   + T \left( \left[ \begin{array}{r} 2 \\ 1 \end{array}\right] \right) \\
	& = &   -2 \left[ \begin{array}{r} 1 \\ 2 \\ -5 \end{array} \right]
	       + \left[ \begin{array}{r} -1 \\ 0 \\ 1 \end{array} \right] \\
	& = &  \left[ \begin{array}{r} -3 \\ -4 \\ 11 \end{array} \right]
    \end{eqnarray*}
  \item  \label{trans}
    Using this information, find a matrix that represents the transformation $T$.
    \\
    \sol: We know that the columns of the matrix of the transformation are
    given by the transformation applied to the standard basis elements, which 
    we computed above.
    Therefore, the matrix is
    \[
    \left[
      \begin{array}{rr}
	1 & -3 \\
	2 & -4 \\
	-5 & 11
      \end{array}
      \right]
    \]
  \end{enumerate}

\item
  Consider the standard basis for $\R^2$ and the basis $B=\{ [1,0]^t, [2,1]^t \}$.
  \begin{enumerate}
  \item  \label{p matrix}
    Find the change of coordinate matrix to transform coordinate in $B$ to standard coordinates.
    Call this matrix $P$.
    (the point matrix using the text's language).
    \\
    \sol: this is just the matrix with these vectors as columns:
    \[
    P = \left[
      \begin{array}{rr}
	1 & 2 \\
	0 & 1 
      \end{array}
      \right]
    \]
  \item  
    Find the change of coordinate matrix to transform standard coordinates to coordinates in $B$.
    Call this matrix $C$.
    (the coordinate matrix using the text's language).
    \\
    \sol: $C=P^{-1}$, so we just find the inverse using elimination:
    \[
    C = \left[
      \begin{array}{rr}
	1 & -2 \\
	0 & 1 
      \end{array}
      \right]
    \]
  \end{enumerate}

\item  (Extra credit - 5 points)
  Let $A$ be the matrix from part~\ref{trans} and $P$ the matrix from part~\ref{p matrix}.
  \begin{enumerate}
  \item  Determine the product $AP$.  
    \\
    \sol: this is just a matter of computing:
    \[
    AP =
      \left[
	\begin{array}{rr}
	  1 & -3 \\
	  2 & -4 \\
	  -5 & 11
	\end{array}
	\right]
      \left[
	\begin{array}{rr}
	  1 & 2 \\
	  0 & 1 
	\end{array}
	\right]
    = 
    \left[
      \begin{array}{rr}
	1 & -1 \\
	2 & 0 \\
	-5 & 1
      \end{array}
      \right]   
    \]
  \item  $AP$ should be a matrix with columns equal to the vectors in problem~\ref{p trans}.
    Explain why this happens.
    \\
    \sol:
    What is happening is we are computing the matrix of the transformation in a different basis.
    The easiest way to understand this is with a diagram 
    (that I am having trouble typing into the computer).

  \end{enumerate}


\end{enumerate}

\end{document}







