\documentclass{amsart}[11pt]
\usepackage{graphicx}

\addtolength{\textwidth}{1.4in}                          
\oddsidemargin=0in                          
\evensidemargin=0in       

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

\begin{document}

\title{Math 242, Lecture 15}
\maketitle

\subsection{ Inverses of matrices}  

\begin{definition}
The inverse of a square matrix $M$ is one which we call $M^{-1}$   (as opposed to
$\frac{1}{M}$)   where $M M^{-1} = I = M^{-1} M$.  
\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}$.  
\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.    If it is zero, then an inverse
does not exist.   

\begin{example}
Verify this theorem for the matrix $\begin{bmatrix}  5 &7 \\  2& 3 \end{bmatrix}$.  
\end{example}

There are formulae for inverting larger matrices, but they are complicated!  
Fortunately, we do not have to invert matrices by hand.     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.  

\subsection{ Using inverses to solve linear systems}  

Let $M$ be a square matrix, $X$ be a column vector of variables and $C$ be a column
vector of constants (of compatible sizes).    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$  , or $I X = M^{-1} C$  
or $X = M^{-1} C$.  

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

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

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

\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}$.  
What if we replace $\begin{bmatrix}  5 \\  6  \end{bmatrix}$ by 
$\begin{bmatrix}  1 \\  2 \end{bmatrix}$?    By $\begin{bmatrix}  -1  \\  \pi  \end{bmatrix}$?  
\end{example}

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

\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:  
\begin{itemize}
\item \$25K invested with an annual return of \$1.8K.  
\item \$30K invested with an annual return of \$2.2K.  
\item \$40K invested with an annual return of \$2.9 K.  
\end{itemize}
\end{example}

\section{ Linear inequalities}  

Having seen how matrices allow us to solve systems of linear
equalities, we now move to {\em linear inequalities}.  

\begin{definition}
A linear inequality in two variables is an equation of the form
$a x + b y \geq c$ (or $\leq c$ instead of $\geq c$),
 where $a, b, c$ are numbers and $x$ and $y$
are variables   or in many variables is one of the form
$\begin{bmatrix}   a & b & c & \cdots \end{bmatrix} \begin{bmatrix}  x \\  y \\ z \\ \ldots \end{bmatrix}
\geq  p$ (or $\leq p$ instead of $\geq p$)   
where $\begin{bmatrix}   a & b & c & \cdots \end{bmatrix} $ is
a row vector of numbers, $ \begin{bmatrix}  x \\  y \\ z \\ \ldots \end{bmatrix}$ is a
column vector of variables, and $p$ is some number.  
\end{definition}

Linear inequalities arise natually as {\em constraints}.    For example, 
$x \geq 0$ is a linear inequality which means that we only want to 
consider positive or zero values of $x$,   a constraint we have seen
for example when solving for lengths of objects (like fencing) or amount
of some good to produce.  

Because they are easier to visualize, we will focus on linear inequalities
in two variables.     The set of points which satisfies a linear
inequality in two variables forms a {\em half-space}.     We check
this in examples before talking about the general case. Note that we will
be using the funny convention (which will make sense later) of shading in
the points which do {\em not} satisfy the inequality.  

\begin{example}
Plot all points which (do not) satisfy $x \geq 0$;     $y \leq 0$;  
$x - y  <  0$;    $x + y \geq 1$.  
\end{example}

In general, the procedure to graph a the region satisfying a linear
inequality is as follows:  
\begin{itemize}
\item Graph the line defined by changing the inequality to an equality.   
\item Pick one point not on the line and test whether it satisfies the inequality.  
\item If the test point does satisfy the inequality, all of the other points on the same side 
of the line do, so shade all points on the other side of the line from the test point.  
\item If the test point does not satisfy the inequality, all other points on the same
side of the line do not as well, so shade all points on the same side of the line as the test
point.   
\end{itemize}

This procedure works because, as we willl see when we develop derivatives
of functions of many variables,  linear functions in any number of variables
have constant derivatives,   so once a linear function is greater than or
less than a given value, it must continue to be so indefinitely.  
It is also helpful to think of the single variable case,   and to 
look at the graph in the multi-variable case.  

\begin{example}
Plot all points which satisfy $2x - 3y \leq 5$.  
\end{example}

 

\subsection{ Multiple linear inequalities}  

Many familiar shapes can be described algebraically using
multiple linear inequalities.  

\begin{example}
The inequalities $x \geq 0$, $x \leq 5$, $y \geq -1$, $y \leq 3$ define a 
rectangle.  
\end{example}

We formalize this as follows.  

\begin{definition}
The solution set of a system of linear inequalities is the set of all
points which satisfy all of the inequalities.  
\end{definition}

\begin{example}
Graph the solution set for the system of inequalities:
$$
\begin{cases}
x + y \geq 1\\
x + y \leq 3 \\
2x - y < 2   
\end{cases}
$$
\end{example}

Some basic terminology:

\begin{definition}
The {\em boundary lines} for a system of inequalities
are the lines defining by replacing  inequalities by equalities.  
The {\em boundary points} are points on the boundary lines
which lie next to the solution set.  
The {\em corner points} of a system are those boundary points
which lie on more than one of the boundary lines.  
\end{definition}


\begin{example}
Graph the solution set, and identify the corner points for the systems: 
$$
A: \begin{cases}
x - y \geq -1\\
x + y \leq 2 \\
y \geq -1  
\end{cases}
B:
\begin{cases}
x - y \geq 2\\
x + y \geq 5 \\
x, y \geq 0  
\end{cases}
$$
\end{example}

 

One last piece of terminology: 
\begin{definition}
A solution set is bounded if it is contained in some
(larger) rectangle.     If there is no such rectangle, 
then it is unbounded.  
\end{definition}

Informally, an unbounded region has points which 
go to infinity in some direction.  We finish by checking which 
regions we have seen are bounded and unbounded.  




\end{document}
 