   
\documentclass[12pt]{article}
\usepackage{epsfig,amsmath,amsthm,amssymb, verbatim}

% Use this one to print just the question sheet.
%\usepackage[questions]{mathtest}[2001/05/12]

% Use this one to print an entire exam booklet.
%\usepackage[answersheet]{mathtest}[2001/05/12]

% Use this one to print questions and answers.
\usepackage[answers]{mathtest}[2001/05/12]

% For use with pdflatex
% \pdfpagewidth\paperwidth
% \pdfpageheight\paperheight

% Basic User Defs

\def\ds{\displaystyle}


% Beginning of the Document

\begin{document}
\examtitle{MATH 2270-003}{Sample Exam 2}{Fall 2010}

\studentinfo
\instructions{You may not use a calculator. Your solutions must include enough justification that another person could understand
 and be convinced by your argument.\\
There are extra blank pages at the end of the booklet. If you need more room to work a problem please note the page number where your work continues.\\}
\finishfirstpage
% Problems Start Here % ----------------------------------------------------- %
\problem{5}{%
Give a basis for each of the four fundamental subspaces associated to
the following matrix:
\[A=\begin{pmatrix}
1 & 1 & 1\\
0 & 1 & 1
\end{pmatrix}\]
}{}{
The two row vectors form a basis for the row space. 

The first two
columns give a basis for the column space (but not all three columns,
the second and third are not independent).

The left nullspace is the orthogonal complement in $\mathbb{R}^2$ of
the column space. The columns space is already all of
$\mathbb{R}^2$, so the left nullspace is trivial.

The nullspace is the orthogonal complement of the row space in
$\mathbb{R}^3$, so it is one dimensional. To find a vector in the
nullspace, observe that columns 1 and 2 are pivot columns, so column 3
is a free columns. Thus, there is a null vector of the form
$\bar{v}=\begin{pmatrix}x\\ y\\ 1\end{pmatrix}$. Solve
$A\bar{v}=\bar{0}$ to find that $\bar{v}=\begin{pmatrix}0\\ -1\\ 1\end{pmatrix}$.

}

\problem{5}{%
$V$ is the span of the given vectors in $\mathbb{R}^4$. Find
  orthonormal vectors whose span is $V$.
\[\bar{v}_1=\begin{pmatrix}3\\ 0\\ 4\\0\end{pmatrix},
\bar{v}_2=\begin{pmatrix}1 \\1 \\1 \\ 0\end{pmatrix}\]
}{}{
$\bar{v}_1$ is not length 1, it has length $\sqrt{3^2+4^2}=5$. Let
$\bar{b}_1$ be the unit vector $\frac{\bar{v}_1}{5}$.

\[\bar{b}_1\cdot\bar{v}_2=\frac{1}{5}(3+4)=\frac{7}{5}\neq0,\] so $\bar{v}_2$ is
not orthogonal to $\bar{b}_1$. Subtract off the ``$\bar{b}_1$--part''
of $\bar{v}_2$:
\[\bar{v}_2-(\bar{v}_2\cdot\bar{b}_1)\bar{b}_1=\begin{pmatrix}1\\ 1\\
  1\\ 0\end{pmatrix}-\frac{7}{25}\begin{pmatrix}3\\ 0\\ 4\\
  0\end{pmatrix}=\begin{pmatrix}
\frac{4}{25}\\1\\ -\frac{3}{25}\\0
\end{pmatrix}\]

This is orthogonal to $\bar{b}_1$, but has
length \[\sqrt{(\frac{4}{25})^2+1^2+(-\frac{3}{25})^2}=\sqrt{1+\frac{1}{25}}=\frac{1}{5}\sqrt{26}\]
Let $\bar{b}_2=\frac{1}{\frac{1}{5}\sqrt{26}}\begin{pmatrix}
\frac{4}{25}\\1\\ -\frac{3}{25}\\0 \end{pmatrix}$

$\{\bar{b}_1,\bar{b}_2\}$ is an orthonormal basis of $V$.
}

