
\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]
5\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}
\usepackage{alltt}

% Beginning of the Document

\begin{document}
\examtitle{MATH 2270-2}{Exam 1}{Spring 2018}

\studentinfo
\instructions{No books or notes. No electronic devices, please.\\
Each question has credit 100, with multiple parts given a percentage of the total 100.\\ 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{100}{%
~\\
Symbol $I$ is used below for the $n\times n$ identity. Notation $C^T$ means the transpose of matrix $C$.
Accept as known theorems the following results:
\begin{quote}\sf
{\bf Theorem 1}. If $A$ and $B$ are $n\times n$ and $AB=I$, then $BA=I$.
\newline
{\bf Theorem 2}. If $A$ and $B$ are invertible $n\times n$, then $AB$ is invertible and $\left(AB\right)^{-1}=B^{-1}A^{-1}$.
\newline
{\bf Theorem 3}. If matrices $F$, $G$ have dimensions allowing $FG$ to be defined, then $(FG)^T = G^TF^T$.
\newline
{\bf Theorem 4}. If matrices $F$, $G$ have dimensions allowing $F+G$ to be defined, then $(F+G)^T = F^T + G^T$.
\newline
{\bf Theorem 5}. If $C$ is $n\times n$ invertible, then $C^T$ is invertible and $\left(C^T\right)^{-1}=\left(C^{-1}\right)^T$.
\newline
{\bf Theorem 6}. If $A$ and $B$ are $n\times n$, then $|AB|=|A||B|$ {\footnotesize (Determinant Product Theorem)}.
\newline
{\bf Theorem 7}. Assume $A$ is $n\times n$. Matrix $A$ is invertible if and only $|A|\ne 0$.

\end{quote}
\medskip
In each of parts {\bf (a)} and {\bf (b)}, either invent a counter example or else explain why it is true citing the theorems above.
\begin{itemize}
\item[{\bf (a)}] [50\%]
  If matrices $A$, $B$ are $n\times n$ with $A^T=A$ and $A^{-1}$ exists, then
$A(A^{-1}+B)^T = I + (BA)^T$.

\item[{\bf (b)}] [50\%]~  If matrices $A$, $B$ are $n\times n$ and $A^2B^2$ is not invertible, then both $A$ and $B$ have determinant zero.
\end{itemize}
}{}{%
(a) TRUE.
Why it is true: \newline
$A(A^{-1}+B)^T =A^T(A^{-1}+B)^T$ because $A=A^T$\newline
$\phantom{A(A^{-1}+B)^T}= A^T((A^{-1})^T + B^T)$ because of Theorem 4.\newline
$\phantom{A(A^{-1}+B)^T}= A^T(A^{-1})^T + A^TB^T$ by matrix multiply.\newline
$\phantom{A(A^{-1}+B)^T}=(A^{-1}A)^T+(BA)^T$ because of Theorem 3.\newline
$\phantom{A(A^{-1}+B)^T}=I+(BA)^T$ because $A$ is invertible.
\\
~\\
(b) FALSE. Let $A=I$ and let $B$ equal the zero matrix. Then $A^2B^2$ is the zero matrix, which has determinant zero and therefore it is not invertible by Theorem 7. 
However, $|A|=1$ even though $|B|=0$. Conclusion: the hypotheses are true but the conclusion is false.
}
\vfill\anotherpage
\problem{100}{%
\newline\noindent\fbox{\begin{minipage}{0.9\textwidth}
{\bf Definition}: {\sf 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.}
\end{minipage}}
\medskip
\newline
Let $A$ be a $3\times 6$ matrix. Find the elimination matrix $E$ which
under left multiplication against matrix $A$ performs (1), (2) and (3) below with one matrix multiply.
\begin{itemize}
\item[{\bf (1)}] Replace Row 3 of $A$ with Row 3 minus Row 1 to obtain new matrix $A_1$.
\item[{\bf (2)}] Swap Row 2 and Row 3 of $A_1$ to obtain new matrix $A_2$.
\item[{\bf (3)}] Multiply Row 2 of $A_2$ by $1/2$ to obtain new matrix $A_3$.
\end{itemize}
}{}{%
Do (1), (2), (3) in order with $A$ replaced by the identity $I$. The result is $E$.
This answer is identical to the product $E=E_3E_2E_1$ where
\begin{itemize}
\item[{\bf (1)}] $E_1$ represents {\tt combo(1,3,-1)} applied to the identity $I$.
\item[{\bf (2)}] $E_2$ represents {\tt swap(2,3)} applied to the identity $I$.
\item[{\bf (3)}] $E_3$ represents {\tt mult(2,1/2)} applied to the identity $I$.
\end{itemize}
Instead of performing matrix multiplies, we create $E$ with a toolkit sequence as follows:
$$
\begin{array}{l}
\begin{pmatrix}   1 & 0 &  0\\
                     0 & 1 &  0 \\
                     0 & 0 &  1 \end{pmatrix}
\\
 \begin{pmatrix}   1 & 0 &  0\\
                     0 & 1 &  0 \\
                    -1 & 0 &  1 \end{pmatrix} \quad\mbox{{\tt combo(1,3,-1)}}
\\
 \begin{pmatrix} 1 & 0 &  0 \\
                  -1 & 0 &  1 \\
                   0 & 1 &  0  \end{pmatrix} \quad\mbox{{\tt swap(2,3)}}
\\
 \begin{pmatrix} 1 & 0 &  0 \\
                  -\frac12 & 0 &  \frac12 \\
                   0 & 1 &  0  \end{pmatrix} \quad\mbox{{\tt mult(2,1/2)}}
                   \end{array}$$
}
\vfill\anotherpage
\problem{100}{
Let $a$, $b$ and $c$ denote
constants and consider the system of equations
$$\left\{\begin{array}{rcrcrcrc}
cx&+& by&+& z &=& a \\
(b+c)x&-& ay&+& 2z &=& -a \\
bx&+& ay&+& z &=& -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)}] [40\%] The system has a unique solution for $(b-c)(2a+b)\ne 0$.

