
\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]

% 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}
\let\finishfirstpage\bigskip

% Beginning of the Document

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

\studentinfo
\instructions{No books or notes. No electronic devices, please.\\
These problems have credits 10 to 20, which is an estimate of the time required to write the solution.
}
\finishfirstpage
% Problems Start Here % ----------------------------------------------------- %


\problem{10}{%
Give a counter example or proof details. 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}$.
}{}{%
In general $(CD)^{-1}$ is the product of the inverses in reverse order, $D^{-1}E^{-1}$.
The same is true for transposes. And transpose and inverse commute: $(C^T)^{-1}=(C^{-1})^T$.
Details: $(AB^{-1})^{T}=$(B^{-1})^T A^T = (B^T)^{-1} A^T$.
}

\problem{10}{%
Explain briefly without proofs. If square matrices $A$ and $B$
satisfy $AB=I$, then $BA=I$.
}{}{%
This is a standard theorem. The details rely on showing thatthe kernel
of $A$ is the zero vector alone.
}



\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).
\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}

}{}{%
\[\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & -1 \\ -4 & 0 & 1\end{pmatrix}\]
}

\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)
$$
Determine those values of $a$, $b$ and $c$ such that:
\begin{itemize}
\item[{\bf (a)}.] The system has a unique solution.
\newline
\item[{\bf (b)}.] The system has no solution.
\newline
\item[{\bf (c)}.] The system has infinitely many solutions.
\end{itemize}
To save time, don't attempt to solve the equations or to produce a complete
frame sequence.
}{}{
Unique solution for $(c-b)(2a-c)\ne 0$.
No solution for $2a-c=0$ and $a\ne 0$ or else $2a-c\ne 0$ and $c-b=0$ and $a(5a-c)\ne 0$.  Infinitely many solutions for $a=c=0$ or $c-b=0$, to be finished here.
%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 steps the matrix
%$$\left(\begin{array}{rrrr}1& b-c& 0& -2a\\ 0& -b+2c& 0& 4a\\ 0& 0& a& a \end{array}\right)$$
$$\left(\begin{array}{rrrr}1& b& c& -a\\ 0& -b+c& -c-a& 2a\\ 0& 0& -c+2a& a \end{array}\right)$$
The sequence of steps are documented below for maple.
\begin{verbatim}
 macro(combo=linalg[addrow]);macro(mult=linalg[mulrow]);
 macro(swap=linalg[swaprow]);
 A:=(a,b,c)->Matrix([[1,b,c,-a],[1,c,-a,a],[2,b+c,a,a]]);%A(a,b,c);
 A1:=combo(A(a,b,c),1,2,-1);
 A2:=combo(A1,1,3,-2);
 A3:=combo(A2,2,3,-1);
 A4:=convert(A3,list);
 A4 := [[1, b, c, -a], [0, -b+c, -c-a, 2*a], [0, 0, -c+2*a, a]];
 A5:=A(a,b,b); # case c-b=0 or c=b
 A6:=combo(A5,1,2,-1);
 A7:=combo(A6,1,3,-2);
 A8:=combo(A7,3,2,(b+a)/(a-2*b));
 simplify(%);
\end{verbatim}
}
% from sample
%\begin{verbatim}
% macro(combo=linalg[addrow]);macro(mult=linalg[mulrow]);
% macro(swap=linalg[swaprow]);
% A:=(a,b,c)->Matrix([[1,b-c,a,-a],[1,c,-a,a],[2,b,a,a]]);
% A1:=combo(A(a,b,c),1,2,-1);
% A2:=combo(A1,1,3,-2);
% A3:=combo(A2,2,3,-1);
% A4:=combo(A3,3,2,2);
% A5:=combo(A4,3,1,-1);
% A5 := Matrix([[1,b-c,0,-2*a],[0,-b+2*c,0,4*a],[0,0,a,a]]);
%\end{verbatim}

