\documentclass[30pt,landscape]{foils}

\usepackage{amsmath}

\usepackage{pause}               \usepackage{background}
\usepackage{graphicx}           \usepackage{geometry}
\usepackage{hyperref}

\usepackage{pp4slide}
\geometry{headsep=3ex,hscale=0.9}

\newtheorem{example}{Example} 
\newtheorem{question}[example]{Question}
\newtheorem{definition}[example]{Definition}
\newtheorem{theorem}[example]{Theorem}
\newtheorem{notation}[example]{Notation}

\newcommand{\pz}{\pause}
\newcommand{\pb}{\pagebreak}

\definecolor{bgblue}{rgb}{0.03,0.39,0.23}
\vpagecolor{bgblue}

\hypersetup{pdftitle={lecture},
  pdfsubject={A mathematics lecture},
  pdfauthor={Dev Sinha, University of Oregon},
  pdfkeywords={pdftex, acrobat},
  pdfpagemode={FullScreen},
  linkcolor={red}
}

\begin{document}

{\Large Solving systems of equations using inverses of matrices} \pz

Matrices are collections of numbers which behave in some
ways just like numbers themselves. \pz We can add, subtract and
multiply them, and there is a zero matrix.  \pz  The similarities only
go so far, though - only square matrices can both be 
added and multiplied, the multiplication is complicated and it depends
on the order in which the matrices appear! \pb

Our next step will be to learn how to ``divide'' matrices,  \pz  which will be
essential in solving matrix equations. \pz  Remember that for numbers
to solve the equation $3x + 2 = 8$ we first need to subtract to get
$3x = 6$ and then we divide both sides by $3$ \pz - the key step! - \pz to 
get $x = 2$. \pb

{\large Identity matrices} \pz

Division by $x$ is just multiplication by $\frac{1}{x}$, so first we must
understand what ``1'' is for matrices.  \pz  Your first guess might
be the matrix $\begin{bmatrix}  1 & 1 \\ 1 & 1 \end{bmatrix}$. \pz
But how would we know this is right? \pz  The key fact about $1$
is that $1 \cdot y = y$ for any $y$.  \pz  We can check
whether $\begin{bmatrix}  1 & 1 \\ 1 & 1 \end{bmatrix}$ satisfies
this key fact: \pz $\begin{bmatrix}  1 & 1 \\ 1 & 1 \end{bmatrix}
\begin{bmatrix}  1 & 2\\  3&  4\end{bmatrix} = 
\begin{bmatrix}  4 & 6\\ 4 & 6 \end{bmatrix}$.  \pz  So it doesn't! \pz
Fortunately, there is a matrix which satisfies this key property. \pz

\begin{definition}
The $n$ by $n$ identity matrix is the square matrix with $1$'s for the $1,1$,
$2,2, \ldots, n,n$ entries, and $0$'s everywhere else.  \pz For example,
the $3$ by $3$ identity matrix is 
$\begin{bmatrix}  1 & 0 & 0 \\  0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$. \pz
Identity matrices are often denoted by the letter $I$ (which then does
not specify the size of the matrix). \pz
\end{definition}

\begin{theorem}
For any identity matrix $I$ and square matrix $M$ of the same size,
$I M = M I = M$. \pz
\end{theorem}

\begin{example}
We verify this theorem for the $2 \times 2$ identity matrix. \pz
\end{example}

We have already seen the identity matrix when we first looked at solving
systems of equations using matrix notation. \pz  In fact, linear equations
expressed in terms of the identity matrix couldn't be any easier! \pz

\begin{example}
Translate the matrix equation $\begin{bmatrix}  1 &  0 \\ 0  &1  \end{bmatrix}
\begin{bmatrix}  x \\ y  \end{bmatrix} = \begin{bmatrix}  3 \\ 5  \end{bmatrix}$. \pz
\end{example} 

{\large Inverses of matrices} \pz

\begin{definition}
The inverse of a square matrix $M$ is one which we call $M^{-1}$ \pz (as opposed to
$\frac{1}{M}$) \pz where $M M^{-1} = I = M^{-1} M$. \pz
\end{definition}

\begin{theorem}
The inverse of the $2 \times 2$ matrix $\begin{bmatrix}  a & b \\ c & d \end{bmatrix}$ is
$\begin{bmatrix}  \frac{d}{ad-bc} & \frac{-b}{ad-bc}\\  \frac{-c}{ad - bc} & \frac{a}{ad-bc} \end{bmatrix}$. \pz
\end{theorem}

Note that the number $ad - bc$ which appears everywhere in this formula has its own
special name; it is the {\em determinant} of the matrix. \pz  If it is zero, then an inverse
does not exist. \pz 

\begin{example}
Verify this theorem for the matrices $\begin{bmatrix}  1 & 2 \\ 3 &  4\end{bmatrix}$ \pz
and $\begin{bmatrix}  5 &7 \\  2& 3 \end{bmatrix}$. \pz
\end{example}

There are formulae for inverting larger matrices, but they are complicated! \pz
Fortunately, we do not have to invert matrices by hand.  \pz  Many graphing calculators,
including the TI-83, have a function to invert a matrix.  See the manual, linked
to from the class page, to learn how. \pz  

{\large Using inverses to solve linear systems} \pz

Let $M$ be a square matrix, $X$ be a column vector of variables and $C$ be a column
vector of constants (of compatible sizes). \pz  To solve the equation
$MX = C$ we first find $M^{-1}$ (if it exists) and then multiplying both sides
by $M^{-1}$ we get $M^{-1} M X = M^{-1} C$\pz , or $I X = M^{-1} C$ \pz
or $X = M^{-1} C$. \pb

So the steps to solve $MX = C$ are:
\begin{enumerate}
\item Find $M^{-1}$. \pz
\item Compute the product $M^{-1} C$. \pz
\item (For thoroughness) check that your answer works. \pz
\end{enumerate}

\begin{example}
Use matrix algebra to solve the system of equations $5x + 7y = 3$, $2x + 3y = -1$. \pz
\end{example}

One great advantage to matrix methods is in solving related systems. \pz

\begin{example}
Solve the matrix equation $\begin{bmatrix}  3 & 2\\  \frac{1}{2} & \frac{1}{2} \end{bmatrix}
\begin{bmatrix}  x \\ y  \end{bmatrix} = \begin{bmatrix}  5 \\  6  \end{bmatrix}$. \pz
What if we replace $\begin{bmatrix}  5 \\  6  \end{bmatrix}$ by 
$\begin{bmatrix}  1 \\  2 \end{bmatrix}$? \pz  By $\begin{bmatrix}  -1  \\  \pi  \end{bmatrix}$? \pz
\end{example}

With these techniques (and calculators in hand) we can move on to swiftly solving
problems with more variables.  \pb

\begin{example}
The average yield on A-bonds is 6\%, on B-bonds is 7\% and on C-bonds is 10\%.
Because of a hedging scheme,  you must invest twice as much money in $A$ bonds
as $C$ bonds.  Find the amounts to invest for the following desired outcomes: \pz
\begin{itemize}
\item \$25K invested with an annual return of \$1.8K. \pz
\item \$30K invested with an annual return of \$2.2K. \pz
\item \$40K invested with an annual return of \$2.9 K. \pz
\end{itemize}
\end{example}

\end{document}
 