
\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

% 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

% 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 2016}

\studentinfo
\instructions{No books or notes. No electronic devices, please.\\
The questions have credits 10 to 30, 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.
\\~
}
\finishfirstpage
% Problems Start Here % ----------------------------------------------------- %


\problem{10}{%
~\\
(a) Give a counter example or explain why it is true. If $A$ and $B$ are $n\times n$
invertible, and $C^T$ denotes the transpose of a matrix $C$, then
$((A+B)^{-1})^{T}=(B^T)^{-1} +  (A^{T})^{-1}$.\\
\medskip
(b) Give a counter example or explain why it is true. If $A$ is a square matrix and
$A^TA=I$, then both $A$ and $A^T$ are invertible.
}{}{%
~\\
(a) FALSE. If $A=A^T$ and $B=B^T$, then the claim is $(A+B)^{-1}=A^{-1} + B^{-1}$. If $B=-A$, then the left side is ill-defined (has no inverse). A counter example is $A=-B=I$.
\\
(b) By the determinant product theorem, $1=|I|=|A^TA|=|A^T||A|$. Then both $|A|$ and $|A^T|$ are nonzero, hence both $A$ and $A^T$ have an inverse.
}
\vfill\anotherpage
\problem{10}{%
Let $A$ be a $3\times 4$ matrix. Find the elimination matrix $E$ which
under left multiplication against $A$ performs both (1) and (2) with one matrix multiply.
\begin{itemize}
\item[{\bf (1)}] Replace Row 2 of $A$ with Row 2 minus Row 1.
\item[{\bf (2)}] Replace Row 3 of $A$ by Row 3 minus 5 times Row 2.
\end{itemize}
}{}{%
Perform combo(1,2,-1) on $I$ then combo(2,3,-5) on the result. The elimination matrix is
\[
 E=\threebythree{ 1 & 0 &  0}
                {   -1 & 1 & 0}
                {    5 & -5 &  1 }
\]
}
\vfill\anotherpage
\problem{30}{
Let $a$, $b$ and $c$ denote
constants and consider the system of equations
$$
\left(\begin{array}{ccc}
1  &  -b  & c \\
1  &   c   & a \\
2  &  -b+c  & -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 $(b+c)(2a+c)\ne 0$.
\newline
\item[{\bf (b)}.] The system has no solution if $2a+c=0$ and $a\ne 0$ (don't explain the other possibilities).
\newline
\item[{\bf (c)}.] The system has infinitely many solutions if $a=c=0$ (don't explain the other possibilities).
\end{itemize}

}{}{
% A4 := [[1, -b, c, a], [0, b+c, -c+a, -2*a], [0, 0, -c-2*a, -a]]
Combo, swap and mult are used to obtain in 3 combo steps the matrix
$$A_3=\left(\begin{array}{rrrr}1& -b& c& a\\ 0& b+c& -c+a& -2a\\ 0& 0& -c-2a& -a \end{array}\right)$$
(a) Uniqueness requires zero free variables. Then the diagonal entries of the last frame must be nonzero, written simply as
$-(c+b)(2a+c)\ne 0$, which is equivalent to the determinant of the $3\times 3$ coefficient matrix not equal to zero.

(b) No solution: The last row of $A_3$ is a signal equation if $c+2a=0$ and $a\ne 0$.

(c) Infinitely many solutions: If $a=c=0$, then $A_3$ has last row zero. If $a=c=0$ and $b=0$, then there is one lead variable and two free variables, because the last two rows of $A_3$ are zero. If $a=c=0$ and $b\ne 0$, then there are two lead variables and one free variable. The homogeneous problem has infinitely many solutions, because of at least one free variable and no signal equation.

The sequence of steps are documented below for maple.\newline
\begin{tt}
 with(LinearAlgebra):\newline
 combo:=(A,s,t,m)->LinearAlgebra[RowOperation](A,[t,s],m);\newline
 mult:=(A,t,m)->LinearAlgebra[RowOperation](A,t,m);\newline
 swap:=(A,s,t)->LinearAlgebra[RowOperation](A,[s,t]);\newline
 A:=(a,b,c)->Matrix([[1,b,c,-a],[1,c,-a,a],[2,b+c,a,a]]);\newline
 A0:=A(a,b,c);\newline
 A1:=combo(A(a,b,c),1,2,-1);\newline
 A2:=combo(A1,1,3,-2);\newline
 A3:=combo(A2,2,3,-1);\newline
 A4:=convert(A3,list,nested=true);\newline
 A4 := [[1, -b, c, a], [0, b+c, -c+a, -2*a], [0, 0, -c-2*a, -a]];\newline
\end{tt}
}

\vfill\anotherpage
%Continued\vfill\anotherpage
\problem{20}{%
{\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}.}
\newline
Find a largest set of independent vectors from the following set of vectors,
using the definition of independence (above). You may use the Pivot Theorem without explanation.
Any independence test from a reference textbook may be used, provided you state the test.
\[
\begin{pmatrix}
  1\\ 0 \\ 0 \\ 0 \\ 0
\end{pmatrix},
\begin{pmatrix}
  1\\ 2 \\ 0 \\ 0 \\ 0
\end{pmatrix},
\begin{pmatrix}
  0\\ 0 \\ 0 \\ 0 \\ 0
\end{pmatrix},
\begin{pmatrix}
  1\\ 0 \\ 0 \\ 0 \\ 1
\end{pmatrix},
\begin{pmatrix}
  3\\ 2 \\ 0 \\ 0 \\ 1
\end{pmatrix},
\begin{pmatrix}
  2\\ 0 \\ 0 \\ 0 \\ 1
\end{pmatrix}
\]
}{}{ The given set of vectors is dependent. The augmented matrix of
the six vectors is
$$\left(\begin{array}{cccccc}
1 &1 &0 &1 &3 &2 \\
0 &2 &0 &0 &2 &0 \\
0 &0 &0 &0 &0 &0 \\
0 &0 &0 &0 &0 &0 \\
0 &0 &0 &1 &1 &1 
\end{array}
\right).
$$
The reduced row-echelon form is
$$
\left( \begin {array}{cccccc} 1&0&0&0&1&1\\ \noalign{\medskip}0&1&0&0
&1&0\\ \noalign{\medskip}0&0&0&1&1&1\\ \noalign{\medskip}0&0&0&0&0&0
\\ \noalign{\medskip}0&0&0&0&0&0\end {array} \right). 
$$
The leading ones are in columns 1,2,4. A largest set of
independent vectors are vectors 1, 2, 4. }

\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\\
  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}
\]
}{}{
% 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, implies the 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 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$. 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 \\ 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{20}{
 Determinant problem, chapter 3. Parts reduced on Exam 1.\\
 (a) [10\%] True or False? The value of a determinant is multiplied by $-1$ when two columns are swapped.
\newline
 (b) [10\%] True or False? The determinant of two times the
 $n\times n$ identity matrix is $2$.
\newline
 (c) [30\%] Assume given $3\times 3$ matrices $A$, $B$. Suppose
 $E_3E_2E_1A=BA^2$ and $E_1$, $E_2$, $E_3$ are
 elementary matrices representing respectively a multiply by $3$, a swap and a combination. Assume $\det(B)=3$.
 Find all possible values of $\det(-2A)$.
\newline
(d) [20\%] Determine all values of $x$ for which $(I+2C)^{-1}$
fails to exist, where $I$ is the $3\times 3$ identity and $C=\left(
\begin{array}{cccc}
2 &   x  & 1 \\
x &  0 & 1  \\
1 & 0 & -1
\end{array}\right)
$.
% A:=2*<2,x,1|1*x,0,1|1,0,-1>^+ + 1*<1,0,0|0,1,0|0,0,1>;
% # ans = -1+(1/2)*sqrt(13), -1-(1/2)*sqrt(13)
\newline
 (e) [30\%] Let symbols $a, b, c$ denote constants and define
$$ A=\left(\begin{array}{rrrr}
 1 & -1 &  0 & 0  \\
 1 & 0 &  0 & 0 \\
 a & b &  0 & \frac12 \\
 1 & c &  1 & \frac12
\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
 $4$, column $1$ of $A^{-1}$.

}{}{
 ~ \\
(a)  TRUE. This is the swap rule, one of the 4 rules to compute the value of any determinant.
\\
(b)  FALSE. For example, $\left|\begin{array}{rr} 2 & 0 \\ 0 & 2\end{array}\right| = 2$, not $2$.
\\
(c)  Start with the determinant product theorem $|FG|=|F||G|$. Apply it to obtain
$|E_3||E_2||E_1||A|=|B||A|^2$. Let $x=|A|$ in this equation and solve for $x$. You will need to know that
$|E_1|=3$, $|E_2|=-1$, $|E_3|=1$. Let $C=-2A$. Then $|C|=|(-2I)A|=|-2I||A|=(-2)^3x$. The answer is $|C|=-8x$, where
$x$ is the solution of $-3x=3x^2$. Then $|C|=0$ or $|C|=8$.
(d)  Find $2C+I=\left( \begin {array}{ccc} 5&2\,x&2\\ \noalign{\medskip}2\,x&1&2
\\ \noalign{\medskip}2&0&-1\end {array} \right)
$, then evaluate its determinant $4x^2+8x-9$, to eventually solve for $x=-1\pm \frac12\sqrt{13}$. Used here is $F^{-1}$ exists if and only if $|F|\ne 0$.
\\
(e) Find the cross-out determinant in row 1, column 4 (no mistake, the transpose swaps rows and columns). Form the fraction, top=checkboard sign times cross-out determinant, bottom=$|A|$. The value is $2b$. A maple check:\newline
\begin{tt}
 C4:=Matrix([[1,-1,0,0],[1,0,0,0],[a,b,0,1/2],[1,c,1,1/2]]);\newline
 1/C4; \# The inverse matrix\newline
 C5:=linalg[minor](C4,1,4);\newline
 (-1)**(1+4)*linalg[det](C5)/linalg[det](C4);\newline
 \# ans = 2b
\end{tt}
}



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

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

\problemsdone
\end{document}

% End of the Document