\problem{5}{
For the subspace $V$ in the previous problem, give the matrix that
projects $\mathbb{R}^4$ to $V$ and the matrix that projects
$\mathbb{R}^4$ to $V^\perp$.
}{}{
Let $A$ be the matrix whose columns are the vectors $\bar{b}_1$ and
$\bar{b}_2$ from the previous problem. Projection to $V$ is given by
the matrix $P_V=A(A^TA)^{-1}A^T$. Since $A$ is orthogonal, $(A^TA)$ is
the identity matrix, so \begin{gather*}
P_V=AA^T=
\frac{1}{25\cdot 26}\begin{pmatrix}
3\sqrt{26} & 4\\
0& 25\\
4\sqrt{26} & -3\\
0 & 0
\end{pmatrix}
\begin{pmatrix}
3\sqrt{26} & 0 & 4\sqrt{26} & 0\\
 4 & 5 & -3 & 0\\
\end{pmatrix}\\
=\frac{1}{25\cdot 26}
\begin{pmatrix}
10\cdot 25 & 20 & 12\cdot 25 &  0\\
100 & 125& -75 &  0\\
12\cdot 25 & -15 & 17\cdot 25 &  0\\
0 & 0 & 0 & 0
\end{pmatrix}
=\frac{1}{ 26}
\begin{pmatrix}
10 & \frac{4}{5} & 12 &  0\\
4 & 5& -3 &  0\\
12 & -\frac{3}{5} & 17 &  0\\
0 & 0 & 0 & 0
\end{pmatrix}
\end{gather*}

The projection to $V^\perp$ is given by $ID-P_V$.
}

\problem{5}{
Find the least squares best fit line for the points $(0,1)$, $(2, 3)$,
$(4, 4)$.}{}{
Let \[A=\begin{pmatrix}0 & 1\\ 2 & 1\\ 4 & 1\end{pmatrix}\]
A line through the three points would have slope $m$ and
$y$--intercept $b$ that give a solution $\bar{v}=\begin{pmatrix}m\\
  b\end{pmatrix}$ to the equation
\[A\bar{v}=\begin{pmatrix} 1\\ 3 \\4\end{pmatrix}\] However,
$\begin{pmatrix}1\\ 3\\ 4\end{pmatrix}$ is not in the column space of
$A$, so there is no actual solution. The best fit line has slope and
$y$--intercept given by
\[\bar{v}=(A^TA)^{-1}A^T\begin{pmatrix}1\\3\\4\end{pmatrix}\]

\[A^TA=\begin{pmatrix}20 & 6\\6 & 3\end{pmatrix}\]
so \[(A^TA)^{-1}=\frac{1}{24}\begin{pmatrix}3 & -6\\-6 &
  20\end{pmatrix}\]

\[(A^TA)^{-1}A^T=\frac{1}{24}\begin{pmatrix} -6& 0& 6\\20 &8
  &-4 \end{pmatrix}\]

\[\bar{v}=(A^TA)^{-1}A^T\begin{pmatrix}1\\3\\4\end{pmatrix}=\frac{1}{24}\begin{pmatrix}
  18\\28 \end{pmatrix}\]
The best fit line is 
\[y=\frac{18}{24}x+\frac{28}{24}\]
}

\problem{5}{
Find the determinant of the following matrix:
\[\begin{pmatrix}
1 & 2 & 3\\
1 & 1 & 1\\
0 & 1 & 1
\end{pmatrix}\]
}{}{
The determinant is 1. There are many ways to compute this.
}

\problem{5}{
For the following matrix, find the eigenvalues and the maximum number of
linearly independent eigenvectors. Find this many linearly independent
eigenvectors.
\[A=\begin{pmatrix}
1 &3 \\
 2& 2
\end{pmatrix}\]
}{}{
The characteristic polynomial is 
\[\left|\begin{matrix}1-\lambda &3 \\
 2&
 2-\lambda\end{matrix}\right|=(1-\lambda)(2-\lambda)-6=\lambda^2-3\lambda
-4=(\lambda -4)(\lambda+1)\]
The eigenvalues are the roots of the characteristic polynomial: 4 and
-1. Since there are two distinct eigenvalues, there are at least two
linearly independent eigenvectors, one for each eigenvalue. Since the
space is two dimensional there can be at most two linearly independent
eigenvectors. 

To find an eigenvector $\bar{v}_1$ for $\lambda_1=4$ find the
nullspace of $A-4ID=\begin{pmatrix}-3 & 3\\2 & -2\end{pmatrix}$. The
second column is $-1$ times the first, so
$\bar{v}_1=\begin{pmatrix}-1\\1\end{pmatrix}$ works.

To find an eigenvector $\bar{v}_2$ for $\lambda_2=-1$ find the
nullspace of $A-(-1)ID=\begin{pmatrix}2 & 3\\2 & 3\end{pmatrix}$. The
second column is $\frac{3}{2}$ times the first, so
$\bar{v}_2=\begin{pmatrix} -\frac{3}{2}\\1\end{pmatrix}$ works.
}


