\begin{center}
MA464, Matrix Theory, Fall 1992 \\[.2in]
Examination  1\\[.2in]
Dr. E. A. Coutsias \\
\end{center}
{\em Instructions:} This exam is due in class Monday, Oct. 12. 
You can use the textbook (or other texts if you want), your notes and 
your wits.  You should not discuss the problems with anyone 
else, in or outside the class (all problems, hard and easy, are weighted
equally). 

\begin{enumerate}
\item (Graduate students only!!!) \\
$\left<\left<\right.\right.$Householder reflections$\left.\left.\right>\right>$\\
\begin{enumerate}
\item If {\em w} is a unit vector show that the matrix 
${\em Q} = {\em I} - 2{\em ww}^T$ is orthogonal.

\item Describe geometrically the action of ${\em Q}$ on an
arbitrary vector ${\em u} \in {\em R}^n$. (Note that the transformation
is a reflection about the median of an appropriately defined isosceles
triangle).

\item Given a vector ${\em a}_1 \in  {\em R}^n$ use the results in (1)--(2)
to construct an orthogonal matrix ${\em Q}$ that maps ${\em a}_1$ int a vector
${\em b}_1$ whose only nonzero component is the first, $b_{11}$. \\
 Note: since $|b_{11}|^2 = \sum a_{1i}^2$, choose 
