\documentclass[11pt]{article}

\newcommand{\docdate}{September 10, 2001}
\newcommand{\docid}{1}
\newcommand{\doctype}{Quiz}
\newcommand{\professor}{Professors Cholak and Polini}
\newcommand{\coursenum}{Math 221}
\newcommand{\courseblurb}{Linear Algebra}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath,amssymb,latexsym}
%\usepackage[mtbold,mtpluscal]{mathtime}
%%%%%%%%%%%% headers
\usepackage{fancyheadings}
\setlength{\footrulewidth}{0.4pt}
\usepackage{vmargin}
\setpapersize{USletter}
\setmarginsrb{1in}{.8in}{1in}{1in}%
           {10pt}{5mm}{0pt}{0mm}
\newcommand{\doc}{\doctype \ \docid}
\pagestyle{fancy}
\lhead{\coursenum}
\rfoot{\professor}
\rhead{\docdate}
\lfoot{\doc}
\newcommand{\doctitle}{\smallskip \begin{center}{\Large \coursenum ~
      -- \courseblurb \\ \doc}
\end{center} \bigskip }

%%%%%%%%% problem counters

\newcounter{prob}
\newcounter{subprob}
\renewcommand{\theprob}{\textbf{\arabic{prob}}.~}
\renewcommand{\thesubprob}{\textbf{\arabic{prob}.\arabic{subprob}.~}}

\newenvironment{problem} {
  \noindent
  \refstepcounter{prob} \theprob \setcounter{subprob}{0} }{ \bigskip
  \bigskip} 

\newenvironment{subproblem} { %\noindent
  \refstepcounter{subprob} \thesubprob  }{ \\ }


%%%%%%%%%%%%%%%%%
\begin{document}

\doctitle

\begin{problem} (10 points)
  Consider the following system of linear equations:
\begin{center}
  $\begin{matrix}
    2x_1 & + & 4x_2 & + & 6x_3 & = & 6 \\
    x_1 & + & 3x_2 & + & 4x_3 & = & 4 \\
    &     & x_2 & + & ax_3 & = & 1 \\
\end{matrix}$
\end{center}

\begin{subproblem} (1 point)
  Find $A$ and $\vec{b}$ such that the above system is in the form $A
  \vec{x} = \vec{b}$ (i.e.\ an matrix equation).
\end{subproblem}

$A = \begin{bmatrix}
  2 &  4 &  6  \\
  1 &  3 &  4  \\
  0 &  1 &  a  \\
\end{bmatrix}$ and 
$\vec{b} = \begin{bmatrix}
  6 \\
  4 \\
  1 \\
\end{bmatrix}$. \bigskip

\begin{subproblem} (5 points)
  Explicitly showing \emph{all} the steps reduce the \emph{augmented
    matrix} into reduce echelon form.  (Hint: there are 2 cases for
  the rest of the problem.)
\end{subproblem}

The augmented matrix is $M = \begin{bmatrix}
  2 &  4 &  6 &  6 \\
  1 &  3 &  4 & 4 \\
  0 &  1 &  a & 1 \\
\end{bmatrix}$.  
First lets divide the top row by $2$ to get: $\begin{bmatrix}
  1 &  2 &  3 &  3 \\
  1 &  3 &  4 & 4 \\
  0 &  1 &  a & 1 \\
\end{bmatrix}$.  
Now multiple the top row by $-1$ and add to the second row to get
$\begin{bmatrix}
  1 &  2 &  3 &  3 \\
  0 &  1 &  1 & 1 \\
  0 &  1 &  a & 1 \\
\end{bmatrix}$.  Subtract the second row from the third row to get 
$\begin{bmatrix}
  1 &  2 &  3 &  3 \\
  0 &  1 &  1 & 1 \\
  0 &  0 &  a-1  & 0 \\
\end{bmatrix}$.   

Now there are two cases; if $a \neq 1$ or $ a = 1$.

