\documentclass[t]{paulslides}
\usepackage{pgf,tikz}
\usepackage{enumerate}
\usetikzlibrary{arrows}
\usepackage{amsthm}

\definecolor{UniBlue}{RGB}{83,121,170}
\setbeamercolor{block title}{use=structure,fg=white,bg=blue!75!black}
\setbeamercolor{block body}{use=structure,fg=black,bg=blue!10!white}

\title{MA162: Finite mathematics}
\subtitle{Matrix Inverses}
\author{Paul Koester}
\institute{University of Kentucky}
\date{April 9, 2014}

\begin{document}

\maketitle

\begin{frame}[t]{Last Time}
\begin{itemize}
  \item  Last time we saw that matrices and vector possess an interesting algebraic structure, which allows us to add, subtract, 
             and multiply matrices (provided certain size conditions are satisfied)   
\end{itemize}
\end{frame}

\begin{frame}[t]{The Identity Matrix}
\begin{itemize}
  \item Given a positive integer \(n\), the \(n \times n\) identity matrix is the \(n \times n\)  matrix with ones along the main 
            diagonal and zeros everywhere else.
 \item The \(2 \times 2\) identity
  {\scriptsize 
    \[I_2 =  \left[\begin{array}{cc}
      1  &   0  \\
      0  &   1  \\
    \end{array}\right] \]
  }
  \item The \(4\times 4\) identity 
  {\scriptsize 
    \[I_4 =  \left[\begin{array}{cccc}
      1  &   0  &  0  &  0 \\
      0  &   1  &  0  &  0 \\
      0  &   0  &  1  &  0 \\
      0  &   0  &  0  &  1 \\
    \end{array}\right] \]
  }
 \item The \(n \times n\) identity is usually denoted by \(I_n\).  Sometimes, we write \(I\), when the size is clear from context.
\end{itemize}
\end{frame}

\begin{frame}[t]{Properties of the identity}
\begin{itemize}
  \item I is the matrix analogue of the number 1 in real number algebra
  \item If \(A\) is an \(n \times m\) matrix, then 
    \[  A I_m  = A\]
    and
    \[  I_n A  = A\]      
\end{itemize}
\end{frame}

\begin{frame}[t]{Matrix Inverses}
\begin{itemize}
  \item The multiplicative inverse of a real number \(a\) is the real number \(a^{-1}\) satisfying 
            \[  a a^{-1} = 1\] \vfill
  \item For real numbers, the multiplicative inverse is just the reciprocal.  For example, \(4^{-1} = \frac{1}{4}\) since \(4 \cdot \frac{1}{4} = 1\). \vfill
  \item The inverse of matrix \(A\) is the matrix \(A^{-1}\) with the property that 
    \[  AA^{-1} = I \] \vfill 
  \item There is no simple ``reciprocal operation'' for computing \(A^{-1}\)   \vfill
  \item Only square matrices can have inverses, and not all square matrices have inverses.
\end{itemize}
\end{frame}

\begin{frame}[t]{Computing Inverse of a Diagonal Matrix}
\begin{scriptsize}
\[
 \left[
 \begin{array}{ccc}
   5 & 0  & 0 \\ 
   0 & -4 & 0 \\
   0 & 0  & \frac{1}{3}  \\
 \end{array}
 \right]
\]
\end{scriptsize}

\end{frame}

\begin{frame}[t]{Computing Inverse of a Triangular Matrix}
\begin{scriptsize}
\[
 \left[
 \begin{array}{ccc}
   1 & 3  & 2 \\ 
   0 & 2 &  1 \\
   0 & 0  & -4\\  
 \end{array}
 \right]
\]
\end{scriptsize}
\end{frame}


\begin{frame}[t]{Matrix Inverses}
Find the inverse to \( \left[\begin{array}{cc} 1 & 1 \\ 1 & 2 \\ \end{array}\right].\)
We need to find a matrix so that 
\begin{scriptsize}
\[
 \left[
 \begin{array}{cc}
   1 & 1 \\ 
   1 & 2 \\ 
 \end{array}
 \right]
 \left[
 \begin{array}{cc}
   a & b \\ 
   c & d \\ 
 \end{array}
 \right]
=
 \left[
 \begin{array}{cc}
   1 & 0 \\ 
   0 & 1 \\ 
 \end{array}
 \right]
\]
\end{scriptsize}
Multiplying out, we get 
\begin{scriptsize}
\[
 \left[
 \begin{array}{cc}
   a + c & b + d \\ 
   a + 2c          &   b + 2d \\ 
 \end{array}
 \right]
=
 \left[
 \begin{array}{cc}
   1 & 0 \\ 
   0 & 1 \\ 
 \end{array}
 \right]
\]
\end{scriptsize}
From the first column we find \(a + c = 1\) and \(a + 2c = 0\).   Putting these in the top row,
Replacing the second with the second minus the first, we obtain \(c = -1\) and \(a = 2\).\\
From the second column we find \(b + d = 0\) and \(b + 2d  =1\).  
Replacing the second with the second minus the first, we obtain \(d = 1\) and \(b = -1\).