\[ b_{11} = \left\{ \begin{array}{ll}
-\frac{a_{11}}{|a_{11}|}\parallel {\em a}_1\parallel, & a_{11} \neq 0\\
 -\parallel a_1 \parallel, & a_{11} = 0 \end{array} \right. \]
That is, show that
\[ w_{11} = -\frac{a_{11}}{| a_{11} |}
\left(\frac{\left|a_{11}\right|+\parallel{\em a_1}\parallel}{S}\right) \]
\[ w_{i1} = -\frac{a_{i1}}{S} \ \ \ ,\ \ \ i\neq 1 ,\]
with $S^2 = 2\parallel{\em a}_1\parallel(\left|a_{11}\right|+
\parallel{\em a}_1\parallel)$.
\\
(you must show that $S^2 = \parallel {\em b}_1 - {\em a}_1\parallel^2 $ ).

\item Also, construct an orthogonal matrix ${\em Q}_l$ that transforms a 
vector ${\em a}_l$ into a vector ${\em b}_l$ such that 
\begin{eqnarray*}
b_{il} & = & a_{il}\ \ \ ,\ \ \ i = 1,\cdots , l-1 \\
b_{il} & = & 0\ \ \ ,\ \ \ i = l+1,\cdots , n.
\end{eqnarray*}
What must $b_{ll}$ be? Choose its sign in accordance to your
choice for $b_{11}$.

\item Utilizing the above ideas, describe an algorithm that accomplishes a 
factorization ${\em A = QR}$ where ${\em A}$ is an $m\times n$ ($m\geq n$)
matrix of rank n.

\item How many operations does the algorithm in (e) require?

\item For the same matrix ${\em A}$ estimate the operation count
for a ${\em QR}$ factorization using the Gramm--Schmidt procedure.
Compare the two methods.
\end{enumerate}

\newpage
\item (Undergraduates only!)\\
Construct a Householder transformation to map the vector {\bf u}
with $u^T = (1 \ \ \ 2 \ \ \ 3 \ \ \  4)$ onto a vector along the 
$x_2$ axis. (Two choices).

        \item
\begin{enumerate}
        \item
 Show that if the $n\times n$ matrix $A$ is symmetric with positive pivots, 
then there exists a lower triangular $n\times n$ matrix $L$  with positive
diagonal entries such that  $ A = L L^T$ (Cholesky factorization).
        \item 
Find the Cholesky factorization for the matrix
\[ A = \left[ \begin{array}{rr}
                   4 & 12 \\
                  12 & 45    \end{array} \right] .\]
        \item
Employ the Cholesky factorization to 
find a least squares solution to the inconsistent system
\[  \left[ \begin{array}{rr}
           1 & 2 \\ 3 & 4 \\ 5 & 6 \end{array} \right] x =
    \left[ \begin{array}{rr}
           1 \\ 1 \\ 1 \end{array} \right]  . \]
\end{enumerate}

%\newpage
       \item
A Givens rotation is an orthogonal matrix of the form
\[ J_{ik}(\theta) =
\left[ \begin{array}{rrrrr}
                     1     & \vdots &       &\vdots &        \\
                    \cdots &    c   & \cdots &   s   & \cdots \\
                           & \vdots &       &\vdots &        \\
                    \cdots &   -s   & \cdots &   c   & \cdots \\
                           & \vdots &       &\vdots &    1   
\end{array}\right] \ \ 
\begin{array}{r} \ \\ i \\ \ \\ k \\ \  \end{array}. \]
(Here entries not shown are zero, except for the main diag. which contains 1's
in places not shown).
\begin{enumerate}
        \item 
Show that one can write $c$ and $s$ as $c=\cos \theta$ and $s = \sin \theta$
for some angle $\theta$.
        \item 
What is the geometric effect of a Givens rotation 
$J_{ik}(\theta)$ applied to ${\cal{R}}^n$?
        \item
Show that one can choose a Givens rotation to map the vector
$x=(1,2,3,4)^T$ into a vector $y$ of the form $y=(--,--,--,0)^T$.
        \item
Show how one can choose a Givens rotation R to accomplish the
transformation
\[ R^T\left[ \begin{array}{rrr}
             4 & 4 & 2 \\
             4 & 4 & 1 \\
             2 & 1 & 8  \end{array} \right]R =
      \left[ \begin{array}{rrr}
                 4     & 2\sqrt{5} & 0   \\
             2\sqrt{5} &    5.6    & 2.2 \\
                 0     &    2.2    & 6.4  \end{array} \right] .\]
(Hint: rotate on the y-z plane!).
\end{enumerate}
\item (The Sherman-Morrison-Woodbury formula)\\
  Let A be $n\times n$, nonsingular. Show that if the $m\times m$ matrix T defined by
$$ T = I + V^{T} A^{-1} U $$
is nonsingular, then 
$$(A+UV^{T})^{-1} = A^{-1} - A^{-1} U T^{-1} V^{T} A^{-1} .$$

\item Given the matrix 
\[ A = \left( \begin{array}{rrr}
            1 & 2 & 1 \\
            0 & 1 & 2 \\
            1 &-1 &-5 \\
           -1 & 3 & 9 \end{array} \right)   .\]
\begin{enumerate}
\item Find a basis for ${\cal{N}}(A)$, ${\cal{R}}(A)$, ${\cal{N}}(A^T)$, 
${\cal{R}}(A^T)$.
\item Show explicitly that
${\cal{R}}(A) = {\cal{N}}^{\perp}(A^T)$ and 
${\cal{N}}(A) = {\cal{R}}^{\perp}(A^T)$
\item Find all {\underline {possible}} solutions of $Ax = b$ for
  $b^T = (2 \ \ \ \ -1 \ \ \ \ 5 \ \ \ \  -7) $ and 
  $b^T = (1 \ \ \ \ 0 \ \ \ \ 1 \ \ \ \  1) $ 
\item By identifying the base and free variables in the above problem,
rewrite in the form
$$ A^{\prime}x^{\prime} = ( a_i a_j) \left( \begin{array}{r} 
                            x_i \\ x_j \end{array} \right) = b - a_k x_k 
= b^{\prime}$$
with $a_i$, $a_j$ the (linearly independent) columns corresponding to the 
base variables ($x_i$ and $x_j$ respectively), and $a_k$ the column of A
corresponding to the free variable $x_k$. (i, j, and k must be determined!).
This is a least squares problem. Solve it by any method and determine
all possible answers. 
\item Interpret your results in the previous question geometrically.
That is, what is the error $e^{\prime} = A^{\prime}x^{\prime}- b^{\prime}$
and how does it compare to the error in terms of the original problem
$e = Ax -b$?
\end{enumerate}
\item (Projection vs. QR-factorization for the LS problem)
  Consider the LS problem
\[\left( \begin{array}{rr} 
        1 & 2 \\
        0 & 1 \\
        1 &-1 \\
       -1 & 3 \end{array} \right) x = 
  \left( \begin{array}{r} 
         0 \\ 1 \\ 0 \\ 0 \end{array} \right) . \]
Find the Least squares solution:
\begin{enumerate}
\item By using the projection method.
\item By using QR-factorization, either via Gramm-Schmidt or via 
Householder transformations.
\item Are the answers to the previous two problems the same? Why? (or why not?).
\end{enumerate}
\end{enumerate}