First lets assume $a \neq 1$.  Then we can divide the last row by $a-1
\neq 0$ to get:
$\begin{bmatrix}
  1 &  2 &  3 &  3 \\
  0 &  1 &  1 & 1 \\
  0 &  0 &  1  & 0 \\
\end{bmatrix}$.  
Then subtract 3 times the last row from the first row and the last row
from the second row to get:  
$\begin{bmatrix}
  1 &  2 &  0 &  3 \\
  0 &  1 &  0 & 1 \\
  0 &  0 &  1  & 0 \\
\end{bmatrix}$.  
Now subtract 2 times the second from the first row to get:
$\begin{bmatrix}
  1 &  0 &  0 &  1\\
  0 &  1 &  0 & 1 \\
  0 &  0 &  1  & 0 \\
\end{bmatrix}$ 
which is in reduce echelon form.

Now assume $a = 1$. Hence 
$N = \begin{bmatrix}
  1 &  2 &  3 &  3 \\
  0 &  1 &  1 & 1 \\
  0 &  0 &  0  & 0 \\
\end{bmatrix}$.  
Subtract two times the second from the first row to get
$\begin{bmatrix}
  1 &  0 &  1 &  1 \\
  0 &  1 &  1 & 1 \\
  0 &  0 &  0  & 0 \\
\end{bmatrix}$ 
which is in reduce echelon form.  \bigskip

\begin{subproblem} (1 point)
  What is the rank of $A$? 
\end{subproblem}

If $a = 1$ then the rank of $A$ is 2; otherwise $A$ rank is 3. \bigskip

\begin{subproblem} (1 point)
  Is there an $a$ such that the system does not have a solution?  Why
  or why not?
\end{subproblem}         

\newpage No!  It is never the case that the last column contains a
leading 1 and hence it is always consistent.  \bigskip

\begin{subproblem} (2 points)
  Find the general solution (in vector form) for the above system.
\end{subproblem}

There are two cases: either the reduce echelon from is
$\begin{bmatrix}
  1 &  0 &  0 &  1\\
  0 &  1 &  0 & 1 \\
  0 &  0 &  1  & 0 \\
\end{bmatrix}$ 
or
$\begin{bmatrix}
  1 &  0 &  1 &  1 \\
  0 &  1 &  1 & 1 \\
  0 &  0 &  0  & 0 \\
\end{bmatrix}$.  
In the first case, the general solution is $x_1 = 0, x_2 = 1$ and $x_2
= 1$ or $\vec{x} =\begin{bmatrix}
  1 \\
  1 \\
  0 \\
\end{bmatrix}$.  In the second case, the general solution is $x_1 = 1
- x_3, x_2 = 1 - x_3$ and $x_3$ is free.  Another way to write this is:
$\vec{x} =\begin{bmatrix}
  1 - x_3 \\
  1 - x_3\\
  x_3 \\
\end{bmatrix} = \begin{bmatrix}
  1  \\
  1 \\
  0  \\
\end{bmatrix} + \begin{bmatrix}
  - x_3 \\
  - x_3\\
  x_3 \\
\end{bmatrix} = \begin{bmatrix}
  1  \\
  1 \\
  0  \\
\end{bmatrix} + x_3\begin{bmatrix}
  - 1 \\
  - 1\\
  1 \\
\end{bmatrix} = \begin{bmatrix}
  1  \\
  1 \\
  0  \\
\end{bmatrix} + t\begin{bmatrix}
  - 1 \\
  - 1\\
  1 \\
\end{bmatrix}$.  

%\begin{subproblem}(4 points)
%  Find a value for $a$ and a vector $\vec{c}$ such that $A\vec{x} =
%  \vec{c}$ is inconsistent.  
%\end{subproblem}

%If the rank of $A$ is 3 then for all $\vec{c}$, $A \vec{x} = \vec{c}$
%is consistent.  But if rank of $A$ is 2 then for some $\vec{c}$, $A
%\vec{x} = \vec{c}$ is inconsistent.  So $a = 1$ and now the issue is
%to find a $\vec{c}$.  We want to find a $\vec{c}$ such that, for
%example, $\text{rref}([A | \vec{c}]) = \begin{bmatrix}
%  1 &  0 &  1 &  0 \\
%  0 &  1 &  1 & 0 \\
%  0 &  0 &  0  & 1 \\
%\end{bmatrix}$. Must finish later.

