
\documentclass[12pt]{article}
\usepackage{linalg2270strang}
%\usepackage{epsfig,amsmath,amsthm,amssymb, verbatim}
\usepackage{verbatim}
\def\checkbox{\fbox{$\phantom{X}$}~}
% Use this one to print just the question sheet.
%\usepackage[questions]{mathtest}[2001/05/12]
%\let\anotherpage\relax

% 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-2}{Exam 2}{S2018}
\thispagestyle{empty}
\studentinfo
\instructions{Please, no books, notes or electronic devices.\\[1pc]
Questions 4, 8, 9, 10 involve proofs. Please divide your time accordingly.\\[1pc]
Extra details can appear on the back side or on extra pages. Please supply a road map for details not on the front side.\\[1pc]
 Details count 75\% and answers count 25\%.
\\
\vspace*{1pc}
}
%\let\finishfirstpage\relax

\finishfirstpage
\setcounter{page}{1}
% Problems Start Here % ----------------------------------------------------- %
\anotherpage
\problem{100}{%2018
Define matrix $A$, vector $\vec{b}$ and vector variable $\vec{x}$ by the equations
$$A=\left(\begin{array}{rrrr}
 -2 & 3& 0 \\
  0 & -4 & 1 \\
  1 & 4 & 1
 \end{array}\right), \quad \vec{b}=\colvector{-3 \\ 5\\ 1},\quad \vec{x} = \colvector{x_1\\ x_2\\ x_3}.$$
For the system $A\vec{x}=\vec{b}$, display the {\bf formula} for $x_3$ according to Cramer's Rule. To save time, {\bf do not compute determinants}!}{}{
%$x_3=\Delta_3/\Delta$, $\Delta=\det\threebythree{-2 & 3& 0}{0 & -4 & 1}{1 & 4 & 1}=8$, %$\Delta_3=\det\threebythree{-2 & 3& -3}{0 & -4 & 5}{1 & 4 & 1}=51$, $x_3= \frac{51}{8}$.
%
%A:=Matrix(
%  [[ -2 , 3 ,0 ],
%  [0 ,  -4 , 0], [1,4,1]]);
% b:=Vector([-3,5,1]);
%  with(linalg):linsolve(A,b); det(A);
%A3:=Matrix(
%  [[ -2 , 3 ,-3 ],
%  [0 ,  -4 , 5], [1,4,1]]);det(A3);
%  # answers =  -3/8, -5/4, 51/8
%
~}
\anotherpage
\problem{100}{%2018
Define matrix $A=\threebythree{2&3&0}{6&8&1}{8&14&-4}$.
Find a lower triangular matrix $L$ and an upper triangular matrix $U$ such that $A=LU$.
}{}{%2017 sol here, which is wrong
%Let $E_1$ be the result of combo(1,2,-1) on $I$, and $E_2$ the result of combo(2,3,-1) on $I$.
%Then $E_2E_1A = U=\threebythree{3&1&0}{0& 2 & 1}{0 & 0 & 3}$. Let $L=E_1^{-1}E_2^{-1}=\threebythree{1&0&0}{1&1&0}{0&1&1}$.
%
%A:=Matrix([[2, 3, 0], [6, 8, 1], [8, 14, -4]]);
%with(LinearAlgebra):
%P,L,U:=LUDecomposition(A);
%convert(L,list,nested=true);
%convert(U,list,nested=true);
%Id:=Matrix(3,3,shape=identity);
%combo:=(a,s,t,c)->RowOperation(a,[t,s],c);
%swap:=(a,s,t)->RowOperation(a,[t,s]);
%mult:=(a,t,c)->RowOperation(a,t,c);
%A1:=combo(A,1,2,-3);A2:=combo(A1,1,3,-4); A3:=combo(A2,2,3,-2);
%E1:=combo(Id,1,2,-3);E2:=combo(Id,1,3,-4);E3:=combo(Id,2,3,-2);
%1/(E3.E2.E1);
~}
\anotherpage
\problem{100}{%2018
Find the complete vector solution $\vec{x} = \vec{x}_h + \vec{x}_p$ for the nonhomogeneous system
$$\left(\begin{array}{rrrrrr}0&3&1&0&0\\
0&3&3&0&6\\
0&0&0&0&0\end{array}\right)
\colvector{x_1 \\ x_2 \\ x_3\\ x_4 \\ x_5} = \colvector{3 \\ 1 \\ 0}.$$
{\bf Expected}: 
{\small\sf (a) Augmented matrix. (b) Toolkit steps to RREF. (c) Translation of RREF to scalar equations. (d) Scalar general solution. (e) Find the homogeneous solution $\vec{x}_h$, which is a linear combination of Strang's special solutions. (f) Find a particular solution $\vec{x}_p$. (g) Write the vector general solution $\.x=\.x_h+\.x_p$.}
}{}{%2017 sol, invalid for 2018
%The augmented matrix has reduced row echelon form (last frame) equal to
%the matrix
%$\left(\begin{array}{cccc} 1& 0& -1/6& 1/2\\ 0& 1& 1/2& 1/2\\ 0& 0& 0& 0 \end{array}\right)$.
%Then $x_3=t_1, x_2=-t_1/2+1/2, x_1=t_1/6+1/2$ is the general solution in scalar form. The partial
%derivative on $t_1$ gives the homogeneous solution basis vector
%$\colvector{-1/6\\ -1/2\\ 1}$. Then $\vec{x}_h=c_1\colvector{-1/6\\ -1/2\\ 1}$. Set
%$t_1=0$ in the scalar solution to find a particular solution
%$\vec{x}_p=\colvector{1/2\\ 1/2 \\ 0}$.
%restart;
%with(LinearAlgebra):
%A:=Matrix( [[0,3,1,0,0], [0,3,3,0,6],[0,0,0,0,0]]);b:=<3,1,0>;
%V:=LinearSolve(A,b,free='t');ReducedRowEchelonForm(<A|b>);
%seq(map(diff,V,_t[i]),i=1..4);
%subs(_t[1]=0,_t[2]=0,_t[3]=0,_t[4]=0,V);
}
\anotherpage
\problem{100}{
%%%Not on the final exam S2012:
\begin{quote}\small\sf
{\bf Definition}. If $\.b_1,\.b_2,\.b_3$ are a basis for subspace $W$ of vector space $V$, and $\.x=c_1\vec{b}_1 + c_2\vec{b}_2+ c_3\vec{b}_3$ is a given linear combination of these vectors, then the uniquely determined constants $c_1,c_2,c_3$ are called the {\em coordinates of $\vec{x}$ relative to the
basis $\vec{b}_1, \vec{b}_2, \vec{b}_3$}.\end{quote}

Below, let $V$ be the vector space of all functions on $(-\infty,\infty)$.
Define subspace $S=\SPAN\{\vec{v}_1,\vec{v}_2,\vec{v}_3\}$ where $\vec{v}_1,\vec{v}_2, \vec{v}_3$
are independent vectors defined respectively by the equations $y=1+x$, $y=2+x^2$, $y=2+x+x^2$.

{\bf (a)} [40\%] Let $W=\SPAN\{1,x,x^2\}$. Assume known that $1,x,x^2$ are independent functions. Already, $S=\SPAN\{1+x,2+x^2,2+x+x^2\}$ is a subset of $W$. {\bf Prove} that $W$ is a subset of $S$ (this proves that $W=S$, therefore $\.v_1,\.v_2,\.v_3$ are independent).

\medskip

{\bf (b)} [60\%] Define vector $\.v$ in $S$ by equation $y=3+4x+x^2$.  {\bf Compute} $c_1$, $c_2$, $c_3$ satisfying the equation $\vec{v}=c_1\.v1+c_2\.v_2+c_3\.v_3$, using coordinate map methods. 

{\bf Expected in (b)}: {\small\sf Vectors $\.v_1,\.v_2,\.v_3$ are defined by $1+x,2+x^2,2+x+x^2$, respectively. Calculations of $c_1,c_2,c_3$ are to be done using column vectors from $\Rr^3$, not functions
from $V$. {\bf Zero credit} for not using column vectors.}
}{}{~}
%A:=<1,1,0|2,0,1|2,1,1>; v:=<3,4,1>; LinearSolve(A,v); c1,c2,c3=[1,-2,3];
%
\anotherpage
\problem{100}{The functions $1$, $x^2$, $x^4$ represent independent vectors $\vec{u}_1,\vec{u}_2,\vec{u}_3$ in the vector space $V$ of
all functions on $0< x < \infty$. The set $S=\SPAN\{\vec{u}_1,\vec{u}_2,\vec{u}_3\}$ is a subspace of $V$.
Let vectors $\vec{v}_1,\vec{v}_2,\vec{v}_3$ in $V$ be defined by the functions
$1-x^2, x^4+x^2, 3+2x^4$, respectively. The {\bf coordinate map} defined by
$$ c_1\vec{u}_1 +c_2\vec{u}_2+c_3\vec{u}_3 \to \minicolvector{c_1\\ c_2\\ c_3}$$
maps the vectors $\vec{v}_1,\vec{v}_2,\vec{v}_3$ into the following images in $\Rr^3$, respectively:
$$
\minicolvector{1\\ -1 \\ 0},\quad 
\minicolvector{0\\ 1 \\ 1},\quad 
\minicolvector{3 \\ 0 \\ 2}.
$$
The independence tests below can decide independence of vectors $\vec{v}_1,\vec{v}_2,\vec{v}_3$ by formulating the independence question in vector space $V$ or in vector space $\Rr^3$, because the coordinate map takes independent sets to independent sets.
\\[1pc]
{\bf Check below} all independence tests which apply to decide independence of $\vec{v}_1,\vec{v}_2,\vec{v}_3$. Explain how each checked test applies, giving details/reasons. {\bf Zero credit for checking a box without explanation}.
\begin{center}\begin{tabular}{llp{0.5\textwidth}}
 \checkbox~ & \bf Wronskian test & Nonzero Wronskian determinant of $f_1,f_2,f_3$ at invented value $x=x_0$ implies independence of $f_1,f_2,f_3$. \\
 {\bf Explain}:& \\[3pc]
 \checkbox~ & \bf Sampling test & Nonzero sampling determinant for invented samples $x=x_1,x_2,x_3$ implies independence of $f_1,f_2,f_3$. \\
 {\bf Explain}:& \\[3pc]
 \checkbox~ & \bf Rank test & Three column vectors are independent if their augmented matrix has rank 3. \\
 {\bf Explain}:& \\[3pc]
 \checkbox~ & \bf Determinant test & Three column vectors are independent if their augmented matrix is square and has nonzero determinant.
\\
 {\bf Explain}:& \\[3pc]
 \checkbox~ & \bf Orthogonality test & Three column vectors are independent if they are all nonzero and pairwise orthogonal.
 %\checkbox~ & \bf Euler Solution Test & Any finite set of distinct Euler solution atoms is independent.\\[1ex]
 \\
 {\bf Explain}:& \\[3pc]
 \checkbox~ & \bf Pivot test & Three column vectors are independent if their augmented matrix $A$ has 3 pivot columns. \\
 {\bf Explain}:
\end{tabular}\end{center}
}{}{~}
%The first and second apply to the given functions, while the others
%apply only to fixed vectors.
%
%
%\section*{Chapter 5: Eigenanalysis}
~\anotherpage
\problem{100}{Consider a $3\times 3$ real matrix $A$
%$$A=\left(\begin{array}{rrrr}
%  0 & 4 & -1 & 0 \\
% -4 & 0 & -2 & 1 \\
%  0 & 0 &  5 & 1 \\
%  0 & 0 & -3 & 1
% \end{array}\right)$$
%
%A:=matrix([[0 , 4 , -1 ],
%  [-4 , 0 , -2 ],
%  [0 , 0 ,  5  ]]);eigenvals(A);
%
%       # 5, 4 I, -4 I
with eigenpairs
$$\left(5 ,  \colvector{1\\ 1\\ -1}\right),
\quad \left(2+i, \colvector{i\\ 1\\ 0}\right),
\quad \left(2-i, \colvector{-i\\ 1\\ 0}\right).$$
%with(LinearAlgebra):P:=<1,1,-1|i,1,0|-i,1,0>^+;Determinant(P);
%P1:=<1,1,-1|0,1,0|1,0,0>^+;Determinant(P1);
\medskip
 {\bf (a)} [30\%] Display an invertible matrix $P$ and a
 diagonal matrix $D$ such that $AP=PD$. Matrices $P$ and $D$ can contain
complex numbers. 
\\[1pc]
  {\bf (b)} [30\%] Display a {\bf real} invertible matrix $P_1$ and a
 {\bf real} diagonal matrix $D_1$ such that $AP_1=P_1D_1$. Neither $P_1$ nor $D_1$ can contain
complex numbers. The construction of $D_1$ uses the map $a+ib \to \minitwobytwo{a&b}{-b&a}$.
\\[1pc]
  {\bf (c)} [40\%] Display a matrix product formula for $A$ in which the factors contain only real numbers. To save time, {\bf do not evaluate any matrix products}.
}{}{~}
%
\anotherpage
\problem{100}{~\newline
{\bf Definition}: A subset $S$ of a vector space $V$ is a {\bf subspace} of $V$ provided\\[1ex]
\begin{minipage}{\textwidth}\sf
 {\bf (1)}~ The zero vector is in $S$ \\
 {\bf (2)}~ If vectors $\.x$ and $\.y$ are in $S$, then $\.x+\.y$ is in $S$. \\
 {\bf (3)}~ If vector $\.x$ is in $S$ and $c$ is any scalar, then $c\.x$ is in $S$.
\end{minipage}
\\[2ex]
Let $V$ be the vector space of all real-valued functions on $(-\infty,\infty)$. Invent an example of a nonvoid subset $S$ of $V$ that satisfies two of the items in the above definition of subspace, but fails the third item.
}{}{~}
%(1) If the zero vector is not in $S$, then $S$ is not a subspace.\\
%(2) If two vectors in $S$ fail to have their sum in $S$, then $S$ is not a subspace.\\
%(3) If a vector is in $S$ but its negative is not, then $S$ is not a subspace.
%
\anotherpage
\problem{100}{
Define $S$ to be the set of all vectors
$\.x$ in $\Rr^{3}$ whose components $x_1,x_2,x_3$ satisfy the two restriction equations $x_1+x_2=x_3$ and  $2x_1 + 5x_2=x_3$.
Prove that
$S$ is a subspace of $\Rr^{3}$.\newline {\small\sf {\bf Expected}: Cite a known theorem or else verify the 3 conditions for the definition of a subspace (see the preceding exam problem).}
}{}{~}
\anotherpage
\problem{100}{
Let $A$ be a $4\times 3$ matrix. Assume the columns of $A^TA$ are independent. Prove or disprove that $A$ has independent columns.
\\[2ex]
{\small\sf {\bf Expected}: To prove a claim, assemble details and theorem citations to support the claim. To disprove a claim, invent a specific detailed example that violates the claim.}
}{}{~}
\anotherpage
\problem{100}{
Let $U$ be a $2\times 2$ matrix with $U^TU=I$. Let $\.u_1,\.u_2$ denote the columns of $U$. Prove that the columns of $U$ are orthonormal.
}{}{~}
\iffalse
\anotherpage
\problem{100}{Let $3\times 3$ matrices $A$, $B$ and $C$ be
related by $AP=PB$ and $BQ=QC$ for some invertible matrices $P$ and $Q$. Assume $B$ has eigenvalues $2,3,7$.
Prove that matrices $A$ and $C$ also have eigenvalues $2,3,7$.
}{}{~}

\anotherpage
\problem{100}{
The {\bf Fundamental Theorem of Linear Algebra} says that the null space of a matrix is orthogonal to the row space of the matrix.\\[1pc]
Let $A$ be an $m\times n$ matrix. Define subspaces
$S_1$ = column space of $A$,
$S_2$ = null space of $A^T$.
Prove that the only vector $\vec{v}$ in both $S_1$ and $S_2$ is the zero vector.
}{}{~}
\fi
% Problems End Here % ------------------------------------------------------- %
\problemsdone
\end{document}

% End of the Document
