\documentclass{article}

\newcommand{\docid}{Final}
\newcommand{\R}{\mathbb{R}}
\newcommand{\row}{\operatorname{Row}}
\newcommand{\col}{\operatorname{Col}}
\newcommand{\Nul}{\operatorname{Nul}}
\newcommand{\Rank}{\operatorname{Rank}}
\newcommand{\Span}{\operatorname{Span}}
\newcommand{\proj}{\operatorname{Proj}}
\newcommand{\norm}[1]{\Vert #1 \Vert}

\input localmacs

\renewcommand{\doc}{Final Exam Practice}
%\usepackage{utopia}


\begin{document}
\doctitle

The Final exam will is at \emph{ 7:30-9:30 pm, Wednesday, December 13
  in 117 DBRT}.  It is comprehensive and covers the following sections
of Chapters 1-6: 1.1-1.8, 2.1-2.3, 3.1-3.3, 4.1-4.7, 5.1-5.4, 6.1-6.5.

You should use the practice exams for review material for the first 5
chapters, below you will find some problems for chapter 6. The last
quiz is also a good place to look for problems for chapter 6. 

The final will be about 1 and a half times longer than the past exams.
As before there will be definitions, True/False problems, some short
proofs and some computation problems.  There will be more True/False
problems but this time you do not have to give your reasoning. \\

\begin{problem}
  Definitions/terminology from recent material.  \medskip

  \begin{subproblem}
    If $\bold u,\bold v$ are vectors in $\R^n$, what is their
    \emph{inner product} or \emph{dot product}, $\bold v \cdot \bold
    u$?  How does one compute $\norm{\bold v}$? What is the distance
    between $\bold u$ and $\bold v$?
  \end{subproblem}
  \begin{subproblem}
    Be familiar with the ``algebraic'' properties of inner products
    (they are listed in your text; e.g. $\bold u \cdot (\bold v_1 +
    \bold v_2) = \bold u \cdot \bold v_1 + \bold u \cdot \bold v_2$.)
  \end{subproblem}
  \begin{subproblem}
    What is meant by an orthogonal set of vectors? an orthonormal set
    of vectors?  What does it mean to say that a vector $\bold v$ is
    orthogonal to the subspace $W$? What is meant by an orthogonal
    basis for a subspace $W$?
  \end{subproblem}
  \begin{subproblem}
    Define the orthogonal projection $\proj_W(\bold v) = \hat \bold v$
    of a vector $\bold v$ onto a subspace $W$. Be able to give a
    formula for this projection when an orthogonal basis $\bold
    u_1,\bold u_2,\cdots \bold u_m$ of $W$ is given.
  \end{subproblem}
  \begin{subproblem}
    Understand how to carry out the Gram-Schmidt process of
    constructing an orthogonal basis.
  \end{subproblem}
  \begin{subproblem}
    Understand the so-called $QR$ decomposition of a matrix $A$. If
    the columns of $A$ are independent, the Gram-Schmidt process
    yields an orthogonal (and even orthonormal) basis whose vectors
    form the columns of a matrix $Q$ with $Q^TQ = I_m$ (what is $m$?)
    Remember that $R = Q^TA$ is upper triangular (this is a good check
    that you have carried out Gram-Schmidt correctly).
  \end{subproblem}
  \begin{subproblem}
    If $U$ is an $m \times n$ matrix with orthonormal columns, review
    the properties of $U$: e.g. $U^TU = I_n$, $\norm{U\bold v} =
    \norm{\bold v}$ for all vectors $\bold v$ in $\R^n$, $U\bold v
    \cdot U \bold w = \bold v \cdot \bold w$.  $U$ is said to be an
    orthogonal matrix.
  \end{subproblem}
\end{problem} 

%\newpage

\begin{problem} True-False questions:
  \begin{subproblem}
    If $\{\bold v_1,\bold v_2,\bold v_3\}$ is an orthogonal set and if
    $c_1,c_2,c_3$ are scalars, then $\{c_1\bold v_1,c_2\bold
    v_2,c_3\bold v_3\}$ is an orthogonal set.
  \end{subproblem}
  \begin{subproblem}
    If $\norm{\bold u-\bold v}^2 =\norm{\bold u}^2+\norm{\bold v}^2$,
    then $\bold u$ and $\bold v$ are orthogonal.
  \end{subproblem}
  \begin{subproblem}
    Every orthogonal set in $\R^n$ is linearly independent.
  \end{subproblem}
  \begin{subproblem}
    For an $m\times n$ matrix $A$, vectors in the $\Nul A$ are
    orthogonal to vectors in $\col A$.
  \end{subproblem}
  \begin{subproblem}
    If the columns of an $m\times n$ matrix $A$ are orthonormal, then
    the linear mapping $\bold x\mapsto A\bold x$ preserves lengths.
  \end{subproblem}
  \begin{subproblem}
    Let $W=\Span\{\bold v_1,\cdots,\bold v_p\}$. Then $\bold x$ is in
    $W^\perp$ if and only if $\bold x$ is orthogonal to every $\bold
    v_i$, $1\leq i\leq p$.
  \end{subproblem}
  \begin{subproblem}
    If $W$ is a subspace of $\R^n$ then the intersection of $W$ and
    $W^\perp$ is empty.
  \end{subproblem}
  \begin{subproblem}
    If $\bold y=\bold z_1+\bold z_2$, where $\bold z_1$ is in a
    subspace $W$ and $\bold z_2$ is in $W^\perp$, then $\bold z_1$
    must be the orthogonal projection of $\bold y$ onto $W$.
  \end{subproblem}
  \begin{subproblem}
    If a square matrix has orthonormal columns, then it also has
    orthonormal rows.
  \end{subproblem}
  \begin{subproblem}
    If an $n\times n$ matrix $P$ has orthogonal columns, then
    $P^T=P^{-1}$.
  \end{subproblem}\newpage
  \begin{subproblem}
    If $U$ is $m\times n$ with orthogonal columns, then $UU^T\bold x$
    is the orthogonal projection of $\bold x$ onto $\col U$.
  \end{subproblem}
  \begin{subproblem}
    The orthogonal projection of $\bold y$ onto $\bold u$ is a scalar
    multiple of $\bold y$.
  \end{subproblem}
  \begin{subproblem}
    If the orthogonal projection of a vector $\bold y$ onto a subspace
    $W$ is zero, then $\bold y$ is in $W^\perp$.
  \end{subproblem}
\end{problem}


\begin{problem}
  Let $U$ be an $n\times n$ orthogonal matrix. Show that if $\{\bold
  v_1,\cdots,\bold v_n\}$ is an orthonormal basis for $\R^n$, then so
  is $\{U\bold v_1,\cdots, U\bold v_n\}$.
\end{problem}

\begin{problem}
  Show that if an $n\times n$ matrix $U$ satisfies $(U\bold
  x)\cdot(U\bold y)=\bold x\cdot\bold y$ for all $\bold x$ and $\bold
  y$ in $\R^n$, then $U$ is an orthogonal matrix.
\end{problem}

\begin{problem}
  Given a vector $\bold v$, show that the set $\{\bold x\in\R^n\mid
  \bold x\cdot\bold v=0\}$ form a subspace of $\R^n$.
\end{problem}

\begin{problem}
  Let $V$ be the subspace of $\R^3$ spanned by the vectors
  \begin{equation*}
    \bold v_1=
    \begin{bmatrix}
      1\\ 1\\ 1
    \end{bmatrix},
    \quad \bold v_2= 
    \begin{bmatrix}
      1\\ -2\\ 2
    \end{bmatrix},
    \quad\bold v_3=
      \begin{bmatrix}
        1\\ -5\\ 3
      \end{bmatrix}.
\end{equation*}
\begin{subproblem}
  Find the dimension of the subspace $V$ of $\R^3$ spanned by the
  vectors.
\end{subproblem}
\begin{subproblem}
  Find a basis for the orthogonal space $V^\perp$ of $V$.
\end{subproblem}
\begin{subproblem}
  For what values of $\bold c=
   \begin{bmatrix}
     c_1 \\ c_2 \\ c_3
   \end{bmatrix}$ does the following system of equations have a solution?
   \begin{equation*}
     x
     \begin{bmatrix}
       1 \\ 1 \\ 1\\
     \end{bmatrix}
     + y
     \begin{bmatrix}
       1 \\ -2 \\ 2
     \end{bmatrix}
     + z
     \begin{bmatrix}
       1 \\ -5 \\ 3
     \end{bmatrix}
     =
     \begin{bmatrix}
       c_1 \\ c_2 \\ c_3
     \end{bmatrix}
   \end{equation*}
   If the equation is consistent, how many solutions are there?
\end{subproblem}
\end{problem}
 

%\begin{problem}
%  Let $\bold u=
%  \begin{bmatrix}
%    3\\ -4\\ 5
%  \end{bmatrix}$ and 
%  $\bold v=
%  \begin{bmatrix}
%    -3\\ 14\\ -7
%  \end{bmatrix}$.
%  \begin{subproblem}
%    Find an orthonormal basis of the subspace $\Span(\bold u, \bold
%    v)$.
%  \end{subproblem}
%  \begin{subproblem}
%    Let $A=
%    \begin{bmatrix}
%      3&-3\\ -4&14\\ 5&-7
%    \end{bmatrix}$. Give a QR-factorization
%    $A=QR$, where $Q$ is a $3\times 2$ matrix with orthonormal
%    columns, and $R$ is an upper-triangular matrix with positive
%    diagonal entries.
%  \end{subproblem}
%\end{problem}

\begin{problem}
  Consider the vectors
  $\mathbf{x_1} = 
  \begin{bmatrix}
    1 \\ 2 \\ 1
  \end{bmatrix},
  \mathbf{x_2} = 
  \begin{bmatrix}
    1 \\ 1 \\ 0
  \end{bmatrix},
  $ and
  $\mathbf{x_3} = 
  \begin{bmatrix}
    0 \\ 2 \\ 2
  \end{bmatrix}$.
  \begin{subproblem}
    Let $W = \Span\{\mathbf{x_1}, \mathbf{x_2},\mathbf{x_3}\}$.
    Compute $\dim W$, and find a basis for $W$.
  \end{subproblem}
  \begin{subproblem}
    Use the Gram-Schmidt process to find an \emph{orthogonal} basis for the
    subspace $W$.
  \end{subproblem}
\end{problem}

\begin{problem}
  Let $\mathbf{v_1} =
  \begin{bmatrix}
    1 \\ 1 \\ 0 \\ 0
  \end{bmatrix}$,
  $\mathbf{v_2} = 
  \begin{bmatrix}
    1 \\ -1 \\ 1 \\ 1
  \end{bmatrix}$
  and $\mathbf{v_3} = 
  \begin{bmatrix}
    0 \\ 0 \\ 1 \\ -1
  \end{bmatrix}$.
  

  \begin{subproblem}
    Show that $\{\mathbf{v_1},\mathbf{v_2},\mathbf{v_3}\}$
    is an orthogonal set.
  \end{subproblem}
  

  \begin{subproblem}
    Let $W = \Span\{\mathbf{v_1},\mathbf{v_2},\mathbf{v_3}\}$.
    Compute $\dim W$.
  \end{subproblem}


  \begin{subproblem}
    Let $\mathbf{x} = 
    \begin{bmatrix}
      -1 \\ -1 \\ 2 \\ -2
    \end{bmatrix}.$
    Compute the orthogonal projection $\hat\mathbf{x} =
    \proj_W(\mathbf{x})$.
  \end{subproblem}
\end{problem}
\begin{problem}
  Let $V$ be the subspace of $\R^3$ spanned by
  the vectors
  \begin{equation*}
    \mathbf{v_1}= 
    \begin{bmatrix}
      1\\ 1\\ 1
    \end{bmatrix}
    ,\quad
    \mathbf{v_2}=
    \begin{bmatrix}
      1\\ 2\\ 2
    \end{bmatrix}
    ,\quad\mathbf{v_3}=
    \begin{bmatrix}
      1\\ 3\\
      3
    \end{bmatrix}. 
  \end{equation*}
  \begin{subproblem}
    Find a basis for the orthogonal space $V^\perp$ of $V$.
  \end{subproblem}

   \begin{subproblem}
    Consider the vector equation
    $
      x 
      \begin{bmatrix}
        1 \\ 1 \\ 1
      \end{bmatrix} +
      y
      \begin{bmatrix}
        1 \\ 2 \\ 2
      \end{bmatrix} 
        + z 
      \begin{bmatrix}
        1 \\ 3 \\ 3
      \end{bmatrix} = 
      \begin{bmatrix}
        c_1 \\ c_2 \\ c_3
      \end{bmatrix}.
      $
    For what values of $\mathbf{c}= \begin{bmatrix}
        c_1 \\ c_2 \\ c_3
      \end{bmatrix}$ does the system have a solution $\mathbf{x}
      = 
      \begin{bmatrix}
        x \\ y \\ z
      \end{bmatrix}$? 
  \end{subproblem}
  
   \begin{subproblem}
    If the above equation has at least one solution $\mathbf{x}$, how
    many solutions does it have?
  \end{subproblem}
\end{problem}

\begin{problem}
  The best quadratic function $f(x) = c+dx+ex^2$ to fit the points
  $(-1, 1), (0,1), (1,0)$ and $(2,2)$ is obtained using the formula
  $A^TA\hat{x}=A^T\vec{b}$.  Find the matrix $A$ and the vector
  $\vec{b}$. Solve for $\hat{x}$.
\end{problem}

\begin{problem}
  Find an orthonormal basis for $C(A)$ where $\begin{bmatrix}
    -1 & 6 & 6\\
    3 & -8 & 3\\
    1 & -2 & 6\\
    1 &  -4 & -3\
  \end{bmatrix}$.  Find the $QR$ decomposition of $A$.
\end{problem}    


\begin{problem}
  Find all the least square solutions where $A = 
  \begin{bmatrix}
    1 & 2 \\
    2 & 4 \\
    -1 & -2 \\
  \end{bmatrix}$ and $b = 
  \begin{bmatrix}
    3 \\ 2 \\ 1
  \end{bmatrix}$.
\end{problem}
\end{document}


%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
