Transcript File

Linear Programming
Solving Systems of Equations with 3 Variables
Inverses & Determinants of Matrices
Cramer’s Rule
Linear Programming
 What is it?
 Technique that identifies the minimum or maximum value of
a quantity
 Objective function
 Like the “parent function”
 Constrains (restrictions)
 Limits on the variables
 Written as inequalities
 What is the name of the region where our possible
solutions lie?
 Feasible region
 Contains all of the points which satisfy the constraints
Vertex Principle of Linear
Programming
 If there is a max or a min value of the linear objective
function, it occurs at one or more vertices of the
feasible region
Testing Vertices
 Find the values of x and y that maximize and minimize
P  3x  2 y
P?
3

y

x3

2

 y  x  7
 x  0, y  0


 What is the value
of P at each vertex?
1. Graph the constraints
3

 y  2 x3

 y  x  7
 x  0, y  0


0,7
4,3
2. Find coordinates of
each vertex
3. Evaluate P at each vertex P  3x  2 y
P  3(0)  2(0)  0
P  3(2)  2(0)  6
0,0
2,0
P  3(0)  2(7)  14
P  3(4)  2(3)  18 when x=4 and y=3 P has a max value of 18
Furniture Manufacturing
 A furniture manufacturer can make from 30 to 60
tables a day and from 40 to 100 chairs a day. It can
make at most 120 units in one day. The profit on a table
is $150, and the profit on a chair is $65. How many
tables and chairs should they make per day to
maximize profit? How much is the maximum profit?
 Define our variables:
 X: number of tables
 Y: number of chairs
x  y  120
30  x  60
30,90
40  y  100
60,60
P  150x  65y
P  15030  6540  7100
P  15030  6590  10350
P  15060  6560  12900
P  15060  6540  11600
30,40
60,40
Practice Problem
 Teams chosen from 30 forest rangers
and 16 trainees are planting trees. An
experienced team consisting of two
rangers can plant 500 trees per week.
A training team consisting of one
ranger and two trainees can plant 200
trees per week.
1.
Write an objective function and
constraints for a linear program that
models the problem.
2.
3.
How many of each type of team
should be formed to maximize the
number of trees planted? How
many trainees are used in this
solution? How many trees are
planted?
Find a solution that uses all the
trainees. How many trees will be
planted in this case?
Experie
nced
Teams
Training
Teams
Total
# of
Teams
x
y
x+y
# of
Rangers
2x
y
30
# of
Trainees
0
2y
16
# of trees
planted
500x
200y
500x+200y
Ranger Problem
1.
2.
Write an objective function and constraints for a linear
program that models the problem.
2 x  y  30
 2 y  16


 x0
 y  0
P  500x  200y
How many of each type of team should be formed to maximize
the number of trees planted? How many trainees are used in
this solution? How many trees are planted?
15 experienced teams,
0 training teams
3.
none
7500 trees
Find a solution that uses all the trainees. How many trees will
be planted in this case?
11 experienced teams, 8 training teams
7100 trees
Homework due Wednesday
Unit 3 Test on Tuesday 10/8
Solving Systems of Equations with
3 Variables
 We are going to focus on solving in two ways
 Solving by Elimination
 Solving by Substitution
Elimination
 Ensure all variables in all equations are written in the
same order
 Steps:
1. Pair the equations to eliminate a variable (ex: y)
2. Write the two new equations as a system and solve
for final two variables (ex: x and z)
3. Substitute values for x and z into an original equation
and solve for y
 Always write solutions as: (x,y,z)
Example
 x  3 y  3 z  4

 2 x  3 y  z  15
 4 x  3 y  z  19

5,1,2
 x  3 y  3z  4

 2 x  3 y  z  15
4 x  3 y  z  19

2 x  3 y  z  15
Practice
 x  y  2z  3

 2 x  y  3z  7
 x  2 y  z  10

1,4,3
Substitution
Choose one equation and solve for the variable
2. Substitute the expression for x into each of the other
two equations
3. Write the two new equations as a system. Solve for y
and x
4. Substitute the values for y and z into one of the
original equations. Solve for x
1.
Example
 x  2 y  z  4

 4 x  y  2 z  1
 2 x  2 y  z  10

2,1,4
Practice
 x  4y  z  6

2 x  5 y  z  7
 2x  y  z  1

4,1,6
Working with Matrices
Inverses and Determinates (2x2)
 Square matrix
 Same number of rows and columns
 Identity Matrix (I)
 Square matrix with 1’s along the main diagonal and 0’s
