
\documentclass[12pt]{article}
\usepackage{linalg2270strang}
\usepackage{epsfig,amsmath,amsthm,amssymb, verbatim}
\def\checkbox{\fbox{$\phantom{X}$}~}
% Use this one to print just the question sheet.
\usepackage[questions]{mathtest}[2001/05/12]
%\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]

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

% Basic User Defs

\def\ds{\displaystyle}


% Beginning of the Document

\begin{document}
\examtitle{MATH 2270-4}{Sample Exam 1}{S2019}
\thispagestyle{empty}
\studentinfo
\finishfirstpage
\instructions{\begin{quote}\sf
No books or notes. No electronic devices, please.\\
These problems have credits 10 to 25, which is an estimate of the time
required to write the solution.
\\
This sample will be edited during the semester to reflect course content. Expect
to see problems that appeared on the 2018 final exam.
\\
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 and parts of 3
from the 2270 textbook [{\bf Lay} et al]. This sample edited Feb 12 to remove determinant topics.
\vspace*{1pc}
\end{quote}
}


\setcounter{page}{1}
% Problems Start Here % ----------------------------------------------------- %
\anotherpage

\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
$(AB^{-1})^{T}=(B^T)^{-1} A^{T}$.\\
\medskip
(b) Give a counter example or explain why it is true. If square matrices $A$ and $B$
satisfy $AB=I$, then $BA=I$ and $A^TB^T=I$.
}{}{%
(a) 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: $(AB^{-1})^{T}=(B^{-1})^T A^T = (B^T)^{-1} A^T$.
\\
(b) It is a standard theorem that $AB=I$ implies $BA=I$. Transpose this last equation to get $A^TB^T=(BA)^T=I^T=I$.
}
\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 3.
\item[{\bf (2)}] Replace Row 3 of $A$ by Row 3 minus 4 times Row 1.
\end{itemize}
}{}{%
Perform combo(3,2,-1) on $I$ then combo(1,3,-4) on the result. The elimination matrix is
\[ E=\begin{pmatrix} 1 & 0 &  0\\
                     0 & 1 & -1 \\
                    -4 & 0 &  1 \end{pmatrix}\]
}
\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 $(c-b)(2a-c)\ne 0$.
\newline
\item[{\bf (b)}.] The system has no solution if $c=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}

}{}{
%A3 := [[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 $A$ 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$. There are other possibilities for no solution: see part (c).

(c) Infinitely many solutions: If $a=b=c=0$, then $A_3$ has one lead variable and two free variables, because the last two rows of $A_3$ are zero. This homogeneous problem has infinitely many solutions. There are other possibilities for infinitely many solutions, because the last row of $A_3$ could have a zero row ($a=c=0$), without the second row being zero ($a=b=c=0$), or $y$ could be a free variable ($c-b=0$) with the last two equations consistent.

A full analysis of the three possibilities is fairly complex. For instance, $-b+c=0$ causes one free variable $y$. The condition $-b+c=0$ splits into two sub-cases: one for no solution and one for infinitely many solutions.

The sequence of steps are documented below for maple.

\begin{tt}
 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,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);\newline
 A4 := [[1, b, c, -a], [0, -b+c, -c-a, 2*a], [0, 0, -c+2*a, a]];\newline
 A5:=A(a,b,b); \# case c-b=0 or c=b\newline
 A6:=combo(A5,1,2,-1);\newline
 A7:=combo(A6,1,3,-2);\newline
 A8:=combo(A7,3,2,(b+a)/(a-2*b));\newline
 simplify(\%);
\end{tt}
}

\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 sets of vectors as Independent or Dependent,
using the Pivot Theorem or the definition of independence (above).

\[\text{Set 1:}\quad
\begin{pmatrix}
  1\\ 2 \\ 0
\end{pmatrix},
\begin{pmatrix}
  2\\ 2 \\ 0
\end{pmatrix}
\]

\[\text{Set 2:}\quad
\begin{pmatrix}
  1\\ 0 \\ 0
\end{pmatrix},
\begin{pmatrix}
  0\\ 2 \\ 0
\end{pmatrix},
\begin{pmatrix}
  1\\ 2 \\ 0
\end{pmatrix}
\]
}{}{
The first set is independent. The two vectors are not scalar multiples of each other, so they are
linearly independent.

The second set is dependent. The augmented matrix of the three vectors
has pivot columns 1,2. Therefore, the first two vectors are independent.
By the Pivot Theorem, the third vector is a linear combination of the
pivot columns 1,2. Hence the set of three vectors is dependent.
}
\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 & 0 & 1
\end{pmatrix}
,\quad
\vec{b}=
\begin{pmatrix}
  0\\4 \\ 0
\end{pmatrix}
\]
}{}{
The augmented matrix for this system of equations is
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  3 & 0 & 1 &0 & 4 \\
  4 & 0 & 0 & 1 & 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 & 0 & 1 & 0
\end{pmatrix}\quad\mbox{combo(1,2,-3)}
\]
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  0 & 0 & 1 &-12 & 4 \\
  0 & 0 & 0 &-16 & 0