\problem{5}{
For the following matrix, find the eigenvalues and the maximum number of
linearly independent eigenvectors. Find this many linearly independent
eigenvectors.
\[A=\begin{pmatrix}
1 & 0 & 0 & 0 & 0 & 0 \\
0 & 2 & 1 & 0 & 0 & 0 \\
0 & 0 & 2 & 0 & 0 & 0 \\
0 & 0 & 0 & 3 & 0 & 0 \\
0 & 0 & 0 & 0 & 3 & 1 \\
0 & 0 & 0 & 0 & 0 & 3 
\end{pmatrix}\]
}{}{
The matrix is in Jordan Form. The eigenvalues are the diagonal entries
1, 2, 3. There are four Jordan blocks, so there are four linearly
independent eigenvectors. For example:
\[\begin{pmatrix}1\\ 0\\ 0\\0 \\0\\0\end{pmatrix},
\begin{pmatrix}0\\ 1\\ 0\\0 \\0\\0\end{pmatrix},
\begin{pmatrix}0\\ 0\\ 0\\1 \\0\\0\end{pmatrix},
\begin{pmatrix}0\\ 0\\ 0\\0 \\1\\0\end{pmatrix}\]
}

\problem{5}{
Describe the plane in $\mathbb{R}^3$ that contains the three points
$(1,0,0)$, $(1,1,1)$, $(1, 2, 0)$. }{}{
The vector from $(1,0,0)$ to $(1,1,1)$ is $\bar{v}=\begin{pmatrix}0\\
  1\\1\end{pmatrix}$.
The vector from $(1,0,0)$ to $(1,2,0)$ is $\bar{w}=\begin{pmatrix}0\\
  2\\0\end{pmatrix}$.
The plane containing the three points is collection (not a vector
subspace) of vectors $\begin{pmatrix}1\\0\\0\end{pmatrix}+a \begin{pmatrix}0\\
  1\\1\end{pmatrix}+b\begin{pmatrix}0\\
  2\\0\end{pmatrix}$, where $a$ and $b$ are arbitrary real numbers.

In other words, it is the vector subspace spanned by $\bar{v}$ and $\bar{w}$
shifted by the vector $\begin{pmatrix}1\\0\\0\end{pmatrix}$.
}

\problem{5}{
Suppose an $n\times n$ matrix $A$ has all eigenvalues equal to 0. Show
that $A^n$ has all entries equal to 0.}{}{
Solution 1: If all eigenvalues are 0 then the characteristic
polynomial is $\lambda^n$. By the Cayley-Hamilton Theorem, $A$
is a root of its characteristic polynomial, so $A^n$ is the zero
matrix.

Solution 2: $A$ is similar to a matrix $J$ in Jordan Form with 0's on
the diagonal and possibly some 1's on the first super-diagonal
(immediately above the diagonal). Check that $J^k$ is a matrix that is
zero everywhere except possibly for some 1's on the $k$-th
super-diagonal, so $J^n$ is the zero matrix. $A=CJC^{-1}$ so
$A^n=CJ^nC^{-1}$ is also the zero matrix.
}

\problem{1000000}{
Prove the Cayley-Hamilton Theorem for matrices with real
eigenvalues. You may assume the Jordan Form Theorem.}{}{}

\phantom{page}
\vfill \begin{center} No new questions beyond this point.\end{center}
\anotherpage


\phantom{page}
\anotherpage

\phantom{page}
\anotherpage

\phantom{page}
\anotherpage

\phantom{page}
\anotherpage


\phantom{page}
\anotherpage


% Problems End Here % ------------------------------------------------------- %

\problemsdone
\end{document}

% End of the Document