\item[{\bf (b)}] [30\%] The system has no solution if $b+2a=0$ and $a\ne 0$ (don't explain the other possibilities).

\item[{\bf (c)}] [30\%] The system has infinitely many solutions if $a=b=c=0$ (don't explain the other possibilities).
\end{itemize}

}{}{
The system can be written as
$$
\left(\begin{array}{ccc}
c  &  b  & 1 \\
b+c  &  -a  & 2 \\
b  &   a   & 1 \\
\end{array}\right)
\left(\begin{array}{r} x \\ y \\ z
\end{array}\right)
= \left(\begin{array}{r} a \\ -a \\ -a
\end{array}\right)
$$
%% Matrix([[c,b,1,a],[b+c,-a,2,-a],[b,a,1,-a]])
which will be referenced in the solution below as $A\vec{u}=\vec{b}$.\newline
(a) {\bf Uniqueness}: This requires zero free variables. Then the determinant of the coefficient matrix $A$ must be nonzero. After 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) {\bf No solution}: The toolkit of combo, swap and mult are used in part (b). We seek a signal equation when $b+2a=0$ and $a\ne 0$.  After 3 combo steps the matrix is transformed into
$$A_3=\left(\begin {array}{cccc} c&b&1&a\\ -c+b&-2\,b-a&0 &-3\,a\\ 0&b+2\,a&0&a\end {array}
\right)$$
The last row of $A_3$ is a signal equation if $b+2a=0$ and $a\ne 0$. The combo details are in the Maple code below.

(c) {\bf Infinitely many solutions}: If $a=b=c=0$, then from part (b)
$$A_3=\left(\begin{array}{rrrr} 0& 0& 1& 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. A homogeneous problem always has solution zero, therefore it never has a signal equation. Therefore the system has infinitely many solutions.

A full analysis of the three possibilities is fairly complex.

The sequence of steps used in (a), (b), (c) are documented below for maple.
\begin{alltt}
 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([[c,b,1,a],[b+c,-a,2,-a],[b,a,1,-a]]);\newline
 linalg[det](A(a,b,c)[1..3,1..3]);\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{alltt}
}

\vfill\anotherpage
%Continued\vfill\anotherpage

\fbox{\begin{minipage}{0.9\textwidth}
{\bf Definition}. {\small\sf Vectors $\vec{v}_1, \ldots, \vec{v}_k$ are
called {\bf independent} provided solving vector equation $c_1 \vec{v}_1 +
\cdots + c_k \vec{v}_k = \vec{0}$ for constants $c_1,\ldots, c_k$ results in
the unique solution $c_1=\cdots=c_k=0$. Otherwise the vectors are called
{\bf dependent}.}
\end{minipage}
}
\medskip

\problem{100}{%
Solve parts (a), (b) and (c) using the vectors displayed below. Expected is application of the
Pivot Theorem or the definition of independence (above).
Details are 75\%, answer 25\%.

% C:=<1,0,0,1,1|1,2,0,2,2|0,2,0,1,1|1,0,0,2,2>^+;
\[
\begin{pmatrix}
  1\\ 0 \\ 0 \\ 1 \\ 1
\end{pmatrix},
\begin{pmatrix}
  1\\ 2 \\ 0 \\ 2 \\ 2
\end{pmatrix},
\begin{pmatrix}
  0\\ 2 \\ 0 \\ 1 \\ 1
\end{pmatrix},
\begin{pmatrix}
  1\\ 0 \\ 0 \\ 2 \\ 2
\end{pmatrix}
\]

{\bf (a)} [50\%]
Show details for the dependence of the $4$ vectors.
\newline
{\bf (b)} [20\%]
List a maximum number of independent vectors extracted from the $4$ vectors.
\newline
{\bf (c)} [30\%]
Explain why the $4$ column vectors fail to span the vector space $\Rr^5$, without
using the results from parts (a), (b).
}{}{
{\bf (a)}~ The vectors are dependent by the Pivot Theorem because 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&1&0&1\\ 
 0&2&2&0\\
 0&0&0&0\\ 
 1&2&1&2\\
 1&2&1&2
\end{pmatrix} \quad\mbox{has RREF =}\quad
\begin{pmatrix}
  1&0&-1&1\\ 
  0&1&1&0\\ 
  0&0&0&0\\ 
  0&0&0&0\\ 
  0&0&0&0
\end{pmatrix}\]
\newline
{\bf (b)}~ A maximum number of independent vectors is vectors 1,2. The third and fourth are dependent upon vectors 1,2.
\newline
{\bf (c)}~ Theorem: Less than $n$ vectors in $\Rr^n$ cannot span $\Rr^n$.
}