Therefore, the inverse matrix must be 
\[
 \left[
 \begin{array}{cc}
   2 & -1 \\ 
   -1 & 1 \\ 
 \end{array}
 \right]
\]
\end{frame}

\begin{frame}[t]{Matrix Inverses}
A different point of view:
\begin{scriptsize}
\[
 \left[
 \begin{array}{cc}
   1 & 1 \\ 
   1 & 2 \\ 
 \end{array}
 \right]
 \left[
 \begin{array}{cc}
   a & b \\ 
   c & d \\ 
 \end{array}
 \right]
=
 \left[
 \begin{array}{cc}
   1 & 0 \\ 
   0 & 1 \\ 
 \end{array}
 \right]
\]
\end{scriptsize}
can be viewed as 
\[
 \left[
 \begin{array}{cc}
   1 & 1 \\ 
   1 & 2 \\ 
 \end{array}
 \right]
 \left[
 \begin{array}{c}
   a\\ 
   c\\ 
 \end{array}
 \right]
=
 \left[
 \begin{array}{cc}
   1\\ 
   0\\ 
 \end{array}
 \right]
 \quad \mbox{ and } \quad
 \left[
 \begin{array}{cc}
   1 & 1 \\ 
   1 & 2 \\ 
 \end{array}
 \right]
 \left[
 \begin{array}{c}
   b\\ 
   d\\ 
 \end{array}
 \right]
=
 \left[
 \begin{array}{cc}
   0\\ 
   1\\ 
 \end{array}
 \right]
\]
which correspond to solving the two systems
\[
\left[
 \begin{array}{cc|c}
   1 & 1 &  1\\ 
   1 & 2 &  0\\ 
 \end{array}
 \right]
 \quad \mbox{ and } \quad
 \left[
 \begin{array}{cc|c}
   1 & 1 &  0\\ 
   1 & 2 &  1\\ 
 \end{array}
 \right]
\]
We could use Gauss-Jordan on both of these augmented matrices.  But since the have the same left hand sides, 
we can combine and do Gauss-Jordan a single time on this matrix
\[
 \left[
 \begin{array}{cc|cc}
   1 & 1 &  1 & 0\\ 
   1 & 2 &  0 & 1\\ 
 \end{array}
 \right]
\]
\end{frame}

\begin{frame}[t]{Using Gauss-Jordan to find inverse}
\begin{scriptsize}
\[
 \left[
 \begin{array}{cc|cc}
   1 & 1 &  1 & 0\\ 
   1 & 2 &  0 & 1\\ 
 \end{array}
 \right]
 \xrightarrow{R_2 \mapsto R_2 - R_1}
 \left[
 \begin{array}{cc|cc}
   1 & 1 &  1 & 0\\ 
   0 & 1 &  -1 & 1\\ 
 \end{array}
 \right]
 \xrightarrow{R_1 \mapsto R_1 - R_2}
 \left[
 \begin{array}{cc|cc}
   1 & 0 &  2 & -1\\ 
   0 & 1 &  -1 & 1\\ 
 \end{array}
 \right]
\]
\end{scriptsize}

\textbf{General Process:}  To find the matrix inverse of an \(n\times n\) matrix, form the augmented matrix
\[
  [A | I_n]
\]
Then apply the Gauss-Jordan process, attempting to get 
\[
  [I_n | B]
\]
If you can reduce the left side to the identity, then \(A\) has an inverse and the inverse is \(A^{-1} = B\).\\
If the left hand side cannot be reduced to the identity, then \(A\) does not have an inverse.

\end{frame}

\begin{frame}[t]{Solving systems of equations via inverses}
\[
 \begin{array}{ccccccc}
   x & + &  y & + &  z & = & 2  \\
   x & + & 2y & + & 3z & = & 4  \\
   x & + & 4y & + & 9z & = & 6  \\
 \end{array}
\]
can be expressed as \(AX = B\) and so we can solve for \(X\) by apply \(A^{-1}\) to each side:  \(X = A^{-1}B\).
Lets find the inverse:

\end{frame}


\begin{frame}[t]{Solving systems of equations via inverses}
\begin{scriptsize}
\[
A =  \left[
 \begin{array}{ccc}
   1 & 1 &  1 \\ 
   1 & 2 &  3 \\ 
   1 & 4 &  9 \\
 \end{array}
 \right]
 \Longrightarrow
A^{-1} = 
 \left[
 \begin{array}{ccc}
   3  & -5/2 &  1/2 \\ 
  -3 &    4    &   -1 \\ 
   1  &  -3/2 &  1/2 \\
 \end{array}
 \right]
\]
\end{scriptsize}
Therefore
\[ 
 \left[
 \begin{array}{c}
   x \\ 
   y \\ 
   z \\
 \end{array}
 \right]  
 = 
 \left[
 \begin{array}{ccc}
   3  & -5/2 &  1/2 \\ 
  -3 &    4    &   -1 \\ 
   1  &  -3/2 &  1/2 \\
 \end{array}
 \right]
 \left[
 \begin{array}{c}
   2 \\ 
   4 \\ 
   6 \\
 \end{array}
 \right]  
\]
So x, y, and z can be found by finishing the above matrix multiplication.

\end{frame}




\end{document}