\end{problem}

\begin{problem} (6 points)
  Let $\vec{x}_1 = \begin{bmatrix} 1 \\ -2 \\ 4 \end{bmatrix}$,
  $\vec{x}_2 = \begin{bmatrix} 3 \\ 2 \\ 1 \end{bmatrix}$ and $
  \vec{y} = \begin{bmatrix} 4 \\0 \\ b \end{bmatrix}$.

  \begin{subproblem} 
    Find a value of $b$ such that $\vec{y}$ \emph{is} a linear
    combination of $\vec{x}_1$ and $\vec{x_2}$.
  \end{subproblem}
  
  $\vec{y}$ is a linear combination of $\vec{x}_1$ and $\vec{x_2}$ if
  and only if the linear system associated to the augmented matrix
  $\begin{bmatrix}
    1 &  3&  4 \\
    -2  &  2& 0\\
    4&  1&  b\\
  \end{bmatrix}$ 
  is consistent.
  
  Let us row reduce the matrix, to find a b for which the linear
  system is consistent.  Multiply by $2$ the first row and add it to
  the second to get: $\begin{bmatrix}
    1 &  3 & 4\\
    0&  8&  8\\
    4&  1 &  b\\
   \end{bmatrix}$.
   Now multiple the top row by $-4$ and add it to the third to get
   $\begin{bmatrix}
     1 &  3 & 4\\
     0&  8&  8\\
     0& -11& -16+b \\
   \end{bmatrix}$. 
   Divide by $8$ the second row to get $\begin{bmatrix}
     1 &  3 & 4\\
     0&  1 &   1 \\
     0& -11& -16+b \\
   \end{bmatrix}$. 
   Multiply the second row by $-3$ and add it to the first row to get
   $\begin{bmatrix}
     1 &  0& 1\\
     0&  1 &   1 \\
     0& -11& -16+b \\
   \end{bmatrix}$.   
   Multiply the second row by $11$ and add it to the third row to get
   $\begin{bmatrix}
     1 &  0& 4\\
     0&  1 &   1 \\
     0& 0 & -5+b \\
  \end{bmatrix}$.
  Now, the system is consistent if and only if $-5+b=0$. Hence if
  $b=5$. \bigskip


\begin{subproblem} 
  Find a value of $b$ such that $\vec{y}$ \emph{is not} a linear
  combination of $\vec{x}_1$ and $\vec{x_2}$.
  \end{subproblem}
  
  Take any $b\neq 5$.

\end{problem}


\begin{problem} ( 4 points)
  Both of the following statements are false.  Provide an example.

  \begin{subproblem} (2 point)
    If $A$ is a $5 \times 4$ matrix and has rank $4$ then for all
    $\vec{b} \in \mathbb{R}^4$, $A\vec{x} = \vec{b}$ is consistent.
  \end{subproblem}
 
Take 
$A = \begin{bmatrix}
  1&  0&  0 & 0 \\
  0 & 1 & 0 & 0 \\
  0 & 0 & 1 & 0 \\
  0 & 0& 0 & 1  \\
  0 & 0 & 0 & 0 \\
\end{bmatrix}$ and 
$\vec{b} = \begin{bmatrix}
  0\\
  0\\
  0\\
  0\\
  1\\
\end{bmatrix}$. \bigskip


 \begin{subproblem} (2 points)
    If $A$ is an upper triangular matrix then the rank of $A$ is the
    number of non-zero entries on $A$'s diagonal.  
  \end{subproblem}

$A = \begin{bmatrix}
  1&  1&  -1\\
  0&  0&  1 \\
  0 &  0&  0 \\
\end{bmatrix}$ 


\end{problem}



\end{document}