everywhere else
1 0 0 
0 1 0 
 Inverse Matrix


0 0 1 
 AA-1=I


If B is the multiplicative inverse of A then A is the inverse of B
To show they are inverses AB=I
Verifying Inverses for 2x2
 A= 2 3
1 2 


 3
 1 2 


B=  2
2 3  2  3
4  3  6  6 1 0
AB= 
= 






1
2

1
2
2


2

3

4
0
1




 

Determinates for 2x2
a b 
 Determinate of a 2x2 matrix
c d  is ad-bc


 Symbols:
detA
a b
c d
 Ex: Find the determinate of
 3 4 
 2  5


= -3*-5-(4*2)
=15-8 =7
Inverse of a 2x2 Matrix
a b 
 Let A  

c
d



A-1=
If det A≠0, then A has an inverse.
1  d  b
1  d  b



det A  c a  ad  bc  c a 
If det A=0 then there is NOT a unique solution
Ex: Determine if the matrix has an
inverse. Find the inverse if it exists.
 2 2 
M 

5

4


det M  ad  bc   2  4  2  5  8 10  2
Since det M does not equal 0 an inverse exists!
1
 2 2 
M 

5

4


1   4  2
1
M 
det M   5  2
1
M
1
1  4  2  2 1

 2



1
 2   5  2  5 
Systems with Matrices
 System of Equations
 x  2y  5

3x  5 y  14
Matrix equation
1 2  x   5 
3 5  y   14

   
Coefficient
matrix A
Variable
matrix X
Constant
matrix B
Solving a System of Equations with
Matrices
Write the system as a matrix equation
1 2  x   5 
3 5  y   14

   
2. Find A-1
1.
 5  2  5 2 
1  5  2
 1






3
1

3
1
3

1
56 


 

3. Solve for the variable matrix
 x
1

A
B
 y
 
 x   5 2   5 
 y    3  1 14
  
 
 x  3
 y   1
   
Practice Problems
 P. 48 # 1, 4, 7, 11, 14, 17
p. 48
Check your answers!!
 1 1
#1 

1
/
2
1


#11
det=0 so no
unique solution
 1 3 
#4 

1

2


#14
det=-1
#17
det=-29
1 / 6  1 / 6
#7 

1
/
8
1
/
8


Determinates for 3x3
 Determinate of a 3x3
a1
b1
c1
a2
a3
b2
b3
c2  (a1b2 c3  a2b3c1  a3b1c2 )  (a1b3c2  a2b1c3  a3b2 c1 )
c3
 On the calculator
 Enter the matrix
 2nd => Matrix => MATH => det( => Matrix => Choose
the matrix
Verifying Inverses
 Multiply the matrices to ensure result is I
 If not then the two matrices are not inverses
 3 4 1
 A=   2 0 2
 1 5 3
0 1 0 
B= 1 0 1 
0 1 0 
 3 4 1  0 1 0 
AB=  2 0 2 1 0 1  =


 
 1 5 3 0 1 0 
4 4 4
AB= 0 0 0
5 4 5 
0  4  0 3  0  1 0  4  0 
0  0  0  2  0  2 0  0  0 


 0  5  0 1  0  3 0  5  0 
Solving a System of Equations with
Matrices
 2 x  y  3z  1

5 x  y  2 z  8
 x  y  9z  5

(4, -10, 1)
Practice Problems
1. 3x  5 y  0

 x y 2
(5,-3)
2.   x  4  z

 2 y  z 1
x  6  y  z

(5,0,1)
3.  x  y  z  4

 4x  5 y  4
 y  3 z  9

(1,0,3)
Practice Solving Systems with
Matrices
 Suppose you want to fill nine 1-lb tins with a snack
mix. You plan to buy almonds for $2.45/lb, peanuts for
$1.85/lb, and raisins for $.80/lb. You have $15 and want
the mix to contain twice as much of the nuts as of the
raisins by weight. How much of each ingredient
should you buy?
 Let x represent almonds
 Let y represent peanuts
 Let z represent raisins
x yz 9


2.45x  1.85 y  .8 z  15

x  y  2z

Calculator How To!!
 To input a matrix:
 2nd, Matrix, Edit
 Be sure to define the size of your matrix!!
 To find the inverse of a matrix
 2nd, Matrix, 1, x-1, enter
Homework
 P. 50 # 1, 2, 6, 9, 10, 11, 13, 14