Linear Programming Solving Systems of Equations with 3 Variables Inverses & Determinants of Matrices...
Transcript of Linear Programming Solving Systems of Equations with 3 Variables Inverses & Determinants of Matrices...
Turn in your interims
Unit 3Linear Programming
Solving Systems of Equations with 3 VariablesInverses & Determinants of Matrices
Cramer’s Rule
Linear ProgrammingWhat is it?
Technique that identifies the minimum or maximum value of a quantity
Objective functionLike the “parent function”
Constrains (restrictions)Limits on the variablesWritten 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 ProgrammingIf 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 VerticesFind the values of x and y that maximize and
minimize P?
What is the value of P at each vertex?
yxP 23
0,0
7
32
3
yx
xy
xy
1. Graph the constraints
2. Find coordinates of each vertex3. Evaluate P at each vertex
when x=4 and y=3 P has a max value of 18
0,0
7
32
3
yx
xy
xy
0,0 0,2
7,0
3,4
yxP 23 0)0(2)0(3 P6)0(2)2(3 P14)7(2)0(3 P18)3(2)4(3 P
Furniture ManufacturingA 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
10040
6030
120
y
x
yx
40,30 40,60
60,60
90,30
yxP 65150
7100406530150 P
10350906530150 P
12900606560150 P
11600406560150 P
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. 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?
3. Find a solution that uses all the trainees. How many trees will be planted in this case?
Experienced Teams
Training
TeamsTotal
# of Teams x y x+y
# of Ranger
s2x y 30
# of Trainee
s0 2y 16
# of trees
planted500x 200y 500x+20
0y
Ranger Problem1. Write an objective function and constraints for a linear
program that models the problem.
2. 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?
3. Find a solution that uses all the trainees. How many trees will be planted in this case?
0
0
162
302
y
x
y
yx
yxP 200500
15 experienced teams, 0 training teams
none 7500 trees
11 experienced teams, 8 training teams
7100 trees
AnnouncementsHomework due Wednesday
Unit 3 Test on Tuesday 10/8
Solving Systems of Equations with 3 VariablesWe are going to focus on solving in two ways
Solving by EliminationSolving by Substitution
EliminationEnsure all variables in all equations are
written in the same orderSteps: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 yAlways write solutions as: (x,y,z)
Example
1934
1532
433
zyx
zyx
zyx
1532
433
zyx
zyx
1532
1934
zyx
zyx
2,1,5
Practice
102
732
32
zyx
zyx
zyx
3,4,1
Substitution1. Choose one equation and solve for the
variable2. Substitute the expression for x into each of
the other two equations3. Write the two new equations as a system.
Solve for y and x4. Substitute the values for y and z into one of
the original equations. Solve for x
Example
1022
124
42
zyx
zyx
zyx 4,1,2
Practice
12
752
64
zyx
zyx
zyx
6,1,4
Unit 4Working with Matrices
Inverses and Determinates (2x2)Square matrix
Same number of rows and columnsIdentity Matrix (I)
Square matrix with 1’s along the main diagonal and 0’s everywhere else
Inverse MatrixAA-1=I
If B is the multiplicative inverse of A then A is the inverse of B
To show they are inverses AB=I
100
010
001
Verifying Inverses for 2x2A= B=
AB= =
21
32
21
32
21
32
21
32
10
01
4322
6634
Determinates for 2x2Determinate of a 2x2 matrix is ad-bc
Symbols: detA
Ex: Find the determinate of = -3*-5-(4*2) =15-8 =7
dc
ba
dc
ba
52
43
Inverse of a 2x2 Matrix
Let If det A≠0, then A has an inverse.
A-1=
dc
baA
ac
bd
bcadac
bd
A
1
det
1
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.
45
22M
21085242det bcadM
Since det M does not equal 0 an inverse exists!
25
24
det
1
45
22
1
1
1
MM
M
152
12
25
24
2
11M
Systems with MatricesSystem of Equations Matrix equation
1453
52
yx
yx
14
5
53
21
y
x
Coefficient matrix A
Variable matrix X
Constant matrix B
Solving a System of Equations with Matrices1. Write the system as a matrix equation
2. Find A-1
3. Solve for the variable matrix
14
5
53
21
y
x
13
25
13
251
13
25
65
1
BAy
x 1
14
5
13
25
y
x
1
3
y
x
Practice ProblemsP. 48 # 1, 4, 7, 11, 14, 17
p. 48 Check your answers!!
12/1
11#1
21
31#4
8/18/1
6/16/1#7
#11 det=0 so no unique
solution#14 det=-1
#17 det=-29
Determinates for 3x3Determinate of a 3x3
On the calculatorEnter the matrix2nd => Matrix => MATH => det( => Matrix
=> Choose the matrix
)()( 123312231213132321
333
222
111
cbacbacbacbacbacba
cba
cba
cba
Verifying InversesMultiply the matrices to ensure result is I
If not then the two matrices are not inverses
A= B=
AB= =
351
202
143
010
101
010
351
202
143
010
101
010
050301050
000202000
040103040
545
000
444
AB=
Solving a System of Equations with Matrices
59
825
132
zyx
zyx
zyx
(4, -10, 1)
Practice Problems1.
2
053
yx
yx 2.
zyx
zy
zx
6
12
4 3.
93
454
4
zy
yx
zyx
(5,-3)(5,0,1) (1,0,3)
Practice Solving Systems with MatricesSuppose 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 almondsLet y represent peanutsLet z represent raisins
zyx
zyx
zyx
2
158.85.145.2
9
Calculator How To!!To input a matrix:
2nd, Matrix, EditBe sure to define the size of your matrix!!
To find the inverse of a matrix2nd, Matrix, 1, x-1, enter
HomeworkP. 50 # 1, 2, 6, 9, 10, 11, 13, 14