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

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

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

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

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

% Basic User Defs

\def\ds{\displaystyle}
\def\BF#1{{\bf #1}}
\def\checkbox{\fbox{$\phantom{X}$}~}
%\let\anotherpage\relax

% Beginning of the Document

\begin{document}
\examtitle{MATH 2270-2}{Final Exam}{Spring 2016}

\studentinfo

\finishfirstpage
\instructions{No books, notes or electronic devices, please.\\
The questions have credits which reflect the time required to write the solution.\\
If you must write a solution out of order or on the back side, then supply a road map.\\
Solutions are expected to include readable and convincing details. A correct answer without details earns 25\%.\\
Expect about 3 to 10 minutes per problem. Final exam problems may have multiple parts.
}
\anotherpage
% Problems Start Here % ----------------------------------------------------- %
%This is a work in progress, not finished. More will be added, and the
%order changed.

%\section*{Chapter 1}


\problem{60}{
Consider the system $A\vec{u}=\vec{b}$ with  $\vec{u}=\minicolvector{x_1\\ x_2\\ x_3\\ x_4}$ defined by
\begin{align*}
  2x_1+3x_2+4x_3+x_4 = 2\\
 4x_1+3x_2+8x_3+x_4 = 4\\
 6x_1+3x_2+8x_3+x_4 = 2\\
\end{align*}
Solve the following parts:
\begin{enumerate}
\item[{\bf (a)}] [10\%] Find the reduced row echelon form of the augmented matrix.
\item[{\bf (b)}] [10\%] Identify the {\bf free} variables and the {\bf lead} variables.
\item[{\bf (c)}] [10\%] Display a vector formula for a particular solution $\vec{u}_p$.
\item[{\bf (d)}] [10\%] Display a vector formula for the homogeneous solution $\vec{u}_h$.
\item[{\bf (e)}] [10\%] Identify each of {\bf Strang's Special Solutions}. 
\item[{\bf (f)}] [10\%] Display the vector general solution $\vec{u}$, using {\bf superposition}.
\end{enumerate}
% A:=<2,3,4,1|4,3,8,1|6,3,8,1>^+;b:=<2,4,2>;with(LinearAlgebra):LinearSolve(A,b);
}{}{Infinite solution case: .}
{Chapter 1}


\anotherpage



\problem{40}{~\\
(a) [10\%] Describe for $n\times n$ matrices two different methods
for finding the matrix inverse. \\
(b) [20\%] Apply the two methods to find the inverse of the matrix $A=\twobytwo{1&-3}{0&2}$. \\
(c) [10\%] Find the inverse of the transpose of the matrix in part (b).
}{}{The two methods are (1) $A^{-1}=\frac{\adj(A)}{|A|}$ and (2)
For $C=<A|I>$, then $\rref(C)=<I|A^{-1}>$. Details expected, but not supplied here.}
{Chapter 2}



\anotherpage


%\section*{Chapter 3}



\problem{30}{
Define matrix $A$ and vector $\vec{b}$ by the equations
$$A=\left(\begin{array}{rrrr}
 -2 &  3 & 0  \\
  0 & -2 &  4  \\
  1 &  0 &  -2
 \end{array}\right), \quad \vec{b}=\colvector{1 \\ 2 \\ 3 }.$$
Find the value of $x_3$ by Cramer's Rule
in the system $A\vec{x}=\vec{b}$.
}{}
{in progress: $x_2=\Delta_2/\Delta$, $\Delta_2=\det\threebythree{-2 & 1 & 0}{0 & 2 & 4}{1 & 3 & -2}=36$, $\Delta=\det(A)=4$, $x_2=9$. }
{Chapter 3}





\anotherpage



\problem{30}{Let
 $$A=\left(\begin{array}{rrrrrr}
  0 &  0 &  0\\
 -3 &  -2 &   -1\\
 -1 &  0 &     0\\
  6 &  6 &   3\\
  2 &  2 &    1
 \end{array}\right)$$
(a) Check the independence tests below which apply to prove that the column vectors of the matrix $A$ are independent in the vector space $\Rr^4$.\\
(b) Show the details for one of the independence tests that you checked.
\begin{center}\begin{tabular}{llp{0.6\textwidth}}
 \checkbox~ & \bf Wronskian test & Wronskian of $\vec{f}_1,\vec{f}_2,\vec{f}_3$ nonzero at $x=x_0$ implies independence of $\vec{f}_1,\vec{f}_2,\vec{f}_3$. \\
 \checkbox~ & \bf Rank test & Vectors $\vec{v}_1,\vec{v}_2,\vec{v}_3$ are independent if their augmented matrix has rank 3. \\
 \checkbox~ & \bf Determinant test & Vectors $\vec{v}_1,\vec{v}_2,\vec{v}_3$ are independent if their square augmented matrix has nonzero determinant. \\
 \checkbox~ & \bf Euler Atom test & Any finite set of distinct atoms is independent.\\[1ex]
 \checkbox~ & \bf Sample test & Functions $\vec{f}_1,\vec{f}_2,\vec{f}_3$ are independent if a sampling matrix has nonzero determinant.\\[1ex]
 \checkbox~ & \bf Pivot test & Vectors $\vec{v}_1,\vec{v}_2,\vec{v}_3$ are independent if their augmented matrix $A$ has 3 pivot columns.\\[1ex]
 \checkbox~ & \bf Orthogonality test & A set of nonzero pairwise orthogonal vectors is independent.\\[1ex]
 \checkbox~ & \bf Combination test & A list of vectors is independent if each vector is not a linear combination of the preceding vectors. 
\end{tabular}\end{center}
}{}{in progress 
%The first, fourth and fifth apply to the given functions, while the others
% apply only to fixed vectors.
}
{Chapters 1 to 4}

\anotherpage



\problem{20}{
Define $S$ to be the set of all vectors
$\vec{x}$ in $\Rr^{3}$ such that $x_1+x_3=x_2$, $x_3=0$ and $x_3+x_2=x_1$.
Prove that
$S$ is a subspace of $\Rr^{3}$.
}{}
{in progress\\
Let $A=\left(\begin{array}{rrr}
  1 & 0 &  1  \\
 -1 & 1 &  1  \\
  0 & 0 &  0
 \end{array}\right)$. Then the restriction equations can be written as $A\vec{x}=\vec{0}$. Apply the nullspace theorem (also called
the kernel theorem), which says that the nullspace of a matrix is a subspace.
\\
 Another solution: The given
restriction equations are linear homogeneous algebraic equations.
Therefore, $S$ is the nullspace of some matrix $B$, hence a subspace of $\Rr^3$.
This solution uses the fact that linear homogeneous algebraic equations can be written as a matrix equation $B\vec{x}=\vec{0}$.
\\
Another solution: Verify the three checkpoints for a subspace $S$ in the Subspace Criterion.
This is quite long, and certainly the last choice for a method of proof.
}
{Chapters 2, 4}
\anotherpage


%\section*{Chapter 4}

% chapter 4
\problem{40}{
Let $S$ be the subspace of $\mathbb{R}^4$ spanned by the vectors
$$\vec{v}_1=\begin{pmatrix}1\\1\\1\\0\end{pmatrix},\quad
\vec{v}_2=\begin{pmatrix}1\\1\\0\\1\end{pmatrix}.$$
 Find a Gram-Schmidt orthonormal basis
of $S$.
}{}{Let $\vec{y}_1=\vec{v}_1$ and
$\vec{u}_1=\frac{1}{\|\vec{y}_1\|}\vec{y}_1$. Then
$\vec{u}_1=\frac{1}{\sqrt3}\colvector{1\\ 1\\ 1\\ 0}$.
Let $\vec{y}_2 = \vec{v}_2$ minus the shadow projection of $\vec{v}_2$ onto the span of $\vec{v}_1$.
Then $$\vec{y}_2 = \vec{v}_2 -
\frac{\vec{v}_2\cdot\vec{v}_1}{\vec{v}_1\cdot\vec{v}_1}\vec{v_1}=\frac13\colvector{1 \\ 1 \\ -2 \\ 1}.$$
Finally, $\vec{u}_2=\frac{1}{\|\vec{y}_2\|}\vec{y}_2$.
We report the Gram-Schmidt basis:
$$\vec{u}_1=\frac{1}{\sqrt3}\colvector{1\\ 1\\ 1\\ 0 },\quad
\vec{u}_2 =\frac{1}{\sqrt6}\colvector{1 \\ 1 \\ -2 \\ 1}.$$
}
{Chapter 6}


\anotherpage

\problem{30}{% Edited 27 apr
Let $A$ be an $m\times n$ matrix and assume that $A^TA$ has nonzero determinant. Prove that the
rank of $A$ equals $n$.
}{}{The columns of $A$ are independent if and only if the nullspace of $A$ is the zero vector. If you don't know this result, 
then find it in Lay's book, or prove it yourself. \\
Assume $\vec{x}$ is in the nullspace of $A$, $A\vec{x}=\vec{0}$, then multiply by $A^T$ to get $A^TA\vec{x}=\vec{0}$. Because $A^TA$ is invertible,
then $\vec{x}=\vec{0}$, which proves the nullspace of $A$ is the zero vector. We conclude that the columns of $A$ are independent.}
{Chapters 1 to 6}


\anotherpage

%\section*{Chapter 6}




\problem{40}{The matrix $A$ below has eigenvalues $3$, $3$ and $3$.
Test $A$ to see it is diagonalizable, and if it is, then display three eigenpairs of $A$.
$$
 A=\left(\begin{array}{rrrr}
 4 & 1 & 1 \\
 -1 & 2 & 1 \\
 0 & 0 &  3
 \end{array}\right)$$
}{}{Compute $\rref(A-3I)=\threebythree{1&1&0}{0&0&1}{0&0&0}$. This has rank 2, nullity 1. There is just one eigenvector $\colvector{1\\ -1 \\ 0}$ for $\lambda=3$. Not diagonalizable, no Fourier's model, not possible to display three eigenpairs.
}
{Chapter 5}

%A:=matrix([[4 , 1 , -1 ],
%%  [-1 , 2 , -2 ],
%%  [0 , 0 ,  3  ]]);eigenvals(A);
% \hrulefill
%




\anotherpage

\problem{30}{
Let $W$ be the column space of $A=\left(\begin{array}{cc}1&1\\1&1\\1&0\end{array}\right)$ and let $\vec{\bf b}=\colvector{1\\ -1\\ 1}$. Let $\vec{\hat{\bf b}}$ be the near point to $\vec{\bf b}$ in the subspace $W$. Find $\vec{\hat{\bf b}}$.
}{}{The columns of $A$ are independent. The normal equation is $A^TA\vec{y}=A^T\vec{b}$, which in explicit form is $\twobytwo{3&2}{2&2}\vec{y} = \colvector{1\\ 0}$.  The answer is $\vec{y}=\colvector{1\\ -1}$. Then
$\vec{\hat{\bf b}}=A\vec{y}=\colvector{0\\ 0\\ 1}$.}
{Chapter 6}

\anotherpage


\problem{30}{
Let $Q$ be an orthogonal matrix with columns $\vec{q}_1, \vec{q}_2, \vec{q}_3$.
Let $D$ be a diagonal matrix with diagonal entries $\lambda_1, \lambda_2, \lambda_3$. Prove that
the $3\times 3$ matrix $A=QDQ^T$ satisfies
 $A=\lambda_1 \vec{q}_1\vec{q}_1^T +\lambda_2\vec{q}_2\vec{q}_2^T+\lambda_3\vec{q}_3\vec{q}_3^T$.
}{}{in progress \\
Let $B=\lambda_1 \vec{q}_1\vec{q}_1^T +\lambda_2\vec{q}_2\vec{q}_2^T$. We prove $A=B$. First observe that both $A$ and $B$ are symmetric.
Because the columns of $Q$
form a basis of $\Rr^2$, it suffices to prove that $\vec{x}^TA=\vec{x}^TB$ for $\vec{x}$ a column of $A$. For example,
take $\vec{x}=\vec{q}_1$. Then $\vec{x}^TA=(A^T\vec{q}_1)^T=(A\vec{q}_1)^T=\lambda_1\vec{q}_1^T$. Orthogonality of $Q$ implies $\vec{x}^TB=(B\vec{q}_1)^T=
(\lambda_1 \vec{q}_1\vec{q}_1^T\vec{q}_1 +\lambda_2\vec{q}_2\vec{q}_2^T\vec{q}_1)^T=\lambda_1(\vec{q}_1\cdot 1)^T=\lambda_1\vec{q}_1^T$.
Repeat for subscript 2 to complete the proof.
}
{Chapter 6}
\anotherpage




\problem{30}{
The spectral theorem says that a symmetric matrix $A$ can be factored into $A=QDQ^T$ where $Q$ is orthogonal and $D$ is diagonal. Find $Q$ and $D$ for the symmetric matrix
$A=\begin{pmatrix}4 & -1\\ -1 &4\end{pmatrix}$.
}{}{in progress\\
% A:=<4,-1|-1,4>;Eigenvalues(A);
% 5, 3
Start with the equation $r^2-6r+8=0$ having roots $r=2,4$. Compute the eigenpairs  $(2,\vec{v}_1)$, $(4,\vec{v}_2)$ where
$\vec{v}_1=\colvector{1\\ 1}$ and $\vec{v}_2=\colvector{-1\\ 1}$. The two vectors are orthogonal but not of unit length. Unitize them to
get $\vec{u}_1=\frac{1}{\sqrt2}\vec{v}_1$,  $\vec{u}_2=\frac{1}{\sqrt2}\vec{v}_2$. Then $Q=<\vec{u}_1 | \vec{u}_2>=\frac{1}{\sqrt2}\twobytwo{1&-1}{1&1}$,
$D=\diag(2,4)$.
}
{Chapter 7}

\anotherpage



\problem{30}{
Write out the singular value decomposition for the matrix
$A=\twobytwo{2&2}{-1&1}$.
}{}{
$A=\twobytwo{2&2}{-1&1}=\twobytwo{1&0}{0&1}
\twobytwo{\sqrt8&0}{0&\sqrt2}
\left(\frac{1}{\sqrt2}\twobytwo{1&-1}{1&1}\right)^T$
}
{Chapter 7}
\anotherpage

\problem{30}{
Let the linear transformation $T$ from $\Rr^3$ to $\Rr^3$
be defined by its action on three independent vectors:
$$
T\left(\begin{pmatrix}3\\ 2\\ 0\end{pmatrix}\right)=
\begin{pmatrix}4 \\ 4\\ 2\end{pmatrix},
T\left(\begin{pmatrix}0\\ 2\\ 1\end{pmatrix}\right)=
\begin{pmatrix}5 \\ 1\\ 1\end{pmatrix},
T\left(\begin{pmatrix}1\\ 2\\ 1\end{pmatrix}\right)=
\begin{pmatrix}4 \\ 0\\ 2\end{pmatrix}.$$
Find the unique $3\times 3$ matrix $A$ such that $T$ is defined
by the matrix multiply equation $T(\vec{x})=A\vec{x}$.
}{}{in progress\\
$A\threebythree{3&0&1}{2&2&2}{0&1&1}=\threebythree{4&4&5}{4&0&1}{2&2&1}$ can be solved for matrix $A$.
The answer is $A=\threebythree{1&\frac12 & 3}{1 & \frac12 & -1}{-1 & \frac52 & -3}$.
}
{Chapter 4}

\anotherpage
\problem{40}{
Let $A$ be an $m\times n$ matrix. Denote by $S_1$ the row space of of
$A$ and $S_2$ the column space of $A$. It is known that $S_1$ and $S_2$
have dimension $r=\rank(A)$. Let $\vec{p}_1,\ldots,\vec{p}_r$ be a basis for
$S_1$ and let $\vec{q}_1,\ldots,\vec{q}_r$ be a basis for $S_2$. For example,
select the pivot columns of $A^T$ and $A$, respectively. Define
$T ~:~ S_1 \to S_2$ initially by $ T(\vec{p}_i)=\vec{q}_i,\quad i=1,\ldots,r$.
Extend $T$ to all of $S_1$ by linearity, which means the final definition is
$$T(c_1\vec{p}_1 + \cdots +c_r\vec{p}_r) = c_1\vec{q}_1 + \cdots +c_r\vec{q}_r.$$
Prove that $T$ is one-to-one and onto.
}{}{in progress\\
Suppose $\vec{x}$ is in the rowspace. The fundamental theorem of
linear algebra says $\vec{x}$ is perpendicular to the nullspace. of $A$.
So, if $\vec{x}_1,\vec{x}_2$ are vectors in the rowspace of $A$ and
$A\vec{x}_1)=A(\vec{x}_2$ then $A(\vec{x}_1-\vec{x}_2)=\vec{0}$. This
implies $\vec{x}=\vec{x}_1-\vec{x}_2$ belongs to the nullspace of $A$.
But $\vec{x}$ is a linear combination of vectors in $S_1$, so it is in
$S_1$, which is perpendicular to the nullspace. The intersection of $V$
and $V^\perp$ is the zero vector, so $\vec{x}=\vec{0}$, which says
$\vec{x}_1=\vec{x}_2$, proving $T$ is one-to-one.

The proof for onto is done by solving the equation $A\vec{x}=\vec{y}$
where $\vec{y}$ is any vector in the column space of $A$. We have to
find $\vec{x}$ in $S_1$ that solves the equation. Select any $\vec{z}$
such that $\vec{y}=A\vec{z}$. Because the rowspace is perpendicular to
the nullspace, then there are unique vectors $\vec{x}, \vec{u}$ such
that $\vec{z}=\vec{x}+\vec{u}$, and $\vec{u}$ is in the nullspace while
$\vec{x}$ is in the rowspace. Then
$\vec{y}=A\vec{z}=A\vec{x}+A\vec{u}=A\vec{x}+\vec{0}=A\vec{x}$. We have
solved the equation for $\vec{x}$ in $S_1$. The proof is complete.
}
{Chapter 4, 7}

\anotherpage

\problem{20}{
Least squares can be used to find the best fit line for the
points $(1,2)$, $(2, 2)$, $(3,0)$. Without finding the line equation,
describe how to do it, in a few sentences.
}{}{Find a matrix equation $A\vec{x}=\vec{b}$ using the line equation $y=v_1x+v_2$ where $\vec{x}=\colvector{v_1\\ v_2}$. Then solve the normal equation $A^TA\vec{v}=A^T\vec{b}$.
A full solution is expected, with a formula for $A$. But don't solve the normal equation.
}
{Chapter 4}


\anotherpage

\anotherpage
\problem{20}{
State the Fundamental Theorem of Linear Algebra. Include {\bf Part 1}:
The dimensions of the four subspaces, and {\bf Part 2}: The
orthogonality equations for the four subspaces.
}{}{Part 1. The dimensions are $n-r,r,rm-r$ for nullspace(A), colspace(A), rowspace(A), nullspace($A^T$).
Part 2. The orthogonality relation is rowspace $\perp$ nullspace, for both $A$ and $A^T$.
A full statement is expected, not the brief one given here.}
{Chapters 1 to 7}

\anotherpage

\problem{20}{
State the {\bf Spectral Theorem} for symmetric matrices. Include the important results included in the spectral theorem, about real eigenvalues and diagonalizability. Then discuss the {\bf spectral decomposition}.
}{}{
A real symmetric $n\times n$ matrix $A$ has only real eigenvalues. Marix $A$ has $n$ eigenpairs, in short it is is diagonalizable. To each eigenvalue of multiplicity $k$, there are $k$ independent eigenvectors. These eigenvectors span a subspace of dimension $k$ which by Gram-Schmidt is spanned by $k$ orthonormal vectors. Two such subspaces corresponding to different eigenvalues are orthogonal. The spectral decomposition of $A$ is $A=QDQ^T$ where $D$ is a diagonal matrix of eigenvalues and $Q$ is an orthogonal matrix of corresponding eigenvectors.
}
{Chapter 7}




%\phantom{page}
%\anotherpage


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

\problemsdone
\end{document}

% End of the Document
