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

% Use this one to print just the question sheet.
\usepackage[questions]{mathtest}[2001/05/12]
\let\vfill\relax\let\anotherpage\relax\let\finishfirstpage\relax
\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]
%\let\finishfirstpage\relax
%\let\anotherpage\relax

% 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 1}{Spring 2017}

\studentinfo
\instructions{No books or notes. No electronic devices, please.\\
Each question has credit 10 or 20, which reflects 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.
\\
%The actual exam will have the same number of problems, identical problem
%types, on exactly the same topics. Covered on the exam are chapters 1, 2, 3
%from the 2270 textbook [{\bf Lay} et al]. \\~
}
\finishfirstpage
% Problems Start Here % ----------------------------------------------------- %


\problem{10}{%
~\\
Assume that matrices $A$ and $B$ are $n\times n$,
matrix $I$ is the $n\times n$ identity and $C^T$ denotes the transpose of a matrix $C$.
\medskip
\begin{itemize}
\item[{\bf (a)}]
 Give a counter example or explain why it is true. If 
matrix $A$ is invertible, then
$A^T(A^{-1}+B)^T = I + (BA)^T$.

\item[{\bf (b)}] Give a counter example or explain why it is true. If $A^2B^2=I$, then $AB$ is the inverse of $BA$.
\end{itemize}
}{}{%
~\\
(a) TRUE. In general $(CD)^{-1}$ is the product of the inverses in reverse order, $D^{-1}C^{-1}$.
The same is true for transposes. And transpose and inverse commute: $(C^T)^{-1}=(C^{-1})^T$.
Why it is true: $A^T(A^{-1}+B)^T = A^T((A^{-1})^T + B^T) = A^T(A^{-1})^T + A^TB^T=(A^{-1}A)^T+(BA)^T=I+(BA)^T$
\\
(b) TRUE. It is a standard theorem that $CD=I$ implies $DC=I$ for square matrices $C$, $D$. 
The determinant product theorem applied to $A^2B^2=I$ implies $|A|\ne 0$ and $|B|\ne 0$.
To show $AB$ is the inverse of $BA$ we only have to prove $(AB)(BA)=I$ (use $C=AB, D=BA$ in the theorem cited).
Here's how: $(AB)(BA)=A^{-1}AABBA=A^{-1}(A^2B^2)A=A^{-1}(I)A=I$.
}
\vfill\anotherpage
\problem{10}{%
Definition: An {\bf elementary matrix} is the answer after applying exactly one combo, swap or multiply to the identity matrix $I$. An {\bf elimination matrix}
is a product of elementary matrices.

Let $A$ be a $3\times 4$ matrix. Find the elimination matrix $E$ which
under left multiplication against matrix $A$ performs both (1) and (2) below with one matrix multiply.
\begin{itemize}
\item[{\bf (1)}] Replace Row 3 of $A$ with Row 3 minus Row 1.
\item[{\bf (2)}] Replace Row 3 of $A$ by Row 3 minus 5 times Row 2.
\end{itemize}
}{}{%
Perform combo(1,3,-1) on $I$ then combo(2,3,-5) on the result. The elimination matrix is
\[ E=\begin{pmatrix} 1 & 0 &  0\\
                     0 & 1 & 0 \\
                    -1 & -5 &  1 \end{pmatrix}\]
}
\vfill\anotherpage
\problem{20}{
Let $a$, $b$ and $c$ denote
constants and consider the system of equations
$$
\left(\begin{array}{ccc}
1  &  c  & b \\
2  &  b+c  & a \\
1  &   b   & -a \\
\end{array}\right)
\left(\begin{array}{r} x \\ y \\ z
\end{array}\right)
= \left(\begin{array}{r} -a \\ a \\ a
\end{array}\right)
$$
Use techniques learned in this course to briefly explain the following facts. Only write what is needed to justify a statement.
\begin{itemize}
\item[{\bf (a)}.] The system has a unique solution for $(c-b)(2a-b)\ne 0$.
\newline
\item[{\bf (b)}.] The system has no solution if $b=2a$ and $a\ne 0$ (don't explain the other possibilities).
\newline
\item[{\bf (c)}.] The system has infinitely many solutions if $a=b=c=0$ (don't explain the other possibilities).
\end{itemize}

}{}{

(a) Uniqueness requires zero free variables. Then the determinant of the coefficient matrix $A$ must be nonzero. After the cofactor expansion the determinant
is factored as $(b-2a)(b-c)$. The inverse of the coefficient matrix then exists for $(b-2a)(b-c)\ne 0$, which implies equation 
$A\vec{u}=\vec{b}$ has unique solution $\vec{u}=A^{-1}\vec{b}$.


(b) No solution: Combo, swap and mult are used in part (b) with $b=2a$ substituted into the system of equations. After 3 combo steps the matrix is transformed into
$$A_3=\left(\begin{array}{rrrr}1& c& 2a& -a\\ 0& 2a-c& -3a& 3a\\ 0& 0& 0& a \end{array}\right)$$
The last row of $A_3$ is a signal equation if $b=2a=0$ and $a\ne 0$. 

 

(c) Infinitely many solutions: If $a=b=c=0$, then from part (b)
$$A_3=\left(\begin{array}{rrrr}1& 0& 0& 0\\ 0& 0& 0& 0\\ 0& 0& 0& 0 \end{array}\right)$$
Matrix $A_3$ has one lead variable and two free variables, because the last two rows of $A_3$ are zero. This homogeneous problem has no signal equation, therefore it has infinitely many solutions. 

A full analysis of the three possibilities is fairly complex.

The sequence of steps are documented below for maple.
\begin{verbatim}
 combo:=(A,s,t,m)->linalg[addrow](A,s,t,m);\newline
 mult:=(A,t,m)->linalg[mulrow](A,t,m);\newline
 swap:=(A,s,t)->linalg[swaprow](A,s,t);\newline
 A:=(a,b,c)->Matrix([[1,c,b,-a],[2,b+c,a,a],[1,b,-a,a]]);\newline
 A1:=combo(A(a,b,c),1,2,-2);\newline
 A2:=combo(A1,1,3,-1);\newline
 A3:=combo(A2,2,3,-1);
\end{verbatim}
}

\vfill\anotherpage
%Continued\vfill\anotherpage

{\bf Definition}. {\small\em Vectors $\vec{v}_1, \ldots, \vec{v}_k$ are
called {\bf independent} provided solving the equation $c_1 \vec{v}_1 +
\cdots + c_k \vec{v}_k = \vec{0}$ for constants $c_1,\ldots, c_k$ has
the unique solution $c_1=\cdots=c_k=0$. Otherwise the vectors are called
{\bf dependent}.}

\problem{20}{%
Classify the following set of vectors as Independent or Dependent,
using the Pivot Theorem, the Rank Theorem or the definition of independence (above).
Details are 75\%, answer 25\%. 


\[
\begin{pmatrix}
  1\\ 0 \\ 0 \\ 1 \\ 1
\end{pmatrix},
\begin{pmatrix}
  0\\ 2 \\ 0 \\ 1 \\ 1
\end{pmatrix},
\begin{pmatrix}
  1\\ 2 \\ 0 \\ 2 \\ 2
\end{pmatrix},
\begin{pmatrix}
  1\\ 0 \\ 0 \\ 2 \\ 2
\end{pmatrix}
\]
}{}{
The vectors are dependent. The augmented matrix of the vectors
has pivot columns 1,2,4. Therefore, vectors 1, 2, 4 are independent.
By the Pivot Theorem, the third vector is a linear combination of the
pivot columns 1,2,4. 
\[\begin{pmatrix}
  1 & 0 & 1 &1\\
  0 & 2 & 2 & 0 \\
  0 & 0 & 0 &0 \\
  1 & 1& 2 &2 \\
  1 & 1& 2 &2  
\end{pmatrix} \quad\mbox{$=>$}\quad
\begin{pmatrix}
  1 & 0 & 1 &1\\
  0 & 1 & 1 & 0 \\
  0 & 0 & 0 &1 \\
  0 & 0 & 0 &0 \\
  0 & 0 & 0 &0  
\end{pmatrix}\]
}

\vfill\anotherpage
\problem{20}{
Find the vector general solution $\vec{x}$ to the equation $A\vec{x}=\vec{b}$ for
\[A=
\begin{pmatrix}
  1 & 0 & 0 &4\\
  4 & 0 & 0 & 1 \\
  6 & 0 & 2 &0 
\end{pmatrix}
,\quad
\vec{b}=
\begin{pmatrix}
  0\\ 0 \\ 4
\end{pmatrix}
\]
% C:=<1,0,0,4|4,0,0,1|6,0,2,0>^+;C1:=<C|<0,0,4>>;linalg[rref](C1);
}{}{
The augmented matrix for this system of equations is
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  4 & 0 & 0 & 1 & 0\\
  6 & 0 & 2 &0 & 4 
\end{pmatrix}\]
The reduced row echelon form is found as follows:
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  0 & 0 & 0 & -15 & 0\\
  6 & 0 & 2 &0 & 4 
\end{pmatrix}\quad\mbox{combo(1,2,-4)}
\]
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  0 & 0 & 0 & -15 & 0\\
  0 & 0 & 2 & -24 & 4
\end{pmatrix}\quad\mbox{combo(1,3,-6)}
\]
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  0 & 0 & 0 & 1 & 0\\
  0 & 0 & 2 & -24 & 4
