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

% 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}
\def\BF#1{{\bf #1}}
\def\checkbox{\fbox{$\phantom{X}$}~}
\let\anotherpage\relax

% Beginning of the Document

\begin{document}
\examtitle{MATH 2270-2}{Final Exam Sample Problems}{Spring 2017}

\studentinfo
\instructions{No books, notes or electronic devices, please.\\
The questions have credits which reflect 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.\\
Solutions are expected to include readable and convincing details. A correct answer without details earns 25\%.\\
Only a small sampling from these problem types will appear on the final exam, due to time limitations.
Expect about 10 minutes per problem. A final exam problem will have multiple parts.

In addition to these problems, please review the problems from Exam 1 and Exam 2. Sources are located in the CALENDAR
at the course web site, week 15.
}
\finishfirstpage
% Problems Start Here % ----------------------------------------------------- %
%This is a work in progress, not finished. More will be added, and the
%order changed.

%\section*{Chapters 1 and 2}

\problem{5}{
Let $A$ be a $2\times 2$ matrix such that
$A\begin{pmatrix}1\\1\end{pmatrix}=\begin{pmatrix}1\\0\end{pmatrix}$. Compute
$A\begin{pmatrix}2\\2\end{pmatrix}$.
}{}{$A\colvector{2\\ 2} = 2A\colvector{1\\ 1} =2\colvector{1 \\ 0} = \colvector{2 \\ 0}$}

\anotherpage

\problem{5}{
State (1) the definition of norm, (2) the Cauchy-Schwartz inequality and (3) the triangle inequality, for vectors in $\Rr^n$.
}{}{(1) Norm of $\vec{v}$ equals $\| \vec{v}\| = \sqrt{\vec{v}^T\vec{v}}$; (2) $|\vec{a}\cdot \vec{b}| \le \| \vec{a}\| \|\vec{b}\|$; (3)
$\|\vec{a}+\vec{b}\| \le \|\vec{a}\| + \|\vec{b}\|$.}

\anotherpage

\problem{5}{
Suppose $A=B(C+D)E$ and all the matrices are $n\times n$  invertible. Find an equation for $C$.
}{}{$AE^{-1}=BC+BD$ implies $C=B^{-1}(AE^{-1}-BD)$.}

\anotherpage
\problem{5}{
Find all solutions to the system of equations
\begin{align*}
  2w+3x+4y+5z = 1\\
 4w+3x+8y+5z = 2\\
 6w+3x+8y+5z = 1\\
\end{align*}
}{}{Infinite solution case: $w = -1/2, x = -(5/3)t_1, y = 1/2, z = t_1$.}


\anotherpage
\problem{5}{
Let $A=\twobytwo{2&1}{0&3}$. Show the details of two different methods
for finding the inverse of the matrix $A$.
}{}{The two methods are (1) $A^{-1}=\frac{\adj(A)}{|A|}$ and (2)
For $C=<A|I>$, then $\rref(C)=<I|A^{-1}>$. Details expected, but not supplied here.}

\anotherpage

\problem{5}{
Find a factorization $A=LU$ into lower and upper triangular matrices for
the matrix $A=\threebythree{2&1&0}{1&2&1}{0&1&2}$.
}{}{Let $E_1$ be the result of combo(1,2,-1/2) on $I$, and $E_2$ the result of combo(2,3,-2/3) on $I$.
Then $E_2E_1A = U=\threebythree{2&1&0}{0&\frac32 & 1}{0 & 0 & \frac43}$. Let $L=E_1^{-1}E_2^{-1}=\threebythree{1&0&0}{\frac12&1&0}{0&\frac23&1}$.}

\problem{5}{
Let $Q$ be a $2\times 2$ matrix with $QQ^T=I$. Prove that $Q$ has
columns of unit length and its two columns are orthogonal.
}{}{First, $AB=I$ with both $A,B$ square implies $BA=I$. So $Q^TQ=I$. Then $Q=<\vec{q}_1 | \vec{q}_2>$
implies $Q^TQ=\twobytwo{
\vec{q}_1\cdot \vec{q}_1 &
\vec{q}_1\cdot \vec{q}_2 }
{\vec{q}_2\cdot \vec{q}_1 &
\vec{q}_2\cdot \vec{q}_2}$. Relation $Q^TQ=I$ then implies orthogonality of the columns and that the columns have length one.
}


\anotherpage
\problem{5}{
True or False?
If the $3\times 3$ matrices $A$ and $B$ are triangular, then $AB$ is
triangular.
}{}{False. Consider the decomposition  $A=LU$ in a problem above. True if both matrices are upper triangular or both matrices are lower triangular.}


\anotherpage
\problem{5}{
True or False?
 If a $3\times 3$ matrix $A$ has an inverse,
then for all vectors $\vec{b}$
the equation $A\vec{x}=\vec{b}$ has a unique solution $\vec{x}$.
}{}{True, $\vec{x}=A^{-1}\vec{b}$.}
\anotherpage
\problem{5}{%
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=\begin{pmatrix} 1 & 0 &  0\\
                     -1 & 1 & 0 \\
                    5 & -5 &  1 \end{pmatrix}\]
}
\anotherpage
\problem{10}{
 Determinant problem, chapter 3. \\
 (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\%] 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) [20\%] 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)  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=checkerboard sign times cross-out determinant, bottom=$|A|$. The value is $-b-a$. A maple check:
\begin{alltt}
 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{alltt}
}
\anotherpage
\problem{5}{
Define matrix $A$, vector $\vec{b}$ and vector variable $\vec{x}$ by the equations
$$A=\left(\begin{array}{rrrr}
 -2 &  3 & 0\\
  0 & -4  & 0\\
  1 & 4 & 1
 \end{array}\right), \quad \vec{b}=\colvector{-3 \\ 5\\ 1},\quad \vec{x} = \colvector{x_1\\ x_2\\ x_3}.$$
For the system $A\vec{x}=\vec{b}$, find $x_3$ by Cramer's Rule,
 showing {\bf all details} (details count 75\%). To save time, {\bf do not compute $x_1,x_2$}!}{}{
$x_3=\Delta_3/\Delta$, $\Delta=\det\threebythree{-2 & 3& 0}{0 & -4 & 1}{1 & 4 & 1}=-8$, $\Delta_3=\det\threebythree{-2 & 3& -3}{0 & -4 & 5}{1 & 4 & 1}=59$, $x_3= - \frac{59}{8}$.
%
%A:=Matrix(
%  [[ -2 , 3 ,0 ],
%  [0 ,  4 , 0], [1,4,1]]);
% b:=Vector([-3,5,1]);
%  with(linalg):linsolve(A,b); det(A);
%A3:=Matrix(
%  [[ -2 , 3 ,-3 ],
%  [0 ,  4 , 5], [1,4,1]]);det(A3);
%  # answers = 27/8, 5/4, -59/8
%
}
\anotherpage
\problem{5}{
Define matrix $A=\threebythree{3&1&0}{3&3&1}{0&2&4}$.
Find a lower triangular matrix $L$ and an upper triangular matrix $U$ such that $A=LU$.
}{}{Let $E_1$ be the result of combo(1,2,-1/2) on $I$, and $E_2$ the result of combo(2,3,-2/3) on $I$.
Then $E_2E_1A = U=\threebythree{2&1&0}{0&\frac32 & 1}{0 & 0 & \frac43}$. Let $L=E_1^{-1}E_2^{-1}=\threebythree{1&0&0}{\frac12&1&0}{0&\frac23&1}$.
%A:=Matrix(
%  [[ 3 , 1 ,0 ],
%  [3 ,  3 , 1], [0,2,4]]);
%convert(L,list,nested=true);
%               [[1, 0, 0], [1, 1, 0], [0, 1, 1]]
%convert(U,list,nested=true);
%               [[3, 1, 0], [0, 2, 1], [0, 0, 3]]
%
%with(LinearAlgebra):
%P,L,U:=LUDecomposition(A);
%convert(L,list,nested=true);
%convert(U,list,nested=true);
%Id:=Matrix(3,3,shape=identity);
%combo:=(a,s,t,c)->RowOperation(a,[t,s],c);
% swap:=(a,s,t)->RowOperation(a,[t,s]);
% mult:=(a,t,c)->RowOperation(a,t,c);
%A1:=combo(A,1,2,-1);A2:=combo(A1,2,3,-1);
%E1:=combo(Id,1,2,-1);E2:=combo(Id,2,3,-1);
%1/(E2.E1);
%
}