\medskip\vfill\anotherpage
\problem{100}{
Find the vector general solution $\vec{x}$ to the equation $A\vec{x}=\vec{b}$ for
\[A=
\begin{pmatrix}
  1 & 0 & 0 &4\\
  3 & 0 & 1 &0 \\
  4 & 0 & 1 & 4\\
  0 & 0 & 0 & 0 \\
\end{pmatrix}
,\quad
\vec{b}=
\begin{pmatrix}
  0\\4 \\ 4\\ 0
\end{pmatrix}
\]

\medskip
{\bf Expected}: (a) [10\%] Augmented matrix, (b) [40\%] Toolkit steps for the RREF, (c) [10\%] Conversion of RREF to scalar equations,
(d) [20\%] Last frame Algorithm details to write out the scalar general solution, (e) [20\%] Conversion of the scalar general solution to the vector general solution. This answer is in the form of a single vector equation for $\vec{x}$,  the solution of system $A\vec{x}=\vec{b}$.
}{}{
% A:=<1 , 0 , 0 ,4|  3 , 0 , 1 ,0 |  4 , 0 , 1 , 4|  0,0,0,0 >^+;
% b:=<0,4,4,0>;LinearSolve(A,b,free = 't');
The augmented matrix for this system of equations is
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  3 & 0 & 1 &0 & 4 \\
  4 & 0 & 1 & 4 & 4 \\
  0 & 0 & 0 & 0 & 0 \\
\end{pmatrix}\]
The reduced row echelon form is found as follows:
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  0 & 0 & 1 &-12 & 4 \\
  4 & 0 & 1 & 4 & 4 \\
  0 & 0 & 0 & 0 & 0 \\
\end{pmatrix}\quad\mbox{combo(1,2,-3)}
\]
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  0 & 0 & 1 &-12 & 4 \\
  0 & 0 & 1 &-12 & 4 \\
  0 & 0 & 0 & 0 & 0 \\