\end{pmatrix}\quad\mbox{mult(2,-1/15)}
\]
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  0 & 0 & 0 & 1 & 0\\
  0 & 0 & 2 & 0 & 4
\end{pmatrix}\quad\mbox{combo(2,3,24)}
\]
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  0 & 0 & 0 & 1 & 0\\
  0 & 0 & 1 & 0 & 2
\end{pmatrix}\quad\mbox{mult(3,1/2)}
\]
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  0 & 0 & 1 & 0 & 2 \\
    0 & 0 & 0 & 1 & 0
\end{pmatrix}\quad\mbox{swap(2,3); last frame}
\]
The last frame, or RREF, implies the system
$$\begin{array}{rrrrrrrrrrrr}
x_1 && &&     &&     &=& 0 \\
    && && x_3 &&     &=& 2\\
    && &&     && x_4 &=& 0
\end{array}
$$
The lead variables are $x_1,x_3,x_4$ and the free variable is $x_2$.
The last frame algorithm introduces invented symbol $t_1$. The free
variable is set to this symbol, then back-substitute into the lead
variable equations of the last frame to obtain the general solution
$$
\begin{array}{rrrrrrr}
x_1 &=& 0,\\
x_2 &=& t_1,\\
x_3 &=& 2,\\
x_4 &=& 0.
\end{array}
$$
Strang's {\em special solution} $\vec{s}_1$ is the partial of $\vec{x}$
on the invented symbol $t_1$. A particular solution $\vec{x}_p$ is
obtained by setting all invented symbols to zero. Then

