\documentclass[twoside]{article}

\usepackage{camnum}
\usepackage{palatino}

\textheight=22.5cm
\textwidth=15cm
\topmargin=-1cm
\oddsidemargin=0.5cm
\evensidemargin=0.5cm
\parindent=0pt
\parskip=6pt

\begin{document}
\begin{center}
  {\large \textbf{Mathematical Tripos Part IB: Easter 2001}}

  {\Large \textbf{Numerical Analysis -- Detailed Example
      5a\footnote{Corrections and suggestions to these notes should
        be emailed to \texttt{a.shadrin@damtp.cam.ac.uk}. All handouts
        are available on the WWW at the URL 
        \texttt{http://www.damtp.cam.ac.uk/user/na/PartIB/Handouts.html}.}}}

  \vspace{8pt}
  \textbf{\textit{\LARGE QR factorization: Givens rotations}}
\end{center}

Let
$$
  A=\left[\begin{array}{rrr}
      2 & 4 & 5\\
      1 &-1 & 1\\
      2 & 1 &-1\\
    \end{array}\right].
$$
Then $R\leftarrow A$,
$$
\begin{array}{rcl}
%
   R\leftarrow A
&=& \left[\begin{array}{rrr}
      \fbox{2} & 4 & 5\\
      \fbox{1} &-1 & 1\\
      2 & 1 &-1\\
    \end{array}\right]\\[4ex]

   R\leftarrow\Omega^{[1,2]}R   
&=& \underbrace{\frac{1}{\sqrt{5}}
   \left[\begin{array}{rrr} 
      2 & 1 & 0 \\
     -1 & 2 & 0 \\
      0 & 0 & \sqrt{5}
   \end{array}\right]}_{\Omega^{[1,2]}}
   \left[\begin{array}{rrr}
      2 & 4 & 5 \\
      1 &-1 & 1 \\
      2 & 1 &-1
    \end{array}\right]
 = \frac{1}{\sqrt{5}}
   \left[\begin{array}{rrr}
      \fbox{5} &  7 & 11 \\
      0 & -6 & -3 \\
      \fbox{$2\sqrt{5}$} & \sqrt{5} & -\sqrt{5}
   \end{array}\right] \\[8ex]
%
   R\leftarrow\Omega^{[1,3]}R   
&=& \underbrace{\frac{1}{3\sqrt{5}}
   \left[\begin{array}{rrr}
      5 & 0 & 2\sqrt{5} \\
      0 & 3\sqrt{5} & 0 \\
     -2\sqrt{5} & 0 & 5
   \end{array}\right]}_{\Omega^{[1,3]}}
   \frac{1}{\sqrt{5}}
   \left[\begin{array}{rrr}
      5 & 7 & 11 \\
      0 &-6 & -3 \\
      2\sqrt{5} & \sqrt{5} & -\sqrt{5}
   \end{array}\right]
 = \frac{3}{\sqrt{5}}
   \left[\begin{array}{rrr}
     \sqrt{5} & \sqrt{5} & \sqrt{5} \\
      0 & \fbox{-2} & -1 \\
      0 & \fbox{-1} & -3
   \end{array}\right], \\[8ex]
%
   R\leftarrow\Omega^{[2,3]}R   
&=& \underbrace{\frac{1}{\sqrt{5}}
   \left[\begin{array}{rrr}
    \sqrt{5} & 0 & 0 \\
      0 & 2 & 1 \\
      0 &-1 & 2 
   \end{array}\right]}_{\Omega^{[2,3]}} 
   \frac{3}{\sqrt{5}}
   \left[\begin{array}{rrr}
     \sqrt{5} & \sqrt{5} & \sqrt{5} \\
      0 & -2 & -1 \\
      0 & -1 & -3
   \end{array}\right]
 = \left[\begin{array}{rrr}
      3 & 3 & 3 \\
      0 &-3 &-3 \\
      0 & 0 &-3
   \end{array}\right].
\end{array}
$$

Finally,
$$
\begin{array}{@{}r@{}c@{}l}
    Q^{\CC{T}}
 = \Omega^{[2,3]}\Omega^{[1,3]}\Omega^{[1,2]}
 =  \frac{1}{\sqrt{5}} 
    \left[\begin{array}{rrr}
    \sqrt{5} & 0 & 0 \\
      0 & 2 & 1 \\
      0 &-1 & 2 
   \end{array}\right] 
   \frac{1}{3}
   \left[\begin{array}{rrr}
     \sqrt{5} & 0 & 2 \\
      0 & 3 & 0 \\
     -2 & 0 & \sqrt{5}
   \end{array}\right] & \times\Omega^{[1,2]} \\[4ex]
 =  \frac{1}{3\sqrt{5}}
    \left[\begin{array}{rrr}
      5 & 0 & 2\sqrt{5} \\
     -2 & 6 &  \sqrt{5} \\
     -4 &-3 & 2\sqrt{5} 
   \end{array}\right] & 
   \frac{1}{\sqrt{5}} 
   \left[\begin{array}{rrr}
      2 & 1 & 0 \\
     -1 & 2 & 0 \\
      0 & 0 & \sqrt{5}
   \end{array}\right]
& =  \frac{1}{3}
    \left[\begin{array}{rrr}
      2 & 1 & 2 \\
     -2 & 2 & 1 \\
     -1 &-2 & 2
   \end{array}\right].
\end{array}
$$
and
$$
Q =  \frac{1}{3}
    \left[\begin{array}{rrr}
      2 &-2 & -1 \\
      1 & 2 & -2 \\
      2 & 1 &  2
   \end{array}\right] \quad
$$
(Compare with Example 4a and notice non-uniqueness of the QR
factorization.)



\end{document}
%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
