Math 132 Notes
Math 132 Notes
Math 132 Notes
_
a
11
x
1
+ a
12
x
2
+ + a
1n
x
n
= b
1
a
21
x
1
+ a
22
x
2
+ + a
2n
x
n
= b
2
a
31
x
1
+ a
32
x
2
+ + a
3n
x
n
= b
3
.
.
.
.
.
.
.
.
.
.
.
.
a
i1
x
1
+ a
i2
x
2
+ + a
in
x
n
= b
i
.
.
.
.
.
.
.
.
.
.
.
.
a
m1
x
1
+ a
m2
x
2
+ + a
mn
x
n
= b
m
where a
ij
and b
i
are real numbers, i = 1, 2, . . . , m, j = 1, 2, . . . , n.
A solution of a system of m linear equations containing n variables x
1
, x
2
, . . . , x
n
is any ordered set
(x
1
, x
2
, . . . , x
n
) of real numbers for which each of the m linear equations of the system is satised.
B. Solving a System of m Equations Containing n variables
1. Conditions for the Reduced Row Echelon Form of a Matrix:
(a) The rst nonzero entry in each row is a 1 and it has 0s above and below it
(b) The leftmost 1 in any row is to the right of the leftmost 1 in the row above.
(c) Any rows that contain all 0s to the left of the vertical bar appear at the bottom.
2. Steps for Solving Systems of m Equations Containing n variables.
Step 1: Write the augmented matrix.
Step 2: Find the reduced row echelon form of the augmented matrix.
Step 3: Analyze this matrix to determine if the system has no solution, one solution, or innitely
many solutions.
C. Applications
1. Example: In a chemistry laboratory one solution contains 10% hydrochloric acid (HCl), a second
solutions contains 20% HCl, and a third contains 40% HCl. How many liters of each should be mixed
to obtain 100 liters of 25% HCl? Soln:
Let x = number of liters of the 10% soluition of HCl
Let y = number of liters of the 20% soluition of HCl
Let z = number of liters of the 40% soluition of HCl
Since we want 100 liters in all and the amount of HCl obtained from each solution must sum to
25% of 100, or 25 liters, we must have
_
x +y +z = 100
0.1x + 0.2y + 0.4z = 0.25(100)
Thus, our problem
version 1.06 Page 31 of ??
3 3
is to solve a system of two equations containing three variables. By matrix techniques we ob-
tain the solution
_
x = 2z 50
y = 3z + 150
where z is the parameter. Now, the practical considera-
tions of this problem lead us to the conditions that x 0, y 0, z 0. From above, we see
that we must have z 25 and z 50, since otherwise x < 0 or y < 0. Some possible solu-
tions are listed in the following table. The nal determination by the chemistry laboratory will
more than likely be based on the amount and availability of one acid solution versus the others.
No. of liters
10% solution 0 10 12 16 20 25 26 30 36 38 46 50
No. of liters
20% solution 75 60 57 51 45 37.5 36 30 21 18 6 0
No. of liters
30% solution 25 30 31 33 35 37.5 38 40 43 44 48 50
version 1.06 Page 32 of ??
3 3
UNLV
Department of Mathematical Sciences
2.4: Matrix Algebra
A. Defns:
1. A matrix is dened as a rectangular array of the form
_
_
a
11
a
12
a
1j
a
1n
a
21
a
22
a
2j
a
2n
.
.
.
.
.
.
.
.
.
.
.
.
a
i1
a
i2
a
ij
a
in
.
.
.
.
.
.
.
.
.
.
.
.
a
m1
a
m2
a
mj
a
mn
_
_
The symbols a
11
, a
12
, of a matrix are referred to as the entries (or elements) of the matrix. Each
entry a
ij
of the matrix has two indices: the row index, i, and the column index, j. The symbols
a
i1
, a
i2
, , a
in
represent the entries in the ith row, and the symbols a
1j
, a
2j
, , a
mj
represent the
entries in the jth column.
2. The dimension of a matrix A is determined by the number of rows and the number of columns in
the matrix. If a matrix has m rows and n columns, we denote the dimension of A by m n, read
m by n
3. If a matrix A has the same number of rows as it has columns, it is called a square matrix.
4. Equality of Matrices: Two matrices A and B are equal if they are of the same dimension and if
corresponding entries are equal. In this case we write A = B, read as matrix A is equal to matrix
B.
5. Addition of Matrices: We dene the sum A +B of two matrices A and B with the same dimension
as the matrix consisting of the sum of corresponding entries from A and B. That is, if A = [a
ij
] and
B = [b
ij
] are two mn matrices, the sum A +B is the mn matrix [a
ij
+b
ij
].
6. Subtraction of Matrices: We dene the dierence A B of two matrices A and B with the same
dimension as the matrix consisting of the dierence of corresponding entries from A and B. That is,
if A = [a
ij
] and B = [b
ij
] are two mn matrices, the dierence AB is the mn matrix [a
ij
b
ij
].
B. Properties of Matrix Algebra
1. Commutative Property of Addition: If A and B are two matrices of the same dimension, then
A +B = B +A
2. Associative Property of Addition: If A, B and C are three matrices of the same dimension, then
A + (B +C) = (A +B) +C
3. Additive Inverse Property: For any matrix A, we have the property that
A + (A) = 0
version 1.06 Page 33 of ??
3 3
C. Scalar Multiplication
1. Scalar Multiplication: Let A be an m n matrix and let c be a real number, called a scalar. The
product of the matrix A by the scalar c, called scalar multiplication, is the mn matrix cA, whose
entries are the product of c and the corresponding entries of A. That is, if A = [a
ij
], then cA = [ca
ij
].
2. Properties of Scalar Multiplication: let k and h be two real numbers and let A and B be two matrices
of dimension mn. Then
k(hA) = (kh)A
(k +h)A = kA +hA
k(A +B) = kA +kB
version 1.06 Page 34 of ??
3 3
UNLV
Department of Mathematical Sciences
2.5: Multiplication of Matrices
A. Defns:
1. If R = [r
1
r
2
r
n
] is a row matrix of dimension 1 n and C =
_
_
c
1
c
2
.
.
.
c
n
_
_
is a column matrix of
dimension n 1, then by the product of R and C we mean the number
RC = r
1
c
1
+r
2
c
2
+ +r
n
c
n
2. Multiplication of Matrices: Let A denote an m r matrix, and let B denote an r n matrix. The
product AB is dened as the mn matrix whose entry in row i, column j is the product of the ith
row of A and the jth column of B
Note: Multiplication of matrices is possible only if the number of columns of the matrix on the left
equals the number of rows of the matrix on the right. If A is of dimension mr and B is of dimension
r n, then the product AB is of dimension mn.
B. Theorems and Properties
1. Theorem: Matrix multiplication is not commutative. That is, in general
AB is not equal to BA
2. Associative Property of Matrix Multiplication: Let A be a matrix of dimension m r, let B be a
matrix of dimension r p and let C be a matrix of dimension p n. Then matrix multiplication is
associative. That is,
A(BC) = (AB)C
The resulting matrix ABC is of dimension mn.
3. Distributive Property: Let A be a matrix of dimension mr. Let B and C be a matrices of dimension
r n. Then the distributive property states that
A(B +C) = AB +AC
The resulting matrix AB +AC is of dimension mn.
4. The Identity Matrix: For an n n matrix, the entries located in row i, column i, 1 i n, are
called the diagonal entries. An nn matrix whose diagonal entries are 1s, while all the other entries
are 0s, is called the identity matrix I
n
. For example:
I
2
=
_
1 0
0 1
_
, I
3
=
_
_
1 0 0
0 1 0
0 0 1
_
_
, I
4
=
_
_
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
_
_
version 1.06 Page 35 of ??
3 3
5. Theorem: If A is a square matrix of dimension n n, then
AI
n
= I
n
A = A
6. Identity Property: If A is a matrix of dimension m n and if I
n
denotes the identity matrix of
dimension n n, and I
m
denotes the identity matrix of dimension mm, then
I
m
A = A AI
n
= A
version 1.06 Page 36 of ??
3 3
UNLV
Department of Mathematical Sciences
2.6: The Inverse of a Matrix
A. Inverse of a Matrix
1. Inverse of a Matrix: Let A be a matrix of dimension n n. A matrix B of dimension n n is called
the inverse of A if AB = BA = I
n
. We denote the inverse of a matrix A, if it exists, by A
1
.
NOTE: A nonsquare matrix has no inverse.
2. Steps for Finding the inverse of a Matrix of Dimension n n
Step 1: Form the matrix [A|I
n
].
Step 2: Using row operations, write [A|I
n
] in reduced row echelon form.
Step 3: If the resulting matrix is of the form [I
n
|B], that is, if the identity matrix appears on the left
side of the bar, then B is the inverse of A. Otherwise, A has no inverse.
B. Matrix Equation
1. Given a system of n linear equations containing n variables of the form
_
_
a
11
x
1
+ a
12
x
2
+ + a
1j
x
j
+ a
1n
x
n
= b
1
a
21
x
1
+ a
22
x
2
+ + a
2j
x
j
+ a
2n
x
n
= b
2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
a
i1
x
1
+ a
i2
x
2
+ + a
ij
x
j
+ a
in
x
n
= b
i
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
a
n1
x
1
+ a
n2
x
2
+ + a
nj
x
j
+ a
nn
x
n
= b
n
where a
ij
and b
i
are real numbers, i = 1, 2, . . . , n, j = 1, 2, . . . , n.
Then I can express this system as the following matrix equation
_
_
a
11
a
12
a
1j
a
1n
a
21
a
22
a
2j
a
2n
.
.
.
.
.
.
.
.
.
.
.
.
a
i1
a
i2
a
ij
a
in
.
.
.
.
.
.
.
.
.
.
.
.
a
n1
a
n2
a
nj
a
nn
_
_
. .
A
_
_
x
1
x
2
.
.
.
x
i
.
.
.
x
n
_
_
. .
X
=
_
_
b
1
b
2
.
.
.
b
i
.
.
.
b
n
_
_
. .
B
2. Theorem: A system of n linear equations containing n variables
AX = B
for which A is a square matrix and A
1
exists, always has a unique solution that is given by
X = A
1
B
version 1.06 Page 37 of ??
3 3
UNLV
Department of Mathematical Sciences
4.1: The Simplex Method: Standard Form, Initial Tableau and Pivoting
We now know how to work linear programming problems graphically with two variables. Unfortunately
most LPP problems have many more variables, so we need a less restrictive algebraic method. This method
is called the simplex method. The rst type we will examine will be the standard maximum-type
problems.
A. Standard Form
1. The following conditions must be met to be a standard maximum-type problem:
(a) The objective function is linear and is to be maximized
(b) The variables are all nonnegative
(c) The constraints are all of the form ax
1
+bx
2
+cx
3
+ m, where m 0.
2. Examples:
(a) Maximize P = 3x
1
+ 4x
2
subject to the constraints:
_
_
_
5x
1
+ 2x
2
145
2x
1
+ 3x
2
222
x
1
0 x
2
0
is in standard form
(b) Maximize P = 3x
1
+ 4x
2
subject to the constraints:
_
_
_
5x
1
+ 2x
2
125
2x
1
+ 3x
2
222
x
1
0 x
2
0
is NOT in standard form
(c) NOTE: 2x
1
+ 3x
2
125 can be put in correct form by multiplying by (-1) and getting
2x
1
3x
2
125
B. The initial tableau
1. In order to apply the simplex method to a maximum problem required the conversion to equations
by using slack variables.
(a) Convert the inequalities to equations by adding a slack variable to the left side which gives slack
equations:
_
5x
1
+ 2x
2
145
2x
1
+ 3x
2
222
The slack equations are:
5x
1
+ 2x
2
+s
1
= 145
2x
1
+ 3x
2
+s
2
= 222
where s
1
and s
2
are the slack variables and are nonnegative.
(b) We are now ready to set up the matrix which represents the initial simplex tableau.
i. The objective row is always the bottom row
ii. The slack equations form all the other rows
version 1.06 Page 38 of ??
3 3
iii. The symbol for each variable appears above the column where its coecients appear.
iv. The notation BV stands for basic variables. These are the variables that have only 0s and
1s in the column. The others are called non-basic variables.
v. The notation RHS stands for the right-hand side of the equal sign in the slack equations.
vi. The initial simplex tableau for the above problem is:
BV P x
1
x
2
s
1
s
2
RHS
s
1
0 5 2 1 0 145
s
2
0 2 3 0 1 222
P 1 -3 -4 0 0 0
C. Pivoting
1. We need to discuss the method of pivoting:
(a) Denition: To pivot a matrix about a given element(the pivot element) is to apply row operations
so the pivot element is replaced by 1 and all the other elements in the same column (the pivot
column) are 0.
(b) Method:
i. Divide each element in the pivot row by the pivot element which causes the pivot element
to become 1.
ii. Obtain 0s in the remainder of the pivot column by performing row operations.
(c) Analyzing the tableau:
i. From the tableau, write the equation corresponding to each row.
ii. Solve the bottom equation for P and the remaining equations for the basic variables
iii. Set each non-basic variable equal to 0 to obtain the current values for P and the basic
variables
(d) Example: In the tableau given below, the pivot element is boxed.
BV P x
1
x
2
s
1
s
2
RHS
s
1
0 1 2 1 0 300
s
2
0 3 2 0 1 480
P 1 -1 -2 0 0 0
R
1
=
1
2
r
1
BV P x
1
x
2
s
1
s
2
RHS
s
1
0
1
2
1
1
2
0 150
s
2
0 3 2 0 1 480
P 1 -1 -2 0 0 0
R
2
=2r
1
+r
2
R
3
=2r
1
+r
3
BV P x
1
x
2
s
1
s
2
RHS
x
2
0
1
2
1
1
2
0 150
s
2
0 2 0 -1 1 180
P 1 0 0 1 0 300
Now, are basic variables are x
2
, s
2
and P, so the new equations will be:
x
2
=
1
2
x
1
1
2
s
1
+ 150
s
2
= 2x
1
+s
1
+ 180
P = s
1
+ 300
Thus, setting the non-basic variables equal to 0. We get x
1
= 0, x
2
= 150 and P = 300
version 1.06 Page 39 of ??
3 3
UNLV
Department of Mathematical Sciences
4.2: The Simplex Method: Solving Maximum Problems in standard form by the simplex
method
A. Simplex algorithm
Once we have the problem in standard form(see 4.1) we are ready to perform the simplex operation
according to the following algorithm:
1. Insert a slack variable into each of the constraints.
2. Rewrite the objective function to match the format of the slack equations and adjoin(place) the
objective function at the bottom of the system.
3. Write the augmented matrix for this new system of equations
4. Find the most negative(smallest value) indicator in the bottom row(the objective function) of the
tableau. This element will determine the pivot column. NOTE: This is dierent than the textbook,
in the text they choose the rst negative value in the bottom row.
5. Divide each positive element above the element found(do not negative elements or zero) into the
corresponding value of the RHS. This determines the quotient.
6. The smallest quotient found determines the pivot row.
7. Where the pivot row intersects the pivot column determines the pivot element.
8. Perform the pivot operations on that element.
(a) Divide each element in the pivot row by the pivot element
(b) Obtain zeros elsewhere in the pivot column by performing row operations on the other entries.
9. Find the basic variables
10. When completed, examine the new bottom row. If a negative element is still present in that row,
repeat steps 4-8 until no negative elements appear there.
11. At that point you are nished and can nd values of the basic variables.
(a) Write equations corresponding to each row.
(b) Solve the bottom equation for P and the remaining equations for the basic variables.
(c) Set each non-basic variable equal to 0 in order to solve.
B. Example:(pg 255,#13)
Maximize P = 3x
1
+x
2
subject to the constraints:
_
_
x
1
+x
2
2
2x
1
+ 3x
2
12
3x
1
+x
2
12
x
1
0 x
2
0
version 1.06 Page 40 of ??
3 3
So, our slack equations are:
_
_
P 3x
1
x
2
= 0
x
1
+x
2
+s
1
= 2
2x
1
+ 3x
2
+s
2
= 12
3x
1
+x
2
+s
3
= 12
1. The initial tableau is:
BV P x
1
x
2
s
1
s
2
s
3
RHS
s
1
0 1 1 1 0 0 2
s
2
0 2 3 0 1 0 12
s
3
0 3 1 0 0 1 12
P 1 -3 -1 0 0 0 0
2. Find the most negative value in the bottom row which is -3
3. Hence the column headed by x
1
is the pivot column.
4. Apply the smallest quotient rule
2
1
= 2,
12
2
= 6 and
12
3
= 4.
5. Hence row 1 is the pivot row and the element s
1
, x
1
, 1 is the pivot element.
6. After the pivot operation is performed, the new tableau is:
BV P x
1
x
2
s
1
s
2
s
3
RHS
x
1
0 1 1 1 0 0 2
s
2
0 0 1 -2 1 0 8
s
3
0 0 -2 -2 0 1 6
P 1 0 2 3 0 0 6
7. Since there are no negative values in the bottom row, we are nished. Notice that x
1
has become a
basic variable replacing s
1
.
8. Solving for the variables we get x
1
= 2, x
2
= 0, and P = 6.
version 1.06 Page 41 of ??
3 3
UNLV
Department of Mathematical Sciences
4.3: The Simplex Method: Solving Minimum problems in standard form by the duality
principle
There is a lot of similarity in solving a minimum problem as solving a maximum, once we get set up. A.
Standard Form
1. First we must make certain the problem is in standard form:
(a) The following conditions must be met to be a standard minimum-type problem.
i. The objective function is linear and has nonnegative coecients.
ii. The variables are all nonnegative
iii. The constraints are all of the form ax
1
+bx
2
+cx
3
+ m where m is a constant.
(b) We will solve using the duality principle
i. Suppose a linear programming problem in standard form has a solution. The minimum value
of the objective function of the minimum problem in standard form equals the maximum
value of the objective function of the dual problem which is a maximum problem in standard
from.
ii. Write the minimum problem in standard form.
iii. Construct a matrix that represents the constraints and the objective function.
iv. Interchange the rows and columns to form the matrix of the dual problem. (Transpose)
v. Translate the matrix into a maximum problem in standard form.
vi. Solve the maximum problem by the simplex method.
vii. The minimum value of the objective function (C) will appear in the lower right-hand corner
of the nal tableau and is equal to the maximum value of the dual objective function (P).
viii. The values of the variables that give rise to the minimum value are located in the objective
row in the slack variable columns.
B. Example(4.3 #15) Minimize C = 6x
1
+ 3x
2
subject to the constraints:
_
_
_
x
1
+x
2
4
3x
1
+ 4x
2
12
x
1
0 x
2
0
Thus, our matrix is:
_
_
1 1 4
3 4 12
6 3 0
_
_
Transpose
_
_
1 3 6
1 4 3
4 12 0
_
_
Which gives the following dual maximum problem:
Maximize P = 4y
1
+ 12y
2
subject to the constraints:
_
_
_
y
1
+ 4y
2
6
y
1
+ 4y
2
3
x
1
0 x
2
0
So, our slack equations are:
_
_
_
P 4y
1
12y
2
= 0
y
1
+ 4y
2
+s
1
= 6
y
1
+ 4y
2
+s
2
= 3
version 1.06 Page 42 of ??
3 3
Hence, our initial tableau is:
BV P y
1
y
2
s
1
s
2
RHS
s
1
0 1 3 1 0 6
s
2
0 1 4 0 1 3
P 1 -4 -12 0 0 0
Once the pivot operations are completed you should have a tableau the resembles the following:
BV P y
1
y
2
s
1
s
2
RHS
s
1
0 0 -1 1 -1 3
y
1
0 1 4 0 1 3
P 1 0 4 0 4 12
which give P = 12, y
1
= 3, y
2
= 0 as the maximum solutions, so C = 12, x
1
= 0, x
2
= 4 is the nal solution
for the minimum problem.
version 1.06 Page 43 of ??