%% This exam
%\begin{verbatim}
% macro(combo=linalg[addrow]);macro(mult=linalg[mulrow]);
% macro(swap=linalg[swaprow]);
% A:=(a,b,c)->Matrix([[1,b,c,-a],[1,c,-a,a],[2,b+c,a,a]]);
%A(a,b,c);
% A1:=combo(A(a,b,c),1,2,-1);
% A2:=combo(A1,1,3,-2);
% A3:=combo(A2,2,3,-1);
% A3 := [[1, b, c, -a], [0, -b+c, -c-a, 2*a], [0, 0, -c+2*a, a]]
%\end{verbatim}


\problem{20}{
Classify the following sets of vectors for (1) Independence or (2) Dependence. For each set of vectors,
report whether or not they form a {\bf basis} for the indicated vector space.

\[
\begin{pmatrix}
  1\\ 2
\end{pmatrix},
\begin{pmatrix}
  2\\ 2
\end{pmatrix}
\text{ in } \mathbb{R}^2\]

\[
\begin{pmatrix}
  1\\ 0 \\ 0
\end{pmatrix},
\begin{pmatrix}
  0\\ 2 \\ 0
\end{pmatrix},
\begin{pmatrix}
  1\\ -1 \\ 1
\end{pmatrix},
\begin{pmatrix}
  -1\\ 1 \\ 1
\end{pmatrix}
\text{ in } \mathbb{R}^3\]
}{}{
\[
\begin{pmatrix}
  1\\ 2
\end{pmatrix},
\begin{pmatrix}
  2\\ 2
\end{pmatrix}
\text{ in } \mathbb{R}^2\]
These two vectors are not scalar multiples of each other, so they are
linearly independent. Because $\mathbb{R}^2$ is two dimensional, any two
linearly independent vectors form a basis. These two vectors form a basis for $\mathbb{R}^2$.

\[
\begin{pmatrix}
  1\\ 0 \\ 0
\end{pmatrix},
\begin{pmatrix}
  0\\ 2 \\ 0
\end{pmatrix},
\begin{pmatrix}
  1\\ -1 \\ 1
\end{pmatrix},
\begin{pmatrix}
  -1\\ 1 \\ 1
\end{pmatrix}
\text{ in } \mathbb{R}^3\]
Because $\mathbb{R}^3$ is three dimensional, then no set of
more than three vectors can ever be linearly independent in $\mathbb{R}^3$.
The set is dependent. These four vectors do not form a basis. A basis consists of three linearly
independent vectors. Three such can be determined as the pivot columns of an augmented matrix of the four vectors.
}