$$
\vec{x} = \vec{x}_p + t_1\vec{s}_1 =
\left(\begin{array}{r}0\\ 0 \\ 2\\ 0\end{array}\right)
+t_1\left(\begin{array}{r}0\\ 1 \\ 0\\ 0\end{array}\right)
$$

}

\vfill\anotherpage
\problem{20}{
 Determinant problem, chapter 3. \\
 (a) [30\%] Assume given $3\times 3$ matrices $A$, $B$. Suppose
 $E_3E_2E_1A=A^2B^2$ and $E_1$, $E_2$, $E_3$ are
 elementary matrices representing respectively a combination, a swap
and a multiply by $3$. Assume $\det(B)=-5$.
 Let $C=2A$. Find all possible values of $\det(C)$.
\newline
(b) [20\%] Determine all values of $x$ for which $(I+C)^{-1}$
exists, where $I$ is the $3\times 3$ identity and $C=\left(
\begin{array}{cccc}
2 &   x  & -1 \\
x &  1 & 1  \\
1 & 0 & -1
\end{array}\right)
$.

\newline
 c) [30\%] Let symbols $a, b, c$ denote constants and define
$$ A=\left(\begin{array}{rrrr}
 1 & 0 &  0 & 0 \\
 1 & -2 &  0 & 0  \\
 a & b &  0 & 1 \\
 1 & c &  1 & 2
\end{array}\right)
$$
Apply the  adjugate [adjoint] formula for the inverse
$$A^{-1} = \frac{\adj(A)}{|A|}$$
to find the value of the entry in row
 $3$, column $2$ of $A^{-1}$.

}{}{
 ~ \\
(a)  Start with the determinant product theorem $|FG|=|F||G|$. Apply it to obtain
$|E_3||E_2||E_1||A|=|A|^2|B|^2$. Let $x=|A|$ in this equation and solve for $x$. You will need to know that
$|B|=-5$, $|E_1|=1$, $|E_2|=-1$ and $|E_3|=3$. Then $|C|=|(2I)A|=|2I||A|=8x$. The answer is $|C|=0$ or $|C|=24/5$.
(b)  Find $C+I=\left( \begin {array}{ccc} 3&x&-1\\ \noalign{\medskip}x&2&1
\\ \noalign{\medskip}1&0&0\end {array} \right)
$, then evaluate its determinant, to eventually solve for $x= -2$. Used here is $F^{-1}$ exists if and only if $|F|\ne 0$.
The answer is $I+C$ has an inverse for all $x\ne -2$.
\\
(c) Find the cross-out determinant in row 2, column 3 (no mistake, the transpose swaps rows and columns). Form the fraction, top=checkboard sign times cross-out determinant, bottom=$|A|$. The value is $b-\frac{c}{2}$. A maple check:
\begin{verbatim}
 C4:=Matrix([[1,0,0,0],[1,-2,0,0],[a,b,0,1],[1,c,1,2]]);
 1/C4; # The inverse matrix
 C5:=linalg[minor](C4,2,3); linalg[det](C5)*(-1)^(2+3);linalg[det](C4);
 # ans =-c+2b divided by 2
\end{verbatim}
}



%\vfill\anotherpage
%\phantom{page}
%\vfill
\begin{center} End Exam 1.\end{center}

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

\problemsdone
\end{document}

% End of the Document