\end{pmatrix}\quad\mbox{combo(1,3,-4)}
\]
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  0 & 0 & 1 &-12 & 4 \\
  0 & 0 & 0 &0 & 0 \\
  0 & 0 & 0 & 0 & 0 \\
\end{pmatrix}\quad\mbox{combo(2,3,-1)}
\]
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  0 & 0 & 1 &-12 & 4 \\
  0 & 0 & 0 &0 & 0 \\
  0 & 0 & 0 &0 & 0 \\
\end{pmatrix}\quad\mbox{last frame}
\]
The last frame, or RREF, is equivalent to the scalar system
$$\begin{array}{rrrrrrrrrrrr}
x_1 && &&     &+&   4x_4  &=& 0 \\
    && && x_3 &-&  12x_4   &=& 4\\
    && &&     && &=& 0 \\
    && &&     && &=& 0 \\
\end{array}
$$
The lead variables are $x_1,x_3$ and the free variables are $x_2,x_4$.
The last frame algorithm introduces invented symbols $t_1,t_2$. The free
variables are set to these symbols, then back-substitute into the lead
variable equations of the last frame to obtain the scalar general solution
$$
\begin{array}{rrrrrrr}
x_1 &=& -4t_2,\\
x_2 &=& t_1,\\
x_3 &=& 4+12t_2,\\
x_4 &=& t_2.
\end{array}
$$
Strang's {\em special solutions} are $\vec{v}_1, \vec{v}_2$, obtained as the partial derivatives of $\vec{x}$
on the invented symbols $t_1,t_2$, respectively. A particular solution $\vec{x}_p$ is
obtained by setting all invented symbols to zero. Then
$$
\vec{x} = \vec{x}_p + t_1\vec{v}_1 +t_2\vec{v}_2 =
\left(\begin{array}{r}0\\ 0 \\ 4\\ 0\end{array}\right)
+t_1\left(\begin{array}{r} 0\\ 1 \\ 0\\ 0\end{array}\right)+t_2\left(\begin{array}{r} -4\\ 0 \\ 12\\ 1\end{array}\right)
$$
}

\vfill\anotherpage
\problem{100}{
 Determinant problem, chapter 3. \\
Details 75\%, answers 25\%.\\
\medskip
 {\bf (a)} [30\%] Assume given $3\times 3$ matrices $A$, $B$. Assume $E_1$, $E_2$, $E_3$ are
 elementary matrices representing respectively a combination, a swap
and a multiply by $4$. Assume $\det(B)=5$ and  $E_3E_2E_1A=A^2B^3$.
 Let $C=-2A$. Find all possible values of $\det(C)$.
\newline
{\bf (b)} [30\%] Determine all values of $x$ for which $A^{-1}$
exists, where $A=I+C$, $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
{\bf (c)} [40\%] 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}$.
}{}{
\newline
(a)  Start with the determinant product theorem $|FG|=|F||G|$. Apply it to obtain
$|E_3||E_2||E_1||A|=|A|^2|B|^3$. Let $x=|A|$, $|B|=5$, $|E_1|=1$, $|E_2|=-1$ and $|E_3|=4$ in this equation to obtain quadratic equation 
$(4)(-1)(1)x=x^2(5)^3$.
Then solve for $x=0$ or $x=-4/5^3$. 
 Then $|C|=|(-2I)A|=|-2I||A|=-8x$. The answer is $|C|=-8x=0$ or $|C|=-8x=(-8)(-4/5^3)=\frac{32}{125}$.
\newline
(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$.
\newline
(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 $\frac{c}{2}-b$. A maple check:
\begin{alltt}
 C4:=Matrix([[1,0,0,0],[1,-2,0,0],[a,b,0,1],[1,c,1,2]]);\newline
1/C4; # The inverse matrix\newline
C5:=linalg[minor](C4,2,3);\newline
top:=linalg[det](C5)*(-1)\^{}(2+3);bot:=linalg[det](C4);top/bot;\newline
 \# ans =c-2b divided by 2
\end{alltt}
}
%\vfill\anotherpage
%\phantom{page}
%\vfill
\begin{center} End Exam 1.\end{center}

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

\problemsdone
\end{document}

% End of the Document
