   
\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}{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{10}{%
$V$ is the span of the given vectors in $\mathbb{R}^4$. Find
  orthonormal vectors whose span is $V$.
\[\bar{v}_1=\begin{pmatrix}0\\ -1\\ 2\\0\end{pmatrix},
\bar{v}_2=\begin{pmatrix}3 \\1 \\1 \\ 3\sqrt{2}\end{pmatrix}\]
}{}{
Rescale $\bar{v}_1$ to make it a unit vector:
 \[\bar{b}_1=\frac{\bar{v}_1}{|\bar{v}_1|}=\frac{1}{\sqrt{5}}\bar{v}_1\]

Check if $\bar{b}_1$ is orthogonal to $\bar{v}_2$:
\[\bar{b}_1\cdot\bar{v}_2=\frac{1}{\sqrt{5}}(\bar{v}_1\cdot\bar{v}_2)=\frac{1}{\sqrt{5}}\neq
0\]

They are not orthogonal, so subtract off the $\bar{b}_1$--part of
$\bar{v}_2$:
\[\bar{v}_2-\frac{1}{\sqrt{5}}\bar{b}_1=\bar{v}_2-\frac{1}{5}\bar{v}_1=\begin{pmatrix}3 \\\frac{6}{5} \\\frac{3}{5} \\ 3\sqrt{2}\end{pmatrix}\]

This vector is orthogonal to $\bar{b}_1$, but needs to be rescaled to
be a unit vector:
\[\left|\begin{pmatrix}3 \\\frac{6}{5} \\\frac{3}{5} \\
    3\sqrt{2}\end{pmatrix}\right|=\frac{12}{\sqrt{5}}\]

An orthonormal basis is $\{\bar{b}_1, \bar{b}_2\}$ where $\bar{b}_1$
is as above and $\bar{b}_2$ is 
\[\bar{b}_2=\frac{\sqrt{5}}{12}\begin{pmatrix}3 \\\frac{6}{5} \\\frac{3}{5} \\ 3\sqrt{2}\end{pmatrix}\]

}
\anotherpage

\problem{15}{
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$. (Note: It is acceptable to give the
answer as a product of matrices, you do not need to perform the matrix multiplication.)
}{}{
The formula for the projection matrix is $P_V=A(A^TA)^{-1}A^T$, where
$A$ is a matrix whose columns are a basis for $V$. If we use the
orthonormal basis for $V$ found in the previous problem, then
$A^TA=ID$, so we have $P_V=AA^T$ where:
\[A=\begin{pmatrix}3 &\frac{\sqrt{5}}{12} 3
  \\\frac{6}{5}&\frac{\sqrt{5}}{12} \frac{6}{5}
  \\\frac{2}{5}&\frac{\sqrt{5}}{12}\frac{3}{5} \\
  3\sqrt{2}&\frac{\sqrt{5}}{12} 3\sqrt{2}\end{pmatrix}\]

Projection to $V^\perp$ is given by: $P_{V^\perp}=ID-P_V$

}
\anotherpage


\problem{15}{
Find the least squares best fit line for the points $(0,1)$, $(1,2)$, $(2, 3)$,
$(4, 4)$.}{}{

Let $A=\begin{pmatrix}0&1\\1&1\\2&1\\4&1\end{pmatrix}$ and
$\bar{b}=\begin{pmatrix}1\\2\\3\\4\end{pmatrix}$.

$A\bar{x}=\bar{b}$ has no solutions. The least squares best fit line
is given by:
\begin{align*}\bar{x}&=(A^TA)^{-1}A^T\bar{b}\\
&=\left(\begin{pmatrix}
    0&1&2&4\\1&1&1&1\end{pmatrix}\begin{pmatrix}0&1\\1&1\\2&1\\4&1\end{pmatrix}\right)^{-1}\begin{pmatrix}
    0&1&2&4\\1&1&1&1\end{pmatrix}\begin{pmatrix}1\\2\\3\\4\end{pmatrix}\\
&=\begin{pmatrix}21&7\\7&4\end{pmatrix}^{-1}\begin{pmatrix}24\\10\end{pmatrix}\\
&=\frac{1}{35}\begin{pmatrix}4&-7\\-7&21\end{pmatrix}\begin{pmatrix}24\\10\end{pmatrix}=\begin{pmatrix}\frac{26}{35}\\\frac{42}{35}\end{pmatrix}
\end{align*}
So, the least squares best fit line is: $y=\frac{26}{35}x+\frac{42}{35}$
}

\anotherpage




\problem{15}{
For the following matrix, find the eigenvalues and the maximum number of
linearly independent eigenvectors. Find this many linearly independent
eigenvectors.
\[A=\begin{pmatrix}
4 &1 \\
 -5& -2
\end{pmatrix}\]
}{}{
The characteristic polynomial is $(\lambda-3)(\lambda+1)$, so there are
two distinct real eigenvalues, 3 and -1. There is an eigenvector for
each eigenvalue, and eigenvectors for distinct eigenvectors form a
linearly independent set, so there are at least two linearly
independent eigenvectors. We are in $\mathbb{R}^2$, so there are at
most two vectors in a linearly independent set. Thus, there are at
most two linearly independent eigenvectors. 

An eigenvector for $A$ corresponding to eigenvalue 3 is a null vector
for the matrix $A-3ID=\begin{pmatrix}1&1\\-5&-5\end{pmatrix}$, and
$\begin{pmatrix}-1\\1\end{pmatrix}$ is a null vector for this matrix.

An eigenvector for $A$ corresponding to eigenvalue -1 is a null vector
for the matrix $A+1ID=\begin{pmatrix}5&1\\-5&-1\end{pmatrix}$, and $\begin{pmatrix}-\frac{1}{5}\\1\end{pmatrix}$ is a null vector for this matrix.
}

\anotherpage


\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}\]
}{}{
This matrix is in Jordan Form. The eigenvalues are the diagonal
entries: 1, 2, 3. There are four Jordan Blocks, so there are at most
four linearly independent eigenvectors. They are:
\[\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}
\]
}