\anotherpage
\problem{5}{
Determine which values of $k$ correspond to
a {\large\sf unique solution}
%(1) a {\large\sf unique solution}, (2) {\large\sf infinitely many solutions} and (3) {\large\sf no solution},
for the system $A\vec{x}=\vec{b}$ given by
$$A=\left(\begin{array}{ccc}
  1 & 4 &  k  \\
  0 & k-2 & k-3 \\
  1 & 4 &  3
 \end{array}\right), \quad \vec{b}=\colvectorC{1\\ -1 \\ k }.$$
% Check it!
}{}
{There is a unique solution for $\det(A)\ne 0$, which implies $k\ne 2$ and $k \ne 3$. Alternative solution:
Elimination methods with swap, combo, multiply give
{\small $\left( \begin {array}{cccc} 1&4&k&1\\ 0&k-2&0&k-2\\ 0&0&3-k&k-1\end {array} \right)$}. Then
(1) Unique solution for three lead variables, equivalent to the determinant nonzero for the frame above, or $(k-2)(3-k)\ne 0$;
(2) No solution for $k=3$ [signal equation];
(3) Infinitely many solutions for $k=2$. }
\anotherpage
\problem{10}{
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 zeros 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$.

(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.
\begin{alltt}
 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]];
\end{alltt}
}
%\section*{Chapters 3, 4}
\anotherpage
\problem{5}{
Explain how the {\bf span theorem} applies to show that the set $S$ of
all linear combinations of the functions $\cosh x, \sinh x$ is a
subspace of the vector space $V$ of all continuous functions on $-\infty
< x < \infty$.
}{}{The span theorem says $\SPAN(\vec{v}_1,\vec{v}_2)$ is
a subspace of $V$, for any two vectors in $V$. Choose the two vectors to
be $\cosh x, \sinh x$.}
\anotherpage

\problem{5}{
Write a proof that the subset $S$ of all solutions $\vec{x}$ in $\Rr^n$
to a homogeneous matrix equation $A\vec{x}=\vec{0}$ is a subspace of
$\Rr^n$. This is called the {\bf kernel theorem}.
}{}{(1) Zero is in $S$ because $A\vec{0}=\vec{0}$; (2) If $A\vec{v}_1=\vec{0}$ and $A\vec{v}_2=\vec{0}$, then
$\vec{v}=\vec{v}_1+\vec{v}_2$ satisfies $A\vec{v}=A\vec{v}_1 + A\vec{v}_2 = \vec{0}+\vec{0}=\vec{0}$. So $\vec{v}$ is in $S$;
(3) Let $\vec{v}_1$ be in $S$, that is, $A\vec{v}_1=\vec{0}$. Let $c$ be a constant. Define $\vec{v}=c\vec{v}_1$. Then
$A\vec{v}=A(c\vec{v}_1)=cA\vec{v}_1=(c)\vec{0}=\vec{0}$. Then $\vec{v}$ is in $S$. This completes the proof.
}

\anotherpage

\problem{5}{
Using the subspace criterion, write two hypotheses that imply that a set
$S$ in a vector space $V$ is not a subspace of $V$. The full statement
of three such hypotheses is called the {\bf Not a Subspace Theorem}.
}{}{(1) If the zero vector is not in $S$, then $S$ is not a subspace.
(2) If two vectors in $S$ fail to have their sum in $S$, then $S$ is not
a subspace. (3) If a vector is in $S$ but its negative is not, then $S$ is not a subspace.
}
\anotherpage

\problem{5}{
Report which columns of $A$ are pivot columns: $A=\threebythree{0&1&1}{0&1&2}{0&0&0}$.
}{}{Zero cannot be a pivot column (no leading one in $\rref(A)$). The
other two columns are not constant multiples of one another, therefore
they are independent and will become pivot columns in $\rref(A)$. Then: pivot columns =2,3.
}
\anotherpage