%\anotherpage
\problem{20}{
Find all solutions to the equation $A\bar{x}=\bar{b}$ for
\[A=
\begin{pmatrix}
  1 & 2 & 3 &4\\
5 & 6 & 7 &8
\end{pmatrix}
\]
\[\bar{b}=
\begin{pmatrix}
  0\\4
\end{pmatrix}
\]
}{}{
The augmented matrix for this system of equations is
\[\begin{pmatrix}
  1 & 2 & 3 &4& 0\\
5 & 6 & 7 &8& 4
\end{pmatrix}\]
Find the reduced row echelon form by Gauss-Jordan Elimination, as follows.
\[\begin{pmatrix}
  1 & 2 & 3 &4& 0\\
5 & 6 & 7 &8& 4
\end{pmatrix}\quad\mbox{Augmented matrix}\]
\[\begin{pmatrix}
  1 & 2 & 3 &4& 0\\
0 & -4 & -8 &-12& 4
\end{pmatrix}\quad\mbox{combo(1,2,-5)}
\]
\[\begin{pmatrix}
  1 & 0 & -1 &-2& \phantom{-}2\\
0 & 1& \phantom{-}2 &\phantom{-}3& -1
\end{pmatrix}\quad\mbox{mult(2,-1/4)}
\]
The last frame, or RREF, implies the system
$$\begin{array}{rrrrrrrrrrrr}
x_1 & &-& x_3 &-&2x_4 & = & 2 \\
    & x_2 &+& 2x_3 &-& 3x_4 &=& -1
\end{array}
$$
The lead variables are $x_1,x_2$ and the free variables are $x_3,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 &=& 2 + t_1 +2t_2,\\
x_2 &=& -1 -2t_1+3t_2,\\
x_3 &=& t_1,\\
x_4 &=& t_2.
\end{array}
$$
Strang's {\em special solutions} $\vec{s}_3$ and $\vec{s}_4$ are the partials 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}_3+t_2\vec{s}_4 =
\left(\begin{array}{r}2\\ -1 \\ 0\\ 0\end{array}\right)
+t_1\left(\begin{array}{r}1\\ -2 \\ 1\\ 0\end{array}\right)
+t_2\left(\begin{array}{r}2\\ 3 \\ 0\\ 1\end{array}\right)
$$




{\bf Below is a second solution which follows the methods of Strang's textbook.}

Solutions to the original equation are the same as solutions to the
last frame,
\[\begin{pmatrix}
  1 & 0 & -1 &-2\\
0 & 1& \phantom{-}2 &\phantom{-}3
\end{pmatrix}\vec{x}=\begin{pmatrix}2\\-1\end{pmatrix}\]

Columns 1 and 2 are pivot columns; columns 3 and 4 are free
columns, so $x_3$ and $x_4$ are the free variables.

A particular solution is obtained by setting $x_3=x_4=0$ and solving
for $x_1$ and $x_2$.
\[\begin{pmatrix}
  1 & 0 & -1 &-2\\
0 & 1& \phantom{-}2 &\phantom{-}3
\end{pmatrix}\begin{pmatrix}x_1\\x_2\\0\\0\end{pmatrix}=\begin{pmatrix}2\\-1\end{pmatrix}\]
The particular solution is
\[\bar{x}_p=\begin{pmatrix}2\\-1\\0\\0\end{pmatrix}\]

The other solutions differ from $\vec{x}_p$ by vectors in the
nullspace of $A$. A basis for the nullspace is given by the {\em special
solutions} obtained by setting one free variable equal to 1, the
others equal to 0, and solving for the non-free variables. This is equivalent
to taking partial derivatives on the free variables in the general solution
of the system of equations.

Special solution $\vec{s}_3$ is obtained by setting $x_3=1$ and
$x_4=0$ and solving
\[\begin{pmatrix}
  1 & 0 & -1 &-2\\
0 & 1& \phantom{-}2 &\phantom{-}3
\end{pmatrix}\begin{pmatrix}x_1\\x_2\\1\\0\end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix}\]
 So $\vec{s}_3=\begin{pmatrix}1\\-2\\1\\0\end{pmatrix}$

Similarly, $\vec{s_4}$ is obtained by setting $x_3=0$ and $x_4=1$ and solving
\[\begin{pmatrix}
  1 & 0 & -1 &-2\\
0 & 1& \phantom{-}2 &\phantom{-}3
\end{pmatrix}\begin{pmatrix}x_1\\x_2\\0\\1\end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix}\]

So $\vec{s}_4=\begin{pmatrix}2\\-3\\0\\1\end{pmatrix}$

Finally, all solutions are of the form
$\vec{x}_p+x_3\vec{s}_3+x_4\vec{s}_4$, so all solutions to the
equation are all vectors:
\[\vec{x}=\begin{pmatrix}2\\-1\\0\\0\end{pmatrix}+x_3 \begin{pmatrix}1\\-2\\1\\0\end{pmatrix}+x_4 \begin{pmatrix}2\\-3\\0\\1\end{pmatrix}\]
where $x_3$ and $x_4$ are arbitrary real numbers.
}




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



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

\problemsdone
\end{document}

% End of the Document