\vfill

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

\vfill

\anotherpage

\problem{15}{
Describe the orbits of the discrete linear dynamical system
$\bar{v}_{i+1}=A\bar{v}_i$ for the matrix
\[A=\begin{pmatrix} 0& -1\\ 2 & 3\end{pmatrix}\]
}{}{
$A$ has eigenvalues 2 and 1 with corresponding eigenvectors
$\bar{x}=\begin{pmatrix}-1\\2\end{pmatrix}$ and
$\bar{y}=\begin{pmatrix}-1\\1\end{pmatrix}$, respectively. 

The two linearly independent eigenvectors form a basis for
$\mathbb{R}^2$, so any vector $\bar{v}_0$ can be written as a linear
combination $\bar{v}_0=a\bar{x}+b\bar{y}$ of these. 
The orbit of $\bar{v}_0$ consists of the points
$A^k\bar{v}_0=2^ka\bar{x}+1^kb\bar{y}$. Therefore, if $a=0$ then the
orbit is a single fixed point of $A$. Otherwise, the orbit consists of
points escaping to infinity exponentially quickly and moving parallel
to the vector $\bar{x}$.
}

\anotherpage

\problem{5}{
Suppose $V$ is a 4 dimensional subspace of $\mathbb{R}^9$. Let $P_V$
be the matrix that projects $\mathbb{R}^9$ onto the subspace $V$. What
are the dimensions and rank of the matrix $P_V$?}{}{
$P_V$ takes a vector in $\mathbb{R}^9$ and gives back a vector in
$\mathbb{R}^9$, so it is a $9\times9$ matrix.

The column space of $P_v$ is $V$, so the column space is 4
dimensional. The rank of $P_V$ is equal to the dimension of the column
space, so $P_V$ is rank 4.
}
\vfill
\problem{10}{
Suppose $A$ is a $3\times 3$ matrix whose entries all have absolute
value less than or equal to 2. Find such a matrix that has $Det(A)\geq
30$. Is it possible to find such a matrix with $Det(A)\geq 50$? Find
one or explain why it is impossible.
}{}{
There are many ways to find such a matrix with determinant 32. One way
would be to make two entries along the diagonal equal to -2, and make
all the other entries equal to 2. 

It is not possible to have $Det(A)\geq 50$. The Big Formula for the determinant has $3!=6$ entries, each of which
is a product of three entries of the matrix. Thus, we have 6 terms
each of which is at most 8, so the determinant could not possibly be
greater than 48.
}\vfill
\anotherpage

\problem{15}{
\[A=\begin{pmatrix}
 2&0 & 0\\
 0& 4& 2\\
 0& 2& 1
\end{pmatrix}\]
Find a matrix $C$ such that $C^{-1}AC$ is diagonal.
}{}{
Find three linearly independent eigenvectors of $A$.
Let $C$ be the matrix whose columns are these linearly independent
eigenvectors. Then $C$ is invertible and
$C^{-1}AC$ is diagonal.

The characteristic polynomial of $A$ is
$(2-\lambda)(\lambda^2-5\lambda)$ which has roots 0, 2, and 5.

(Note that $A$ has a 0 eigenvalue; it is not invertible, but it is still diagonalizable.)

The eigenvector corresponding to 2 is just the first coordinate
vector $\begin{pmatrix}1\\0\\0\end{pmatrix}$. Column 3 is equal to
2 times column 3, so a null vector, an eigenvector with eigenvalue 0, is
$\begin{pmatrix}0\\-\frac{1}{2}\\1\end{pmatrix}$. Finally, and eigenvector for
eigenvalue 5 is a null vector for the matrix $A-5ID=\begin{pmatrix}-3&0 & 0\\
 0& -1& 2\\
 0& 2& -4\end{pmatrix}$

A null vector for this matrix is $\begin{pmatrix}0\\2\\1\end{pmatrix}$.

So let $C=\begin{pmatrix}1&0&0\\0&-\frac{1}{2}&2\\0&1&1\end{pmatrix}$
}

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


\phantom{page}
\anotherpage

\phantom{page}
\anotherpage




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

\problemsdone
\end{document}

% End of the Document