\problem{5}{
Find the complete solution $\vec{x} = \vec{x}_h + \vec{x}_p$ for the nonhomogeneous system
$$\threebythree{0&1&1}{0&1&2}{0&0&0}\colvector{x_1 \\ x_2 \\ x_3} = \colvector{2 \\ 3 \\ 0}.$$
The homogeneous solution $\vec{x}_h$ is a linear combination of Strang's special solutions.
Symbol $\vec{x}_p$ denotes a particular solution.
}{}{The augmented matrix has reduced row echelon form (last frame) equal to
the matrix $\begin{array}{cccc} 0&1&0&1\\ 0&0&1&1\\ 0&0&0&0\end{array}$. Then $x_1=t_1,
x_2=1, x_3=1$ is the general solution in scalar form. The partial
derivative on $t_1$ gives the homogeneous solution basis vector
$\colvector{1\\ 0\\ 0}$. Then $\vec{x}_h=c_1\colvector{1\\ 0\\ 0}$ Set
$t_1=0$ in the scalar solution to find a particular solution
$\vec{x}_p=\colvector{0\\ 1 \\ 1}$.
}
\anotherpage
\problem{5}{
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{5}{
Find the reduced row echelon form of the matrix $A=\threebythree{0&1&1}{0&0&0}{0&1&2}$.
}{}{It is the matrix $\threebythree{0&1&0}{0&0&1}{0&0&0}$.
}
\anotherpage

\problem{5}{
A $10\times 13$ matrix $A$ is given and the homogeneous system $A\vec{x}=\vec{0}$ is transformed to
reduced row echelon form. There are $7$ lead variables. How many free variables?
}{}{Because $\vec{x}$ has 13 variables, then the rank plus the nullity is 13. There are 6 free variables.}
\anotherpage

\problem{5}{
The rank of a $10\times 13$ matrix $A$ is $7$. Find the nullity of $A$.
}{}{There are 13 variables. The rank plus the nullity is 13. The nullity is 6. }

\anotherpage


\problem{5}{
Given a basis $\vec{v}_1=\begin{pmatrix}3\\2\end{pmatrix},
\vec{v}_2=\begin{pmatrix}4\\4\end{pmatrix}$ of $\Rr^2$, and
$\vec{v}=\begin{pmatrix}10\\4\end{pmatrix}$, then
$\vec{v}=c_1\vec{v}_1+c_2\vec{v}_2$ for a unique set of coefficients
$c_1,c_2$, called the {\em coordinates of $\vec{v}$ relative to the
basis $\vec{v}_1, \vec{v}_2$}. Compute $c_1$ and $c_2$.
}{}{}

\anotherpage
% chapter 3
\problem{5}{
        Determine independence or dependence for the list of vectors
\[\begin{pmatrix} 1 \\ 2 \\ 3\end{pmatrix}, \begin{pmatrix} 4\\ 0\\
4\end{pmatrix}, \begin{pmatrix} 3 \\ 2
  \\1\end{pmatrix}\]
}{}{Possible tests are the rank test, determinant test, pivot theorem, orthogonality test.
Let $A$ denote the augmented matrix of the three column vectors.  The
determinant is 32, nonzero, so the vectors are independent. The pivot
theorem also applies. The $\rref(A)$ is the identity matrix, so all
columns are pivot columns, hence the three columns are independent. The
rank test applies because the rank is 3, equal to the number of columns,
hence independence. }

\anotherpage
\problem{5}{
Check the independence tests which apply to prove that $1$, $x^2$, $x^3$ are independent in the vector space $V$ of
all functions on $-\infty < x < \infty$.
\begin{center}\begin{tabular}{llp{0.6\textwidth}}
 \checkbox~ & \bf Wronskian test & Wronskian of $\vec{f}_1,\vec{f}_2,\vec{f}_3$ nonzero at $x=x_0$ implies independence of $\vec{f}_1,\vec{f}_2,\vec{f}_3$. \\
 \checkbox~ & \bf Rank test & Vectors $\vec{v}_1,\vec{v}_2,\vec{v}_3$ are independent if their augmented matrix has rank 3. \\
 \checkbox~ & \bf Determinant test & Vectors $\vec{v}_1,\vec{v}_2,\vec{v}_3$ are independent if their square augmented matrix has nonzero determinant. \\
 \checkbox~ & \bf Euler Atom test & Any finite set of distinct atoms is independent.\\[1ex]
 \checkbox~ & \bf Sample test & Functions $\vec{f}_1,\vec{f}_2,\vec{f}_3$ are independent if a sampling matrix has nonzero determinant.\\[1ex]
 \checkbox~ & \bf Pivot test & Vectors $\vec{v}_1,\vec{v}_2,\vec{v}_3$ are independent if their augmented matrix $A$ has 3 pivot columns.\\[1ex]
 \checkbox~ & \bf Orthogonality test & A set of nonzero pairwise orthogonal vectors is independent.
\end{tabular}\end{center}
}{}{The first, fourth and fifth apply to the given functions, while the others
apply only to fixed vectors.}

\anotherpage
\problem{5}{
Define $S$ to be the set of all vectors
$\vec{x}$ in $\Rr^{3}$ such that $x_1+x_3=0$ and $x_3+x_2=x_1$.
Prove that
$S$ is a subspace of $\Rr^{3}$.
}{}
{Let $A=\left(\begin{array}{rrr}
  1 & 0 &  1  \\
 -1 & 1 &  1  \\
  0 & 0 &  0
 \end{array}\right)$. Then the restriction equations can be written as $A\vec{x}=\vec{0}$. Apply the nullspace theorem (also called
the kernel theorem), which says that the nullspace of a matrix is a subspace.
\\
 Another solution: The given
restriction equations are linear homogeneous algebraic equations.
Therefore, $S$ is the nullspace of some matrix $B$, hence a subspace of $\Rr^3$.
This solution uses the fact that linear homogeneous algebraic equations can be written as a matrix equation $B\vec{x}=\vec{0}$.
\\
Another solution: Verify the three checkpoints for a subspace $S$ in the Subspace Criterion.
This is quite long, and certainly the last choice for a method of proof.
}

\anotherpage
\problem{5}{
The $5\times 6$ matrix $A$ below has some
independent columns. Report the independent columns of $A$, according to
the Pivot Theorem.
$$A=\left(\begin{array}{rrrrrr}
  0 & 0 &  0 & 0 &   0 & 0\\
 -3 & 0 &  0 & -2 &  1 & -1\\
 -1 & 0 &  0 & 0 &   1 &  0\\
  6 & 0 &  0 & 6 &   0 &  3\\
  2 & 0 &  0 & 2 &   0 &  1
 \end{array}\right)$$
}{}
%A:=matrix([
%  [ 0,  0, 0,  0,  0 , 0 ],
%  [-3,  0, 0, -2,  1 , -1],
%  [-1,  0, 0,  0,  1 , 0],
%  [ 6,  0, 0,  6,  0 , 3],
%  [ 2,  0, 0,  2,  0 , 1]
%    ]);
%  rref(A);
{Find {\small $\rref(A)= \left( \begin {array}{cccccc}
   1&0&0&0&-1&0\\
   0&0&0&1&1&1/2\\
   0&0&0&0&0&0\\ 0&0&0&0&0&0
\\ 0&0&0&0&0&0\end {array} \right)
$}. The pivot columns are 1 and 4.}




%\section*{Chapter 4}

% chapter 4
\problem{5}{
Let $S$ be the subspace of $\mathbb{R}^4$ spanned by the vectors
$$\vec{v}_1=\begin{pmatrix}1\\1\\1\\0\end{pmatrix},\quad
\vec{v}_2=\begin{pmatrix}1\\1\\0\\1\end{pmatrix}.$$
 Find a Gram-Schmidt orthonormal basis
of $S$.
}{}{Let $\vec{y}_1=\vec{v}_1$ and
$\vec{u}_1=\frac{1}{\|\vec{y}_1\|}\vec{y}_1$. Then
$\vec{u}_1=\frac{1}{\sqrt3}\colvector{1\\ 1\\ 1\\ 0}$.
Let $\vec{y}_2 = \vec{v}_2$ minus the shadow projection of $\vec{v}_2$ onto the span of $\vec{v}_1$.
Then $$\vec{y}_2 = \vec{v}_2 -
\frac{\vec{v}_2\cdot\vec{v}_1}{\vec{v}_1\cdot\vec{v}_1}\vec{v_1}=\frac13\colvector{1 \\ 1 \\ -2 \\ 1}.$$
Finally, $\vec{u}_2=\frac{1}{\|\vec{y}_2\|}\vec{y}_2$.
We report the Gram-Schmidt basis:
$$\vec{u}_1=\frac{1}{\sqrt3}\colvector{1\\ 1\\ 1\\ 0 },\quad
\vec{u}_2 =\frac{1}{\sqrt6}\colvector{1 \\ 1 \\ -2 \\ 1}.$$
}

\anotherpage

\problem{5}{
Find the orthogonal projection vector $\vec{v}$ (the shadow projection vector) of $\vec{v}_2$ onto $\vec{v}_1$, given
$$\vec{v}_1=\colvector{1\\ 1\\ 1\\ 0}, \quad \vec{v}_2=\colvector{1\\ 1\\ 0 \\ 1}.$$
}{}{
Use the formula $\vec{v}=d\vec{v}_1$ where $d=\dd\frac{\vec{v}_2\cdot\vec{v}_1}{\vec{v}_1\cdot\vec{v}_1}$.
 }


\anotherpage
\problem{5}{
Let $A$ be an $m\times n$ matrix with independent columns. Prove that
$A^TA$ is invertible.
}{}{The matrix $B=A^TA$ has dimension $n\times n$. We prove that the nullspace of $B=A^TA$ is the zero vector.\\
Let $\vec{x}$ belong to $\Rr^n$.  Assume $B\vec{x}=\vec{0}$, then multiply this equation by $\vec{x}^T$ to obtain $\vec{x}^TA^TA\vec{x}=\vec{x}^T\vec{0}=0$. Therefore, $\|A\vec{x}\|^2=0$, or $A\vec{x}=\vec{0}$.
If $A$ has independent columns, then the nullspace of $A$ is the zero vector, so $\vec{x}=\vec{0}$.
We have proved that the nullspace of $B=A^TA$ is the zero vector.\\
An $n\times n$ matrix $B$ is invertible if and only if its nullspace is the zero vector. So $B=A^TA$ is invertible.
 }

\anotherpage
\problem{5}{
Let $A$ be an $m\times n$ matrix with $A^TA$ invertible. Prove that the
columns of $A$ are independent.
}{}{The columns of $A$ are independent if and only if the nullspace of $A$ is the zero vector. If you don't know this result, then find it in Strang's book, or prove it yourself. \\
Assume $\vec{x}$ is in the nullspace of $A$, $A\vec{x}=\vec{0}$, then multiply by $A^T$ to get $A^TA\vec{x}=\vec{0}$. Because $A^TA$ is invertible,
then $\vec{x}=\vec{0}$, which proves the nullspace of $A$ is the zero vector. We conclude that the columns of $A$ are independent.}

\anotherpage
\problem{5}{
Let $A$ be an $m\times n$ matrix and $\vec{v}$ a vector orthogonal to
the nullspace of $A$. Prove that $\vec{v}$ must be in the row space of $A$.
}{}{The fundamental theorem of linear algebra is summarized by {\tt rowspace $\perp$ nullspace}.
This relation implies {\tt nullspace $\perp$ rowspace}, because for subspaces $S$ we have $(S^\perp)^\perp = S$. The conclusion follows.}

%\section*{Chapter 5}

\anotherpage
\problem{5}{
Define matrix $A$ and vector $\vec{b}$ by the equations
$$A=\left(\begin{array}{rrrr}
 -2 &  3 & 0  \\
  0 & -2 &  4  \\
  1 &  0 &  -2
 \end{array}\right), \quad \vec{b}=\colvector{1 \\ 2 \\ 3 }.$$
Find the value of $x_2$ by Cramer's Rule
in the system $A\vec{x}=\vec{b}$.
}{}
{$x_2=\Delta_2/\Delta$, $\Delta_2=\det\threebythree{-2 & 1 & 0}{0 & 2 & 4}{1 & 3 & -2}=36$, $\Delta=\det(A)=4$, $x_2=9$. }

\anotherpage
\problem{5}{
%\checkbox~
Assume
 $A^{-1}=\left(\begin{array}{rr}
 2 & -6 \\
 0 &  4
 \end{array}\right)
 $. Find the inverse of the transpose of $A$.
}{}{Compute $(A^T)^{-1}=(A^{-1})^T=\left(\twobytwo{2 & -6}{0 &
4}\right)^T=\twobytwo{2 & 0}{-6 & 4}$.}

\anotherpage
\problem{5}{
  {\small\sf This problem uses the identity $A\adj(A)=\adj(A)A=|A|I$, where $|A|$ is the determinant of matrix $A$. Symbol $\adj(A)$ is the adjugate or adjoint of $A$. The identity is used to derive the adjugate inverse identity $A^{-1}=\adj(A)/|A|$.}.

  Let $B$ be the matrix given
  below, where \fbox{?} means the value of the entry does not affect
  the answer to this problem. The second matrix is $C=\adj(B)$. Report the value of the determinant of matrix $C^{-1}B^2$.
$$
B=\left(\begin{array}{rrrrr}
  1 &  -1 &  ?  & ? \\
  1 &  ? &  0  & 0  \\
  ? &  0 &  2  &  ? \\
  ? &  0 &  0  &  ? \\
 \end{array}\right),\quad
 C=\left(\begin{array}{rrrrr}
  4 &  4 &  2  &  0 \\
 -4 &  4 & -2  &  0 \\
  0 &  0 &  4  &  0 \\
  0 &  0 &  0  &  4  \\
 \end{array}\right)$$
}{}
{The determinant of $C^{-1}B^2$ is $|B|^2/|C|$. Then $CB==\adj(B)B=|B|I$
implies $|C||B|=\det(|B|I)=|B|^4$. Because $|C|=|B|^3$, then the answer
is $1/|B|$. Return to $CB=|B|I$
 and do one dot product to find the value $|B|=8$. We report
$\det(C^{-1}B^2)=1/|B|=1/8$.}

\problem{5}{
Display the entry in row 3, column 4 of the adjugate matrix [or adjoint matrix] of
 $A=\left(\begin{array}{rrrr}
 0 & 2 & -1 & 0\\
 0 & 0 &  4  & 1\\
 1 & 3 & -2 & 0 \\
 0 & 1 & 1 & 0
 \end{array}\right)
 $. Report both the symbolic formula and the numerical value.
}{}
{The answer is the cofactor of $A$ in row 4, column 3 = $(-1)^{7}$ times minor of $A$
in 4,3 = $-2$.}


%\section*{Chapter 6}

\problem{5}{Consider a $3\times 3$ real matrix $A$
%$$A=\left(\begin{array}{rrrr}
%  0 & 4 & -1 & 0 \\
% -4 & 0 & -2 & 1 \\
%  0 & 0 &  5 & 1 \\
%  0 & 0 & -3 & 1
% \end{array}\right)$$
%
%A:=matrix([[0 , 4 , -1 ],
%  [-4 , 0 , -2 ],
%  [0 , 0 ,  5  ]]);eigenvals(A);
%
%       # 5, 4 I, -4 I
with eigenpairs
$$\left(-1 ,  \colvector{5\\ 6\\ -4}\right),
\quad \left(2i, \colvector{i\\ 2\\ 0}\right),
\quad \left(-2i, \colvector{-i\\ 2\\ 0}\right).$$
\begin{quote}

 Display an invertible matrix $P$ and a
 diagonal matrix $D$ such that $AP=PD$.

% (2) [10\%] Display a matrix product formula for $A$. To save time, {\bf do not evaluate any matrix products}.
\end{quote}
}{}{The columns of $P$ are the eigenvectors and the diagonal entries of $D$ are the eigenvalues, taken in the same order.}

\problem{5}{Find the eigenvalues of the matrix
$A=\left(\begin{array}{rrrrr}
 0 & -12 & 3 & 0 \\
 0 &  1 & -1 & 0 \\
 0 &  1 & 3 & 0 \\
 0 &  5 & 1 & 3
 \end{array}\right)$.
 \newline
 To save time, {\bf do not} find
 eigenvectors!
%A4:=matrix([ # F2010
%    [0, -12,  3, 0],
%    [ 0,  1,  -1, 0],
%    [ 0 , 1,  3, 0],
%    [ 0,  5,  1, 3]]);eigenvals(A4);
% ans == 0, 2, 2, 3
}{}{The characteristic polynomial is $\det(A-rI)=(-r)(3-r)(r-2)^2$. The eigenvalues are $0,2,2,3$.
 Determinant expansion of $\det(A-\lambda I)$ is by the cofactor method along column 1.
This reduces it to a $3\times 3$ determinant, which can be expanded by the cofactor method along column 3. }

\problem{5}{The matrix
$A=\left(\begin{array}{rrrrr}
 0 & -12 & 3  \\
 0 &  1 & -1  \\
 0 &  1 & 3
 \end{array}\right)$
 has eigenvalues $0,2,2$ but it is not diagonalizable, because
 $\lambda=2$ has only one eigenpair. Find an eigenvector for $\lambda=2$.\newline
To save time, {\bf don't find the eigenvector for $\lambda=0$}.
%A5:=matrix([ # F2010
%    [0, -12,  3],
%    [ 0,  1,  -1],
%    [ 0 , 1,  3]]);eigenvects(A5);
% ans ==
}{}{Because $A-2I=\left(\begin{array}{rrr}
-2 & -12 & 3  \\
 0 & -1 & -1  \\
 0 &  1 &  1
 \end{array}\right)$ has last frame $B=\left(\begin{array}{rrr}
 1 &  0 & -15/2  \\
 0 &  1 &  1  \\
 0 &  0 &  0
 \end{array}\right)$, then there is only one eigenpair for $\lambda=2$, with
 eigenvector $\vec{v}=\colvector{15\\ -2\\ 2}$.}

\problem{5}{Find the two complex eigenvectors corresponding to complex eigenvalues $-1 \pm 2i$ for
 the $2\times 2$ matrix $A=\twobytwo{-1 & 2}{-2&-1}$.
}{}{$\left( -1+2i,\colvector{-i \\ 1}\right)$, $\left( -1-2i,\colvector{i \\ 1}\right)$}
% A6:=matrix([[-1,2],[-2,-1]]); eigenvects(A6);

\problem{5}{ Let $A=\twobytwo{-7 & 4}{-12 & 7}$. Circle possible eigenpairs of $A$.
$$
 \left(1,\colvector{1\\ 2}\right) ,\quad  \left(2,\colvector{2\\ 1}\right) ,\quad
 \left(-1,\colvector{2\\ 3}\right).
$$
% P:=transpose(matrix([[1,2],[2,3]]));D1:=diag(1,-1);A:=evalm(P&*D1&*inverse(P));
% # ans is A:=matrix([[-7,4], [-12,7]]);
}{}{The first and the last, because the test $A\vec{x}=\lambda\vec{x}$ passes in both cases.}

\problem{5}{Let $I$ denote the $3\times 3$ identity matrix. Assume given two $3\times 3$ matrices
$B$, $C$, which satisfy $CP=PB$ for some invertible matrix $P$. Let $C$
have eigenvalues $-1$, $1$, $5$. Find the eigenvalues of $A=2I+3B$.
% ans:
}{}{Both $B$ and $C$ have the same eigenvalues, because $\det(B-\lambda I)=\det(P(B-\lambda I)P^{-1})=\det(PCP^{-1}-\lambda PP^{-1})=\det(C-\lambda I)$. Further, both $B$ and $C$ are diagonalizable. The answer is the same for all such matrices, so the computation can be done for a diagonal matrix $B=\diag(-1,1,5)$. In this
case, $A=2I+3B=\diag(2,2,2)+\diag(-3,3,15)=\diag(-1,5,17)$ and the eigenvalues of $A$ are $-1,5,17$.}


\problem{5}{Let $A$ be a $3\times 3$ matrix with
eigenpairs
$$
 (4,\vec{v}_1),\quad (3, \vec{v}_2), \quad
 (1, \vec{v}_3).
 $$
Let $P$ denote the augmented matrix of the eigenvectors $\vec{v}_2$, $\vec{v}_3$, $\vec{v}_1$, in exactly that order. Display the answer for $P^{-1}AP$. Justify the answer with a sentence.
}{}{Because $AP=PD$, then $D=P^{-1}AP$ is the diagonal matrix of eigenvalues, taken in the order determined by the eigenpairs $(3, \vec{v}_2), (1, \vec{v}_3), (4,\vec{v}_1)$. Then $D=\threebythree{3&0&0}{0&1&0}{0&0&4}$.}

\problem{5}{The matrix $A$ below has eigenvalues $3$, $3$ and $3$.
Test $A$ to see it is diagonalizable, and if it is, then display three eigenpairs of $A$.
$$
 A=\left(\begin{array}{rrrr}
 4 & 1 & 1 \\
 -1 & 2 & 1 \\
 0 & 0 &  3
 \end{array}\right)$$
}{}{Compute $\rref(A-3I)=\threebythree{1&1&0}{0&0&1}{0&0&0}$. This has rank 2, nullity 1. There is just one eigenvector $\colvector{1\\ -1 \\ 0}$ for $\lambda=3$. Not diagonalizable, no Fourier's model, not possible to display three eigenpairs.
}

%A:=matrix([[4 , 1 , -1 ],
%%  [-1 , 2 , -2 ],
%%  [0 , 0 ,  3  ]]);eigenvals(A);
% \hrulefill
%

\problem{5}{ Assume $A$ is a given $4\times 4$ matrix
with eigenvalues $0$, $1$, $3\pm 2i$. Find the eigenvalues of
$4A-3I$, where $I$ is the identity matrix.
}{}{Such a matrix is diagonalizable, because of four distinct eigenvalues.
Then $4B-3I$ has the same eigenvalues for all matrices $B$ similar to $A$. In particular,
$4A-3I$ has the same eigenvalues as $4D-3I$ where $D$ is the diagonal matrix with entries
$0,1,3+2i,3-2i$. Compute $4D-3I=\fourbyfour{-3&0&0&0}{0&1&0&0}{0&0&9+8i&0}{0&0&0&9-8i}$. The answer is $0,1,9+8i,9-8i$.}

\problem{5}{Find the eigenvalues of the matrix
$A=\left(\begin{array}{rrrrr}
 0 & -2 & -5 & 0 & 0 \\
 3 & 0 & -12 & 3 & 0 \\
 0 & 0 &  1 & -1 & 0 \\
 0 & 0 &  1 & 3 & 0 \\
 0 & 0 &  5 & 1 & 3
 \end{array}\right)$.
 \newline
 To save time, {\bf do not} find
 eigenvectors!
%A4:=matrix([ # S2010
%    [ 0,  -2, -5,  0, 0],
%    [3,  0, -12,  3, 0],
%    [ 0,  0,  1,  -1, 0],
%    [ 0 , 0 , 1,  3, 0],
%    [ 0,  0,  5,  1, 3]]);eigenvals(A4);
% ans == sqrt(6)*I, -sqrt(6)*I, 2, 2, 3
}{}{The characteristic polynomial is $\det(A-rI)=(r^2+6)(3-r)(r-2)^2$. The eigenvalues are $2,2,3,\pm \sqrt6 i$. Determinant expansion is by the cofactor method along column 5. This reduces it to a $4\times 4$ determinant, which can be expanded as a product of two quadratics. In detail, we first get $|A-rI|=(3-r)|B-rI|$,
where $B=\left(\begin{array}{rrrrr}
 0 & -2 & -5 & 0  \\
 3 & 0 & -12 & 3  \\
 0 & 0 &  1 & -1  \\
 0 & 0 &  1 & 3
 \end{array}\right)$. So we have one eigenvalue $3$, and we find the eigenvalues of $B$. Matrix $B$ is a block matrix $B=\left(\begin{array}{r|r} B_1 & B_2 \\ \hline 0 & B_3 \end{array}\right)$, where $B_1,B_2,B_3$ are all $2\times 2$ matrices. Then $B-rI=\left(\begin{array}{r|r} B_1-rI & B_2 \\ \hline 0 & B_3-rI \end{array}\right)$. Using the determinant product theorem for such special block matrices (zero in the left lower block) gives $|B-rI|=|B_1-rI|B_3-rI|$.
 So the answer for the eigenvalues of $A$ is $3$ and the eigenvalues of $B_1$ and $B_3$. We report $3,\pm\sqrt6 i, 2,2$. It is also possible to directly find the eigenvalues of $B$ by cofactor expansion of $|B-rI|$.
}


\problem{5}{Consider a $3\times 3$ real matrix $A$
%$$A=\left(\begin{array}{rrrr}
%  0 & 4 & -1 & 0 \\
% -4 & 0 & -2 & 1 \\
%  0 & 0 &  5 & 1 \\
%  0 & 0 & -3 & 1
% \end{array}\right)$$
%
%A:=matrix([[0 , 4 , -1 ],
%  [-4 , 0 , -2 ],
%  [0 , 0 ,  5  ]]);eigenvals(A);
%
%       # 5, 4 I, -4 I
with eigenpairs
$$\left(3 ,  \colvector{13\\ 6\\ -41}\right),
\quad \left(2i, \colvector{i\\ 2\\ 0}\right),
\quad \left(-2i, \colvector{-i\\ 2\\ 0}\right).$$
\begin{quote}

 (1) [10\%] Display an invertible matrix $P$ and a
 diagonal matrix $D$ such that $AP=PD$.

 (2) [10\%] Display a matrix product formula for $A$, but do not evaluate the matrix products, in order to save time.
\end{quote}
}{}{(1) $P=\threebythree{13&i&-i}{6&2&2}{-41&0&0}$, $D=\threebythree{3&0&0}{0&2i&0}{0&0&-2i}$.
(2) $AP=PD$ implies $A=PDP^{-1}$.}
\anotherpage

\problem{5}{Assume two $3\times 3$ matrices
$A$, $B$ have exactly the same characteristic equations. Let $A$
have eigenvalues $2$, $3$, $4$. Find the eigenvalues of $(1/3)B-2I$,
where $I$ is the identity matrix.
}{}{Because the answer is the same for all matrices similar to $A$ (that is, all $B=PAP^{-1}$)
then it suffices to answer the question for diagonal matrices. We know $A$ is diagonalizable, because it has distinct eigenvalues. So we choose $D$ equal to the diagonal matrix with entries $2,3,4$. Compute
$\frac13 D -2I = \threebythree{\frac23-2 & 0 & 0}{0 & \frac33-2 & 0}{0 & 0 & \frac43 - 2}$. Then the eigenvalues are $-\frac43, -1, -\frac23$.}
\anotherpage

\problem{5}{Let $3\times 3$ matrices $A$ and $B$ be
related by $AP=PB$ for some invertible matrix $P$. Prove that the
roots of the characteristic equations of $A$ and $B$ are identical.
}{}{The proof depends on the identity $A-rI = PBP^{-1}-rI = P(B-rI)P^{-1}$ and the determinant product theorem $|CD|=|C||D|$. We get $|A-rI|=|P||B-rI||P^{-1}|=|PP^{-1}||B-rI|=|B-rI|$. Then $A$ and $B$ have exactly the same characteristic equation, hence exactly the same eigenvalues.}

\anotherpage

\problem{5}{Find the eigenvalues of the matrix $B$:
$$B=\left(\begin{array}{rrrr}
 2 & 4 & -1 & 0 \\
 0 & 5 & -2 & 1 \\
 0 & 0 &  4 & 1 \\
 0 & 0 &  1 & 4
 \end{array}\right)$$
}{}{The characteristic polynomial is $\det(B-rI)=(2-r)(5-r)(5-r)(3-r)$. The eigenvalues are $2,3,5,5$.

It is possible to directly find the eigenvalues of $B$ by cofactor expansion of $|B-rI|$.

An alternate method is described below, which depends upon a determinant product theorem for special block matrices, such as encountered in this example.

Matrix $B$ is a block matrix $B=\left(\begin{array}{r|r} B_1 & B_2 \\ \hline 0 & B_3 \end{array}\right)$, where $B_1,B_2,B_3$ are all $2\times 2$ matrices. Then $B-rI=\left(\begin{array}{r|r} B_1-rI & B_2 \\ \hline 0 & B_3-rI \end{array}\right)$. Using the determinant product theorem for such special block matrices (zero in the left lower block) gives $|B-rI|=|B_1-rI||B_3-rI|$.
 So the answer is that $B$ has eigenvalues equal to the eigenvalues of $B_1$ and $B_3$. These are quickly found by Sarrus' Rule applied to the two $2\times 2$ determinants $|B_1-rI|=(2-r)(5-r)$ and $|B_3-rI|=r^2-8r+15=(5-r)(3-r)$.
}

% A:=matrix( [[2, 4 , -1 , 0 ],
%  [0 , 25 , -2 , 1 ],
%  [0 , 0 ,  4 , 1 ],
%  [0 , 0 ,  1 , 4]]);
% evs==2,5,5,3
\anotherpage

\problem{5}{
Let $W$ be the column space of $A=\left(\begin{array}{cc}1&1\\1&1\\1&0\end{array}\right)$ and let $\vec{\bf b}=\colvector{1\\ -1\\ 1}$. Let $\vec{\hat{\bf b}}$ be the near point to $\vec{\bf b}$ in the subspace $W$. Find $\vec{\hat{\bf b}}$.
}{}{The columns of $A$ are independent. The normal equation is $A^TA\vec{y}=A^T\vec{b}$, which in explicit form is $\twobytwo{3&2}{2&2}\vec{y} = \colvector{1\\ 0}$.  The answer is $\vec{y}=\colvector{1\\ -1}$. Then
$\vec{\hat{\bf b}}=A\vec{y}=\colvector{0\\ 0\\ 1}$.}

\anotherpage

\problem{5}{
There are real $2\times 2$ matrices $A$
  such that $A^2=-4I$, where $I$ is the identity matrix.
  Give an example of one such matrix $A$ and then verify that $A^2+4I=0$.
}{}{Choose any matrix whose characteristic equation is $\lambda^2+4=0$.
Then $A^2+4I=0$ by the Cayley-Hamilton theorem.}
\anotherpage

\problem{5}{
Let $Q=<\vec{q}_1 | \vec{q}_2>$
be orthogonal $2\times 2$ and $D$ a diagonal matrix with diagonal entries $\lambda_1, \lambda_2$. Prove that
the $2\times 2$ matrix $A=QDQ^T$ satisfies
 $A=\lambda_1 \vec{q}_1\vec{q}_1^T +\lambda_2\vec{q}_2\vec{q}_2^T$.
}{}{
Let $B=\lambda_1 \vec{q}_1\vec{q}_1^T +\lambda_2\vec{q}_2\vec{q}_2^T$. We prove $A=B$. First observe that both $A$ and $B$ are symmetric.
Because the columns of $Q$
form a basis of $\Rr^2$, it suffices to prove that $\vec{x}^TA=\vec{x}^TB$ for $\vec{x}$ a column of $A$. For example,
take $\vec{x}=\vec{q}_1$. Then $\vec{x}^TA=(A^T\vec{q}_1)^T=(A\vec{q}_1)^T=\lambda_1\vec{q}_1^T$. Orthogonality of $Q$ implies $\vec{x}^TB=(B\vec{q}_1)^T=
(\lambda_1 \vec{q}_1\vec{q}_1^T\vec{q}_1 +\lambda_2\vec{q}_2\vec{q}_2^T\vec{q}_1)^T=\lambda_1(\vec{q}_1\cdot 1)^T=\lambda_1\vec{q}_1^T$.
Repeat for subscript 2 to complete the proof.
}
\anotherpage

\problem{5}{
A matrix $A$ is {\bf defined} to be positive definite if and only if $\vec{x}^TA\vec{x}>0$ for nonzero $\vec{x}$.
Which of these matrices are positive definite?
$$\twobytwo{1&2}{2&1},\quad
\twobytwo{1&-2}{-2&6},\quad
\twobytwo{-1&2}{2&-6}$$
}{}{
Only the second matrix. A useful test is positive eigenvalues. Another is principal determinants all positive.
}
\anotherpage



\problem{5}{
Let $A$ be a real symmetric $2\times 2$ matrix. Prove that the eigenvalues of $A$ are real numbers.
}{}{
Begin with $A\vec{x}=\lambda \vec{x}$. Take the conjugate of both sides to get a new equation. Because the conjugate of a real
matrix is itself, then the new equation looks like $A\vec{y}=\bar\lambda
\vec{y}$ where $\vec{y}$ is the conjugate of $\vec{x}$. Formally, replace $i$ by $-i$
in the components of $\vec{x}$ to obtain $\vec{y}$. Symbol $\bar\lambda$ is the complex conjugate of $\lambda$. Transpose this
new equation to get $\vec{y}^TA=\bar\lambda\vec{y}^T$, possible because $A=A^T$. Taking dot products two ways gives
$\vec{y}\cdot A\vec{x} =
\lambda\vec{y}\cdot\vec{x}=\bar\lambda\vec{y}\cdot\vec{x}$. Because $\vec{y}\cdot\vec{x}=\|\vec{x}\|^2>0$, then
we can cancel to get $\lambda=\bar\lambda$, proving the eigenvalue $\lambda$ is real.
}

\anotherpage

\problem{5}{
Let $B$ be a real $3\times 4$ matrix. Prove that the eigenvalues of $B^TB$ are non-negative.
}{}{
Let $A=B^TB$. An eigenpair $(\lambda,\vec{v})$ of $A$ satisfies $A\vec{v}=\lambda\vec{v}$, $\vec{v}\ne \vec{0}$. Already known is that the eigenvalue $\lambda$ and the eigenvector $\vec{v}$ are real, because $A=B^TB$ is a symmetric matrix. Compute $\|B\vec{v}\|^2 = (B\vec{v})^T(B\vec{v})=\vec{v}^TB^TB\vec{v}=\vec{v}^TA\vec{v}=\vec{v}^T\lambda\vec{v}=\lambda\|\vec{v}\|^2$. Therefore, $\lambda$ is non-negative.
}
\anotherpage

\problem{5}{
The spectral theorem says that a symmetric matrix $A$ can be factored into $A=QDQ^T$ where $Q$ is orthogonal and $D$ is diagonal. Find $Q$ and $D$ for the symmetric matrix
$A=\begin{pmatrix}3 & -1\\ -1 &3\end{pmatrix}$.
}{}{
Start with the equation $r^2-6r+8=0$ having roots $r=2,4$. Compute the eigenpairs  $(2,\vec{v}_1)$, $(4,\vec{v}_2)$ where
$\vec{v}_1=\colvector{1\\ 1}$ and $\vec{v}_2=\colvector{-1\\ 1}$. The two vectors are orthogonal but not of unit length. Unitize them to
get $\vec{u}_1=\frac{1}{\sqrt2}\vec{v}_1$,  $\vec{u}_2=\frac{1}{\sqrt2}\vec{v}_2$. Then $Q=<\vec{u}_1 | \vec{u}_2>=\frac{1}{\sqrt2}\twobytwo{1&-1}{1&1}$,
$D=\diag(2,4)$.
}


\anotherpage

\problem{5}{
Show that if $B$ is an invertible matrix and $A$ is similar to $B$, with $A=PBP^{-1}$,
then $A$ is invertible.
}{}{The determinant product theorem applies to obtain $|A|=|B| \ne 0$, hence $A$ is invertible.}

%\problem{5}{
%Give an example of a Jordan form of size $10\times 10$ with exactly three different eigenvalues in five Jordan blocks.
%}{}{
%Let $N_k$ be the nilpotent matrix (means a power of the matrix is the zero matrix) formed from the zero matrix of
%dimension $k\times k$ by making the superdiagonal entries all ones. Then any Jordan block can be written as a diagonal matrix plus
%a nilpotent matrix $N_k$. Define $J_1=\diag(1,1)+N_2$, $J_2=\diag(1,1)+N_2$, $J_3=\diag(2,2,2)+N_3$, $J_4=\diag(3,3,3)+N_3$.
%Then define $J=\diag(J_1,J_2,J_3,J_4)$. The eigenvalues of the Jordan form $J$ are $1,2,3$ and there are $4$ Jordan blocks.
%}

%\problem{5}{
%Prove that a Jordan block of size $3\times 3$ has exactly one eigenvector.
%}{}{
%Write the matrix $A=\threebythree{c&1&0}{0&c&1}{0&0&c}$ where $c$ is the eigenvalue of $A$. This is the general form of
%a Jordan block of dimension $3$. We analyze $(A-cI)\vec{x}=\vec{0}$ in order to find all eigenvectors of $A$. This system
%in scalar form is $x_2=0, x_3=0, 0=0$. There is one free variable, therefore exactly one eigenvector.
%}

\problem{5}{
Write out the singular value decomposition for the matrix
$A=\twobytwo{2&2}{-1&1}$.
}{}{
$A=\twobytwo{2&2}{-1&1}=\twobytwo{1&0}{0&1}
\twobytwo{\sqrt8&0}{0&\sqrt2}
\left(\frac{1}{\sqrt2}\twobytwo{1&-1}{1&1}\right)^T$
}

\problem{5}{
Strang's Four Fundamental Subspaces  are the nullspace of $A$, the nullspace of $A^T$,
the row space of $A$ and the column space of $A$.
Describe, using a figure or drawing, the locations in the matrices $U$, $V$ of the singular value decomposition
$A=U\Sigma V^T$ which are  consumed by the four fundamental subspaces of $A$.  
}{}{
$A=<colspace(A) | nullspace(A^T)>\Sigma <rowspace(A) | nullspace(A)>^T$. The dimensions of the spaces left to right
are $r$, $m-r$, $r$, $n-r$, where $A$ is $m\times n$ and $r$ is the rank of $A$.
}


%\section*{Chapter 7}

\anotherpage
\problem{5}{
Give examples for a vertical shear and a horizontal shear in the plane. Expected is a $2\times 2$ matrix $A$
which represents the linear transformation.
}{}{
$\twobytwo{1&k}{0&1}$ is a horizontal  shear,
$\twobytwo{1&0}{k&1}$ is a vertical  shear}

\anotherpage
\problem{5}{
Give examples for clockwise and counterclockwise rotations in the plane. Expected is a $2\times 2$ matrix $A$
which represents the linear transformation.
}{}{
$\twobytwo{\cos \theta&\sin\theta}{-\sin\theta&\cos\theta}$ for
$\theta>0$ rotates clockwise and for $\theta<0$ rotates counter clockwise.
}

\problem{5}{
Let the linear transformation $T$ from $\Rr^3$ to $\Rr^3$
be defined by its action on three independent vectors:
$$
T\left(\begin{pmatrix}3\\ 2\\ 0\end{pmatrix}\right)=
\begin{pmatrix}4 \\ 4\\ 2\end{pmatrix},
T\left(\begin{pmatrix}0\\ 2\\ 1\end{pmatrix}\right)=
\begin{pmatrix}4 \\ 0\\ 2\end{pmatrix},
T\left(\begin{pmatrix}1\\ 2\\ 1\end{pmatrix}\right)=
\begin{pmatrix}5 \\ 1\\ 1\end{pmatrix}.$$
Find the unique $3\times 3$ matrix $A$ such that $T$ is defined
by the matrix multiply equation $T(\vec{x})=A\vec{x}$.
}{}{$A\threebythree{3&0&1}{2&2&2}{0&1&1}=\threebythree{4&4&5}{4&0&1}{2&2&1}$ can be solved for matrix $A$.
The answer is $A=\threebythree{1&\frac12 & 3}{1 & \frac12 & -1}{-1 & \frac52 & -3}$.
}

\anotherpage
\problem{5}{
Let $A$ be an $m\times n$ matrix. Denote by $S_1$ the row space of of
$A$ and $S_2$ the column space of $A$. Prove that $T ~:~ S_1 \to S_2$
defined by $T(\vec{x})=A\vec{x}$ is one-to-one and onto.
}{}{Suppose $\vec{x}$ is in the rowspace. The fundamental theorem of
linear algebra says $\vec{x}$ is perpendicular to the nullspace. of $A$.
So, if $\vec{x}_1,\vec{x}_2$ are vectors in the rowspace of $A$ and
$A\vec{x}_1)=A(\vec{x}_2$ then $A(\vec{x}_1-\vec{x}_2)=\vec{0}$. This
implies $\vec{x}=\vec{x}_1-\vec{x}_2$ belongs to the nullspace of $A$.
But $\vec{x}$ is a linear combination of vectors in $S_1$, so it is in
$S_1$, which is perpendicular to the nullspace. The intersection of $V$
and $V^\perp$ is the zero vector, so $\vec{x}=\vec{0}$, which says
$\vec{x}_1=\vec{x}_2$, proving $T$ is one-to-one.

The proof for onto is done by solving the equation $A\vec{x}=\vec{y}$
where $\vec{y}$ is any vector in the column space of $A$. We have to
find $\vec{x}$ in $S_1$ that solves the equation. Select any $\vec{z}$
such that $\vec{y}=A\vec{z}$. Because the rowspace is perpendicular to
the nullspace, then there are unique vectors $\vec{x}, \vec{u}$ such
that $\vec{z}=\vec{x}+\vec{u}$, and $\vec{u}$ is in the nullspace while
$\vec{x}$ is in the rowspace. Then
$\vec{y}=A\vec{z}=A\vec{x}+A\vec{u}=A\vec{x}+\vec{0}=A\vec{x}$. We have
solved the equation for $\vec{x}$ in $S_1$. The proof is complete.
}

%\problem{5}{
%Assume singular value decomposition
%$A=U\Sigma V^T$ given by
%$$\twobytwo{2&2}{-1&1}=
%\twobytwo{1&0}{0&1}
%\twobytwo{\sqrt8&0}{0&\sqrt2}
%\left(\frac{1}{\sqrt2}\twobytwo{1&-1}{1&1}\right)^T.$$
%Find a formula for the pseudo-inverse, but don't bother to multiply out matrices.
%}{}{
%The definition is $A^+ = V\Sigma^+U^T$. Identifying the matrices from the formula gives
%$A^+ =
%\left(\frac{1}{\sqrt2}\twobytwo{1&-1}{1&1}\right)
%\twobytwo{\frac{1}{\sqrt8}&0}{0&\frac{1}{\sqrt2}}
%\twobytwo{1&0}{0&1}^T$.
%}

\section*{Essay Questions}

\problem{5}{
Define an Elementary Matrix. Display the fundamental matrix multiply equation which summarizes a sequence of swap, combo, multiply operations, transforming a matrix $A$ into a matrix $B$.
}{}{An elementary matrix is the matrix $E$ resulting from one elementary row operation (swap, combination, multiply)
performed on the identity matrix $I$. The fundamental equation looks like $E_k\cdots E_2E_1A=B$, but this is not the complete answer, because the elementary matrices have to be explained, relative to the elementary row operations which transformed $A$ into $B$.}

\problem{5}{
Let $V$ be a vector space and $S$ a subset of $V$. Define what it means for $S$ to be a {\bf subspace} of $V$. The definition is sometimes called the {\bf Subspace Criterion}, a theorem with three requirements, with the conclusion that $S$ is a subspace of $V$.
}{}{The definition can be found in the textbook, although the naming convention might not be the same.
In some books it is taken as the definition, in other books it is derived from a different definition, then recorded as a theorem called the subspace criterion: (1) Zero is in $S$; (2) Sums of vectors in $S$ are in $S$; (3) Scalar multiples of vectors in $S$ are in $S$. The important underlying assumption is that addition and scalar multiplication are inherited from $V$.}

\problem{5}{
The null space $S$ of an $m\times n$ matrix $M$ is a subspace
of $\mathbb{R}^n$. This is called the {\em Kernel Theorem}, and it is
proved from the {\bf Subspace Criterion}. Both theorems conclude that
some subset is a subspace, but they have different hypotheses.
Distinguish the Kernel theorem from the Subspace Criterion,
as viewed from hypotheses.
}{}{The distinction is that the kernel theorem applies only to fixed vectors, that is, the vector space $\Rr^n$, whereas the subspace criterion applies to any vector space.}

% chapter 4
\problem{5}{
Least squares can be used to find the best fit line for the
points $(1,2)$, $(2, 2)$, $(3,0)$. Without finding the line equation,
describe how to do it, in a few sentences.
}{}{Find a matrix equation $A\vec{x}=\vec{b}$ using the line equation $y=v_1x+v_2$ where $\vec{x}=\colvector{v_1\\ v_2}$. Then solve the normal equation $A^TA\vec{v}=A^T\vec{b}$.
A full solution is expected, with a formula for $A$. But don't solve the normal equation.
}




%\problem{5}{
%Display the equation for the pseudo inverse of $A$, then define and
%document each matrix in the product.
%}{}{See section 7.3. Yes, you are expected to know a formula for $A^+$.}

\anotherpage
\problem{5}{
State the Fundamental Theorem of Linear Algebra. Include {\bf Part 1}:
The dimensions of the four subspaces, and {\bf Part 2}: The
orthogonality equations for the four subspaces.
}{}{Part 1. The dimensions are $n-r,r,rm-r$ for nullspace(A), colspace(A), rowspace(A), nullspace($A^T$).
Part 2. The orthogonality relation is rowspace $\perp$ nullspace, for both $A$ and $A^T$.
A full statement is expected, not the brief one given here.}

\anotherpage
\problem{5}{
Display the equation for the Singular Value Decomposition (SVD), then
cite the conditions for each matrix. Finish with a written description of how to construct the matrices in the SVD.
}{}{Let $r$ be the rank of an $m\times n$ matrix $A$. Then $A=U\Sigma V^T$, where $A\vec{v}_i=\sigma_i\vec{u}_i$, $U=<\vec{u}_1|\cdots|\vec{u}_n>$,
$V=<\vec{v}_1|\cdots|\vec{v}_m>$ are orthogonal and $\Sigma=\diag(\sigma_1,\ldots,\sigma_r,0,\ldots,0>$.
The singular values are $\sigma_i=\sqrt{\lambda_i}$ where $\{\lambda_i\}$ is the list of real nonnegative eigenvalues of $A^TA$. Only the positive values $\sigma_i$, $i=1,\ldots, r$ where $r$ is the rank of $A$ are entered into matrix $\Sigma$, and they must be ordered in decreasing order. Because there is a full set of $n$ orthonormal eigenpairs $(\lambda,\vec{v})$ for the $n\times n$ symmetric matrix $A^TA$, the matrix $V$ is constructed from the list of orthonormal eigenvectors $\{\vec{v}_i\|_{i=1}^n$. Matrix $U$ is constructed from an orthonormal basis $\{\vec{u}_i\}_{i=1}^m$, obtained from Gram-Schmidt, starting with the list of orthogonal vectors $\vec{u}_i=\frac{}{\sigma_i}A\vec{v}_i$, $i=1,\ldots, r$, after appending to the list $m-r$ independent vectors to complete a basis of $\Rr^m$.
}

\anotherpage
\problem{5}{
State the {\bf Spectral Theorem} for symmetric matrices. Include the important results included in the spectral theorem, about real eigenvalues and diagonalizability. Then discuss the {\bf spectral decomposition}.
}{}{
A real symmetric $n\times n$ matrix $A$ has only real eigenvalues. Marix $A$ has $n$ eigenpairs, in short it is is diagonalizable. To each eigenvalue of multiplicity $k$, there are $k$ independent eigenvectors. These eigenvectors span a subspace of dimension $k$ which by Gram-Schmidt is spanned by $k$ orthonormal vectors. Two such subspaces corresponding to different eigenvalues are orthogonal. The spectral decomposition of $A$ is $A=QDQ^T$ where $D$ is a diagonal matrix of eigenvalues and $Q$ is an orthogonal matrix of corresponding eigenvectors.
}




%\phantom{page}
%\anotherpage


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

\problemsdone
\end{document}

% End of the Document