\end{pmatrix}\quad\mbox{combo(1,3,-4)}
\]
\[\begin{pmatrix}
  1 & 0 & 0 &4 & 0\\
  0 & 0 & 1 &-12 & 4 \\
  0 & 0 & 0 &1 & 0
\end{pmatrix}\quad\mbox{mult(3,-1/16)}
\]
\[\begin{pmatrix}
  1 & 0 & 0 &0 & 0\\
  0 & 0 & 1 &0 & 4 \\
  0 & 0 & 0 &1 & 0
\end{pmatrix}\quad\mbox{last frame}
\]
The last frame, or RREF, implies the system
$$\begin{array}{rrrrrrrrrrrr}
x_1 && &&     &&     &=& 0 \\
    && && x_3 &&     &=& 4\\
    && &&     && 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 &=& 4,\\
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 \\ 4\\ 0\end{array}\right)
+t_1\left(\begin{array}{r}0\\ 1 \\ 0\\ 0\end{array}\right)
$$
}

\anotherpage

\problem{20}{
 Determinant problem, chapter 3. Parts reduced on Exam 1.\\
 (a) [10\%] True or False? The value of a determinant is the product of
 the diagonal elements.
\newline
 (b) [10\%] True or False? The determinant of the negative of the
 $n\times n$ identity matrix is $-1$.
\newline
(c) [30\%]  Supply proof details or else display a counterexample: If $A$, $B$ are $3\times 3$ matrices and both have an inverse,
then $\left|(A+B)^{-1}\right|= \left|A^{-1}\right| + \left|B^{-1}\right|$.
\newline
% (c) [30\%] Assume given $3\times 3$ matrices $A$, $B$. Suppose
% $E_2E_1A^2=AB$ and $E_1$, $E_2$ are
% elementary matrices representing respectively a combination
%and a multiply by $3$. Assume $\det(B)=27$.
% Let $C=-A$. Find all possible values of $\det(C)$.
%\newline
(d) [50\%] Determine all values of $x$ for which $(2I+C)^{-1}$
fails to exist, where $I$ is the $3\times 3$ identity and $C=\left(
\begin{array}{cccc}
2 &   x  & -1 \\
3x &  0 & 1  \\
1 & 0 & -1
\end{array}\right)
$.
% A:=<2,x,-1|3*x,0,1|1,0,-1>^+ + 2*<1,0,0|0,1,0|0,0,1>;
% # ans = -5/3, 2
%\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 & 1 \\
% 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 $2$ of $A^{-1}$.
}{}{
 ~ \\
(a)  FALSE. True only if the matrix is triangular.
\\
(b)  FALSE. It equals $1$ when $n$ is even.
\\
(c) FALSE. It fails even for $1\times 1$ matrices (i.e., for numbers). However, we must give a $3 \times 3$ counterexample.
Let $A=2I$ and $B=3I$ where $I$ is the $3\times 3$ identity matrix. Both $A$ and $B$ have an inverse. Then $A+B=5I$ implies $(A+B)^{-1} = \frac{1}{5}I$,
while $A^{-1}=\frac12\,I$ and $B^{-1}=\frac13\,I$. Therefore, the claimed identity fails for this choice of $A$ and $B$ (a counterexample),
because the left side determinant is $\frac{1}{125}$ while the right side sum of determinants is $\frac{1}{8} + \frac{1}{27}$. 
\newline
%(c)  Start with the determinant product theorem $|FG|=|F||G|$. Apply it to obtain
%$|E_2||E_1||A|^2=|A||B|$. Let $x=|A|$ in this equation and solve for $x$. You will need to know that
%$|E_1|=1$ and $|E_2|=3$. Then $|C|=|(-I)A|=|-I||A|=(-1)^3x$. The answer is $|C|=0$ or $|C|=-9$.
(d)  Find $C+I=\left( \begin {array}{ccc} 4&x&-1\\ \noalign{\medskip}3\,x&2&1
\\ \noalign{\medskip}1&0&1\end {array} \right)
$, then evaluate its determinant, to eventually solve for $x=-5/3$ and $x= 2$. Used here is $F^{-1}$ exists if and only if $|F|\ne 0$.
\\
%(e) Find the cross-out determinant in row 2, 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 $-b-a$. A maple check:
%\begin{tt}
% C4:=Matrix([[1,-1,0,0],[1,0,0,0],[a,b,0,1],[1,c,1,1/2]]);\newline
% 1/C4; \# The inverse matrix\newline
% C5:=linalg[minor](C4,2,4);\newline
% (-1)**(2+4)*linalg[det](C5)/linalg[det](C4);\newline
% \# ans = -b-a
%\end{tt}
}
%\vfill\anotherpage
%\phantom{page}
%\vfill
% Problems End Here % ------------------------------------------------------- %

\problemsdone
\centerline{End Exam 1.}
\end{document}

% End of the Document
