0% found this document useful (0 votes)
32 views

Linear Mathematical Models UG 5th Sem Open Course

Uploaded by

Jesna Saleem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Linear Mathematical Models UG 5th Sem Open Course

Uploaded by

Jesna Saleem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 117

LINEAR MATHEMATICAL

MODELS
(Open Course)
(other than B Sc students)

Fifth semester
School of Distance Education
Calicut University
UNIVERSITY OF CALICUT

SCHOOL OF DISTANCE EDUCATION

V SEMESTER

OPEN COURSE

LINEAR MATHEMATICAL MODELS

Prepared by : Sreehari T
Asst professor in mathematics
SDE, Calicut university

Scrutinized by: Dr. Bijumon. R,


Associate Professor & Head,
Dept. of Mathematics,
Mahathma Gandhi College, Irittiy

DISCLAIMER
“The author(s) shall be solely responsible for
DISCLAIMER
the content and views expressed in this book”
"The author(s) shall be solely responsible
Contents

1 Linear Functions 1

1.1 Slopes and Equation of Lines . . . . . . . . . . . . 1

1.1.1 Slope of line . . . . . . . . . . . . . . . . 3

1.1.2 Equation of Line . . . . . . . . . . . . . . 5

1.1.3 Graph of a Line . . . . . . . . . . . . . . . 9

1.2 Linear Functions and Applications . . . . . . . . . 12

1.2.1 Linear function . . . . . . . . . . . . . . . 12

1.2.2 The Least Square Line . . . . . . . . . . . 17

1.2.3 Solutions of Linear Systems by the Eche-


lon Method . . . . . . . . . . . . . . . . . 24

1.2.4 Solution of Linear Systems by the


Gauss-Jordan Method . . . . . . . . . . . 29

1.2.5 Addition and Subtraction of Matrices . . . 35

1.2.6 Multiplication of Matrices . . . . . . . . . 38


1.2.7 Matrix Inverses . . . . . . . . . . . . . . . 40
1.2.8 Input-Output Models . . . . . . . . . . . . 47

2 Linear Programming: The Graphical Method 50


2.1 Graphing Linear Inequalities . . . . . . . . . . . . 50
2.1.1 Linear Inequality . . . . . . . . . . . . . . 50
2.1.2 Systems of Inequalities . . . . . . . . . . . 54
2.2 Solving Linear Programming Problems Graphically 58
2.3 Applications of Linear Programming . . . . . . . . 64

3 Linear Programming: The Simplex Method 71


3.1 Slack Variables and the Pivot . . . . . . . . . . . . 71
3.2 Maximization Problems . . . . . . . . . . . . . . . 78
3.3 Minimization problems; Duality . . . . . . . . . . 90
3.4 Nonstandard Problems . . . . . . . . . . . . . . . 102
Module 1

Linear Functions

(Reference text: ‘Finite Mathematics and Calculus with


Applications (9/e)’ by Margaret L.Lial, Raymond N. Greenwell
and Nathan P. Ritchey)

1.1 Slopes and Equation of Lines

Ordered pairs are graphed with the perpendicular number lines of a


Cartesian coordinate system, shown in Figure 1.1 The
horizontal number line, or x-axis, represents the first components
of the ordered pairs, while the vertical or y-axis represents the
second components. The point where the number lines cross is
the zero point on both lines; this point is called the origin.

1
Figure 1.1: xy- plane

The x-axis and y-axis divide the plane into four parts, or
quadrants. For example, quadrant I includes all those points whose
x - and y-coordinates are both positive. The quadrants are
numbered as shown in Figure 1.1 . The points on the axes
themselves belong to no quadrant. The set of points
corresponding to the ordered pairs of an equation is the graph of the
equation. The x - and y-values of the points where the graph of an
equation crosses the axes are called the x-intercept and y-intercept,
respectively. See Figure 1.2

2
Figure 1.2: x-intercepts and y-intercepts

1.1.1 Slope of line

An important characteristics of a straight line is its slope, a number


that represents the ”steepness” of the line.

Definition 1.1.1. (Slope of a Line) The slope of a line is defined as


the vertical change (the“rise”) over the horizontal change (the“run”)
as one travels along the line. In symbols, taking two different points
(x1 , y1 ) and (x2 , y2 ) on the line, the slope is

Change in y ∆y y2 − y1
m= = =
Change in x ∆x x2 − x1

where x1 ̸= x2 .

Example 1.1.1. Find the slope of the line passing through the points
(x1 , y1 ) = (−3, 5) and (x2 , y2 ) = (2, −4). Given in Figure 1.2.

3
Figure 1.3: A line passing through (−3, 5) and (2, −4)

The difference in the two x-values,

x2 − x1 = 2 − (−3) = 5

in this example, is called the change in x. The symbol ∆x (read“delta


x ”) is used to represent the change in x. In the same way, ∆y rep-
resents the change in y. In our example,

∆y = y2 − y1
= −4 − 5
= −9

∆y −9
Hence m = ∆x
= 5
.

Example 1.1.2. Find the slope of the line through each pair of

4
points.

1. (7, 6) and (−4, 5)


Let (x1 , y1 ) = (7, 6) and (x2 , y2 ) = (−4, 5). Use the
definition of slope.

∆y 5−6 −1 1
m= = = =
∆x −4 − 7 −11 11

2. (5, −3) and (−2, −3)


Let (x1 , y1 ) = (5, −3) and (x2 , y2 ) = (−2, −3). Then

−3 − (−3) 0
m= = =0
−2 − 5 −7

Lines with zero slope are horizontal (parallel to the x-axis).

3. (2, −4) and (2, 3)


Let (x1 , y1 ) = (2, −4) and (x2 , y2 ) = (2, 3). Then

3 − (−4) 7
m= =
2−2 0

which is undefined. This happens when the line is vertical


(parallel to the y-axis).

1.1.2 Equation of Line

An equation in two first-degree variables, such as 2x + y = 10, has


a line as its graph, so it is called a linear equation. In the rest of
this section, we consider various forms of the equation of a line.

5
Definition 1.1.2. (Slope-Intercept Form) If a line has slope m and
y-intercept b, then the equation of the line in slope-intercept form
is
y=mx+b.

Example 1.1.3. Find an equation in slope-intercept form for each


line.

1. Through (0, −3) with slope 3/4


We recognize (0, −3) as the y-intercept because it’s the point
with 0 as its x-coordinate, so b = −3. The slope is 3/4, so
m = 3/4. Substituting these values into y = mx + b gives

3
y = x−3
4

2. With x-intercept 7 and y-intercept 2


Notice that b = 2. To find m, use the definition of slope after
writing the x-intercept as (7, 0) (because the y-coordinate is
0 where the line crosses the x-axis) and the y-intercept as
(0, 2).
0−2 2
m= =−
7−0 7
Substituting these values into y = mx + b, we have

2
y =− x+2
7

Definition 1.1.3. (Point-Slope Form) If a line has slope m and


passes through the point (x1 , y1 ), then an equation of the line is

6
given by
y − y1 = m (x − x1 )

the point-slope form of the equation of a line.

Example 1.1.4. Find an equation of the line that passes through


the point (3, −7) and has slope m = 5/4
Use the point-slope form.

y − y1 = m (x − x1 )
5 5
y − (−7) = (x − 3) (y1 = −7, m = , x1 = 3)
4 4
5
y + 7 = (x − 3)
4
4y + 28 = 5(x − 3) ( Multiply both sides by 4)
4y + 28 = 5x − 15 ( Distribute. )
4y = 5x − 43 ( Combine constants. )
5 43
y = x− ( Divide both sides by 4.)
4 4

Remark:

1. The slope of horizontal line is 0.

2. The slope of vertical line is undefined.

Definition 1.1.4. (Parallel Lines) Two lines are parallel if and only
if they have the same slope, or if they are both vertical.

Example 1.1.5. Find the equation of the line that passes through
the point (3, 5) and is parallel to the line 2x + 5y = 4

7
The slope of 2x + 5y = 4 can be found by writing the equation in
slope-intercept form.

2x + 5y = 4
2 4
y =− x+
5 5

This result shows that the slope is −2/5. Since the lines are par-
allel, −2/5 is also the slope of the line whose equation we want.
This line passes through (3, 5). Substituting m = −2/5, x1 = 3,
and y1 = 5 into the point-slope form gives

y − y1 = m (x − x1 )
2 2 6
y − 5 = − (x − 3) = − x +
5 5 5
2 6
y =− x+ +5
5 5
2 31
y =− x+ .
5 5

Definition 1.1.5. (Perpendicular Lines) Two lines are perpendic-


ular if and only if the product of their slopes is −1, or if one is
vertical and the other horizontal.

Example 1.1.6. Find the equation of the line L passing through


the point (3, 7) and perpendicular to the line having the equation
5x − y = 4.
Solution To find the slope, write 5x−y = 4 in slope-intercept form:

y = 5x − 4

The slope is 5. Since the lines are perpendicular, if line L has slope

8
m, then
5m = −1
1
m=−
5
Now substitute m = −1/5, x1 = 3, and y1 = 7 into the point-slope
form.
1
y − 7 = − (x − 3)
5
1 3
y−7=− x+
5 5
1 3 5
y =− x+ +7·
5 5 5
1 38
y =− x+
5 5

1.1.3 Graph of a Line

Graph of a Line We can graph the linear equation defined by y =


x + 1 by finding several ordered pairs that satisfy the equation. For
example, if x = 2, then y = 2 + 1 = 3, giving the ordered pair
(2, 3). Also, (0, 1), (4, 5), (−2, −1), (−5, −4), (−3, −2), among
many others, satisfy the equation.
To graph y = x + 1, we begin by locating the ordered pairs
obtained above, as shown in Figure 1.4. All the points of this graph
appear to lie on a straight line, as in Figure 1.5. This straight line is
the graph of y = x + 1.

9
Figure 1.4: Points of graph y = x + 1

Figure 1.5: Graph of line y = x + 1

10
Exercise

1. Find the slope of each line.

(a) Through (4, −5) and (2, 0).


(b) Through (−1, 1) and (−1, −1).
(c) Through (1, −1) and (−1, −1).
(d) y = x + 1.
(e) 4x = 2y − 1

2. find an equation in slope-intercept form for each line.

(a) Through (1, 3), m = −2.


(b) Through (1, 1), m = 0.
(c) Through (−1, 1) and (1, −1)
(d) Through (2, −1) and (−7, 3)

3. Find k so that the line through (4, −1) and (k, 2) is

(a) parallel to 2x + 3y = 6,
(b) perpendicular to 5x − 2y = −1.

4. Graph each equation

(a) y = x + 1
(b) 7x + 5y = 1
x y
(c) 3
+ 4
=1
(d) x − 2y = −1
(e) −9x + 11y = 5

11
1.2 Linear Functions and Applications

As we saw in the previous section, many situations involve two


variables related by a linear equation. For such a relationship, when
we express the variable y in terms of x, we say that y is a linear
function of x.

1.2.1 Linear function

Definition 1.2.1. A relationship f defined by

y = f (x) = mx + b

for real numbers m and b, is a linear function.

Example 1.2.1. Let g(x) = −4x + 5. Find g(3), g(0), g(−2), and
g(b).
Solution: To find g(3), substitute 3 for x.

g(3) = −4(3) + 5 = −12 + 5 = −7

Similarly,
g(0) = −4(0) + 5 = 0 + 5 = 5
g(−2) = −4(−2) + 5 = 8 + 5 = 13
and
g(b) = −4b + 5.

Example 1.2.2. Supply and Demand


Suppose that Greg Tobin, manager of a giant supermarket chain,

12
has studied the supply and demand for watermelons. He has
noticed that the demand increases as the price decreases. He has
determined that the quantity (in thousands) demanded weekly, q,
and the price (in dollars) per watermelon, p, are related by the
linear function

p = D(q) = 9 − 0.75q. Demand function

(a) Find the quantity demanded at a price of $5.25 per watermelon


and at a price of $3.75 per watermelon.
Solution: To find the quantity demanded at a price of $5.25 per
watermelon, replace p in the demand function with 5.25 and solve
for q.

5.25 = 9 − 0.75q (1.1)


−3.75 = −0.75q (1.2)
5=q (1.3)

Thus, at a price of $5.25, the quantity demanded is 5000


watermelons.
Similarly, replace p with 3.75 to find the demand when the
price is $3.75. Verify that this leads to q = 7. When the price is
lowered from $5.25 to $3.75 per watermelon, the quantity demanded
increases from 5000 to 7000 watermelons.
(b) Greg also noticed that the quantity of watermelons supplied
decreased as the price decreased. Price p and supply q are related

13
by the linear function

p = S(q) = 0.75q. Supply function

Find the quantity supplied at a price of $5.25 per watermelon and


at a price of $3.00 per watermelon.
Solution: Substitute 5.25 for p in the supply function, p = 0.75q,
to find that q = 7, so the quantity supplied is 7000 watermelons.
Similarly, replacing p with 3 in the supply equation gives a
quantity supplied of 4000 watermelons. If the price decreases from
$5.25 to $3.00 per watermelon, the quantity supplied also decreases,
from 7000 to 4000 watermelons.
(c) Graph both functions on the same axes.
Solution: The results of part (a) are written as the ordered pairs
(5, 5.25) and (7, 3.75). The line through those points is the graph
of the demand function, p = 9 − 0.75q, shown in red in Figure 1.6.
We used the ordered pairs (7, 5.25) and (4, 3) from the work in part

Figure 1.6: Supply and demand

14
(b) to graph the supply function, p = 0.75q, shown in blue in
Figure 1.6.

Example 1.2.3. Temperature One of the most common linear


relationships found in everyday situations deals with temperature.
Recall that water freezes at 32◦ Fahrenheit and 0◦ Celsius, while
it boils at 212◦ Fahrenheit and 100◦ Celsius.* The ordered pairs
(0, 32) and (100, 212) are graphed in Figure 14 on axes showing
Fahrenheit (F ) as a function of Celsius (C). The line joining them
is the graph of the function.

Figure 1.7: Fahrenheit (F) as a function of Celsius (C)

Derive an equation relating F and C.


Solution: To derive the required linear equation, first find the
slope using the given ordered pairs, (0, 32) and (100, 212).

212 − 32 9
m= =
100 − 0 5

15
The F -intercept of the graph is 32 , so by the slope-intercept
form, the equation of the line is

9
F = C + 32
5

With simple algebra this equation can be rewritten to give C in


terms of F :
5
C = (F − 32)
9
Exercise

1. let f (x) = 7 − 5x and g(x) = 2x − 3. Find the following.

(a) f (2)
(b) f (4)
(c) f (−3)
(d) f (−1)
(e) g(1.5)
(f) g(2.5)
(g) g(−1/2)
(h) g(−3/4)
(i) f (t)
(j) g (k 2 )

2. Let the supply and demand functions for butter pecan ice
cream be given by

2 2
p = S(q) = q and p = D(q) = 100 − q
5 5

16
where p is the price in dollars and q is the number of
10-gallon tubs.

(a) Graph these on the same axes.


(b) Find the equilibrium quantity and the equilibrium price.
(Hint: The way to divide by a fraction is to multiply by
its reciprocal.

1.2.2 The Least Square Line

We use summation notation to write the sum of a list of numbers.


The Greek letter sigma, Σ, is used to indicate“the sum of.” For
example, we write the sum x1 + x2 + · · · + xn , where n is the
number of data points, as
X
x1 + x2 + · · · + xn = x.
P
Similarly, xy means x1 y1 + x2 y2 + · · · + xn yn , and so on.
Note: that x2 means x21 +x22 +· · ·+x2n , which is not the same
P

as squaring x. When we square x, we write it as ( x)2 .


P P P

Definition 1.2.2. The line which the sum of the squares of the
vertical distances from the data points to the line is as small as
possible. Such a line is called the least squares line.

For the least squares line, the sum of the distances we are to
minimize, d21 + d22 + · · · + d2n , is written as
X
d21 + d22 + · · · + d2n = d2 .

17
To calculate the distances, we let (x1 , y1 ) , (x2 , y2 ) , · · · , (xn , yn ) be
the actual data points and we let the least squares line be Y =
mx + b. We use Y in the equation instead of y to distinguish the
predicted values (Y ) from the y-value of the given data points. The
predicted value of Y at x1 is Y1 = mx1 + b, and the distance, d1 ,
between the actual y-value y1 and the predicted value Y1 is

d1 = |Y1 − y1 | = |mx1 + b − y1 |

Likewise,
d2 = |Y2 − y2 | = |mx2 + b − y2 | ,

and
dn = |Yn − yn | = |mxn + b − yn | .

The sum to be minimized becomes

Σd2
= (mx1 + b − y1 )2
+ (mx2 + b − y2 )2
+ · · · + (mxn + b − yn )2
X
= (mx + b − y)2

Σd2 = (mx1 + b − y1 )2 + (mx2 + b − y2 )2 + · · · + (mxn + b − yn )2


X
= (mx + b − y)2

where (x1 , y1 ) , (x2 , y2 ) , . . . , (xn , yn ) are known and m and b


are to be found.

18
Definition 1.2.3. The least squares line Y = mx + b that gives the
best fit to the data points (x1 , y1 ) , (x2 , y2 ) , . . . , (xn , yn ) has slope
m and y-intercept b given by

n(Σxy) − (Σx) (Σy ) Σy − m (Σx )


m= and b= .
n (Σx2 ) − (Σx)2 n

Example 1.2.4. Calculate the least squares line for the accidental
death rate data.

Figure 1.8: Accidental Death Rate

Solution: To find the least squares line for the given data, we
first find the required sums. To reduce the size of the numbers, we

19
rescale the year data. Let x represent the years since 1900 , so that,
for example, x = 10 corresponds to the year 1910 . Let y represent
the death rate. We then calculate the values in the xy, x2 , and y 2
columns and find their totals. (The column headed y 2 will be used
later.) Note that the number of data points is n = 10.

Figure 1.9: Least Square Calculations

Putting the column totals into the formula for the slope m, we
get
n(Σxy) − (Σx)(Σy)
m=
n (Σx2 ) − (Σx)2
10(28, 135) − (550)(595.5)
=
10(38, 500) − (550)2
281, 350 − 327, 525
=
385, 000 − 302, 500
−46, 175
=
82, 500
= −0.5596970 ≈ −0.560.
The significance of m is that the death rate per 100, 000 people

20
is tending to drop (because of the negative) at a rate of 0.560 per
year.
Now substitute the value of m and the column totals in the
formula for b:
Σy − m(Σx)
b=
n
595.5 − (−0.559697)(550)
=
10
595.5 − (−307.83335)
=
10
903.33335
= = 90.333335 ≈ 90.3
10
Substitute m and b into the least squares line, Y = mx + b; the
least squares line that best fits the 10 data points has equation

Y = −0.560x + 90.3.

Definition 1.2.4. Although the least squares line can always be


found, it may not be a good model. For example, if the data points
are widely scattered, no straight line will model the data accurately.
One measure of how well the original data fits a straight line is the
correlation coefficient, denoted by r, which can be calculated by
the following formula.

PP P
xy) − ( x) ( y)
n(
r=q P P 2 q P 2
n ( x ) − ( x) · n ( y ) − ( y)2
2
P

The correlation coefficient measures the strength of the linear


relationship between two variables. It was developed by statistics

21
pioneer Karl Pearson (1857-1936). The correlation coefficient r
is between 1 and −1 or is equal to 1 or −1. Values of exactly 1
or −1 indicate that the data points lie exactly on the least squares
line. If r = 1, the least squares line has a positive slope; r =
−1 gives a negative slope. If r = 0, there is no linear correlation
between the data points (but some nonlinear function might provide
an excellent fit for the data). A correlation coefficient of zero may
also indicate that the data fit a horizontal line. To investigate what
is happening, it is always helpful to sketch a scatterplot of the data.
Some scatterplots that correspond to these values of r are shown in
Figure 1.10 .

Figure 1.10: Scatterplots of Data

Example 1.2.5. Find r for the data on accidental death rates in


Example 1.2.4.
Solution: From the table in Example 1.2.4,

Σx = 550, Σy = 595.5, Σxy = 28, 135, Σx2 = 38, 500


Σy 2 = 38, 249.41, and n = 10

Substituting these values into the formula for r gives

22
n(Σxy) − (Σx)(Σy)
r=p p
n (Σx ) − (Σx)2 · n (Σy 2 ) − (Σy)2
2

10(28, 135) − (550)(595.5)


=p p
10(38, 500) − (550)2 · 10(38, 249.41) − (595.5)2
281, 350 − 327, 525
=√ √
385, 000 − 302, 500 · 382, 494.1 − 354, 620.25
−46, 175
=√ √
82, 500 · 27, 873.85
−46, 175
=
47, 954.06787
= −0.9629005849 ≈ −0.963.
This is a high correlation, which agrees with our observation
that the data fit a line quite well.

Exercise

1. For the following table of data,

(a) draw a scatterplot.


(b) calculate the correlation coefficient.
(c) calculate the least squares line and graph it on the
scatterplot.
(d) predict the y-value when x is 11.

2. The formulas for the least squares line were found by solving

23
the system of equations
X  X
nb + x m= y
X  X  X
x b+ x2 m = xy.

Solve the above system for b and m to show that


P P P
n ( xy) − ( x) ( y)
m= and
n ( x2 ) − ( x)2
P P
P P
y − m ( x)
b= .
n

1.2.3 Solutions of Linear Systems by the Echelon


Method

Definition 1.2.5. A first-degree equation in n unknowns is any


equation of the form

a1 x1 + a2 x2 + · · · + an xn = k,

where a1 , a2 , . . . , an and k are real numbers and x1 , x2 , . . . , xn


represent variables.

For example, the first equation

3x + 10y = 115

A solution of the first-degree equation

a1 x 1 + a2 x 2 + · · · + an x n = k

24
is a sequence of numbers s1 , s2 , . . . , sn such that

a1 s1 + a2 s2 + · · · + an sn = k.

A solution of an equation is usually written in parentheses as


(s1 , s2 , . . . , sn ). For example, (1, 6, 2) is a solution of the equation
3x1 + 2x2 − 4x3 = 7, since 3(1) + 2(6) − 4(2) = 7.
Types of Solutions for Two Equations in Two Unknowns

1. The two graphs are lines intersecting at a single point. The


system has a unique solution, and it is given by the
coordinates of this point. See Figure 1.11 (a).

2. The graphs are distinct parallel lines. When this is the case,
the system is inconsistent; that is, there is no solution
common to both equations. See Figure 1.11(b).

3. The graphs are the same line. In this case, the equations are
said to be dependent, since any solution of one
equation is also a solution of the other. There are infinitely
many
solutions. See Figure 1.11(c).

25
Figure 1.11: Types of Solutions for Two Equations in Two
Unknowns

Transformations: To solve a linear system of equations, we


use properties of algebra to change, or transform, the system into
a simpler equivalent system. An equivalent system is one that has
the same solution(s) as the given system. Algebraic properties are
the basis of the following transformations.
Transformations of a System
The following transformations can be applied to a system of
equations to get an equivalent system:
1. exchanging any two equations;
2. multiplying both sides of an equation by any nonzero real
number;
3. replacing any equation by a nonzero multiple of that equation
plus a nonzero multiple of any other equation.

Use of these transformations leads to an equivalent system


because each transformation can be reversed or“undone,”
allowing a return to the original system.

26
The Echelon Method:A systematic approach for solving
systems of equations using the three transformations is called the
echelon method. The goal of the echelon method is to use the
transformations to rewrite the equations of the system until the
system has a triangular form.
For a system of two equations in two variables, for example, the
system should be transformed into the form

x + ay = b
y = c,

where a, b, and c are constants. Then the value for y from the
second equation can be substituted into the first equation to find
x. This is called back substitution. In a similar manner, a system
of three equations in three variables should be transformed into the
form
x + ay + bz = c
y + dz = e,
z = f.

Example 1.2.6. Solve the system of equations from the animal feed
example that began this section:

3x + 10y = 115 (1.4)

11x + 4y = 95 (1.5)

Solution : We first use transformation 3 to eliminate the x-term


from equation (1.5). We multiply equation (1.4) by 11 and add the

27
results to −3 times equation (1.5).

11(3x + 10y) = 11 · 115 33x + 110y = 1265


→ −33x−12y=−285
−3(11x + 4y) = −3 · 95 98y=980

We will indicate this process by the notation 11R1 + (−3)R2 →


R2 .(R stands for the row. ) The new system is

3x + 10y = 115
(11R1 + (−3)R2 → R2 ) 98y = 980 (1.6)

Now we use transformation 2 to make the coefficient of the first


term in each row equal to 1 . Here, we must multiply equation (1.4)
by 1/3 and equation (1.6) by 1/98 to accomplish this. We get the
system
1
R → R1 x + 10
3 1 3
y = 115
3
1
R
98 2
→ R 2 y = 10
Back-substitution gives

10 115
x+ (10) = Substitute y = 10
3 3
100 115
x+ =
3 3
115 100
x= −
3 3
15
= =5
3

The solution of the system is (5, 10).

Exercise

28
Use the echelon method to solve each system of two equations in
two unknowns. Check your answers.

1.

x+y =5
2x − 2y = 2

2.

3x − 2y = −3
5x − y = 2

3.

3x + 2y = −6
5x − 2y = 10

4.

6x − 2y = −4
3x + 4y = 8

1.2.4 Solution of Linear Systems by the


Gauss-Jordan Method

When we use the echelon method, since the variables are in the
same order in each equation, we really need to keep track of just the

29
coefficients and the constants. For example, consider the following
system of three equations in three unknowns.

2x + y − z = 2
x + 3y + 2z = 1
x+y+z =2

This system can be written in an abbreviated form as

Such a rectangular array of numbers enclosed by brackets is


called a matrix (plural: matrices).* Each number in the array is an
element or entry. To separate the constants in the last column of
the matrix from the coefficients of the variables, we use a vertical
line,producing the following augmented matrix.

30
Row Operations
For any augmented matrix of a system of equations, the following
operations produce the augmented matrix of an equivalent system:
1. interchanging any two rows; 2. multiplying the elements of a
row by any nonzero real number; 3. adding a nonzero multiple of
the elements of one row to the corresponding elements of a nonzero
multiple of some other row.
For example,By the first row operation, interchanging two rows,
the matrix
 
0 1 2 3
 −2 −6 −10 −12 
 

2 1 −2 −5
 
−2 −6 −10 −12
becomes  0 1 2 3 
 

2 1 −2 −5
Here we interchanging the rows R1 and R2 .
The Gauss-Jordan method is an extension of the echelon method
of solving systems. Before the Gauss-Jordan method can be used,
the system must be in proper form: the terms with variables should
be on the left and the constants on the right in each equation, with
the variables in the same order in each equation.
The system is then written as an augmented matrix. Using row
operations, the goal is to transform the matrix so that it has zeros
above and below a diagonal of 1’s on the left of the vertical bar.
Once this is accomplished, the final solution can be read directly
from the last matrix. The following example illustrates the use of
the Gauss-Jordan method to solve a system of equations.

31
Example 1.2.7. Solve the system

3x − 4y = 1
5x + 2y = 19

Solution : The system is already in the proper form to use the


Gauss-Jordan method. Our goal is to transform this matrix, if
possible, into the form
" #
1 0 m
,
0 1 n

where m and n are real numbers. To begin, we change the 3 in the


first row to 1 using the second row operation. (Notice that the same
notation is used to indicate each transformation, as in the previous
section.) " #
1 3 −4 1
R1 → R1
3 5 2 19
" #
1 − 34 13
5 2 19
Using the third row operation, we change the 5 in row 2 to 0.
" #
1 − 34 1
3
−5R1 + R2 → R2 26 52
0 3 3

We now change 26/3 in row 2 to 1 to complete the diagonal of 1 ’s.


" #
3 1 − 34 13
R2 → R2
26 0 1 2

32
The final transformation is to change the −4/3 in row 1 to 0 .
" #
4 1 0 3
R2 + R1 → R1
3 0 1 2

The last matrix corresponds to the system

x=3
y = 2,

so we can read the solution directly from the last column of the
final matrix. Check that (3, 2) is the solution by substitution in the
equations of the original matrix.

Gauss-Jordan Method of Solving a Linear System


1. Write each equation so that variable terms are in the same order
on the left side of the equal sign and constants are on the right.
2. Write the augmented matrix that corresponds to the system.
3. Use row operations to transform the first column so that all
elements except the element in the first row are zero.
4. Use row operations to transform the second column so that all
elements except the element in the second row are zero.
5. Use row operations to transform the third column so that all
elements except the element in the third row are zero.
6. Continue in this way, when possible, until the last row is written
in the form h i
0 0 0 ··· 0 j k

where j and k are constants with j ̸= 0. When this is not pos-


sible, continue until every row has more zeros on the left than the

33
previous row (except possibly for any rows of all zero at the bottom
of the matrix), and the first nonzero entry in each row is the only
nonzero entry in its column.
7. Multiply each row by the reciprocal of the nonzero element in
that row.
Exercise

1. Write the augmented matrix for each system. Do not solve.


(a). 3x + y = 6 (b). 4x − 2y = 8
2x + 5y = 15 −7y = −12
(c). 2x + y + z = 3 (d). 2x − 5y + 3z = 4
3x − 4y + 2z = −7 −4x + 2y − 7z = −5
x+y+z =2 3x − y = 8

2. Write the system of equations associated with each augmented


matrix.
" #
1 0 2
(a).
0 1 3
" #
1 0 5
(b).
0 1 −3
 
1 0 0 4
(c).  0 1 0 −5 
 

0 0 1 1
 
1 0 0 4
(d).  0 1 0 2 
 

0 0 1 3

34
1.2.5 Addition and Subtraction of Matrices

Matrices often are named with capital letters. Matrices are


classified by size; that is, by the number of rows and columns they
contain. For example, matrix M is given below
" #
10 12 5
M=
15 20 8
has two rows and three columns. This matrix is a (read “2 by
3”) matrix. By definition, a matrix with m rows and n columns is
an m × n matrix. The number of rows is always given first.
 
−3 5
Example 1.2.8. (a) The matrix  2 0  is a 3 × 2 matrix.
 

5 −1
 
0.5 8 0.9
(b)  0 5.1 −3  is a 3 × 3 matrix.
 

−4 0 5
h i
(c) 1 6 5 −2 5 is a 1 × 5 matrix.
 
3
 
 −5 
(d) 
  is a 4 × 1 matrix.
 0 

2

A matrix with the same number of rows as columns is called a


square matrix. The matrix in Example 1.2.8(b) is a square matrix.
A matrix containing only one row is called a row matrix or a row
vector. The matrix in Example 1.2.8(c) is a row matrix.
A matrix of only one column, as in Example 1.2.8(d), is a column
matrix or a column vector.

35
Definition 1.2.6. Matrix Equality
Two matrices are equal if they are the same size and if each pair of
corresponding elements is equal.

By this definition,
" # " #
2 1 1 2
and
3 −5 −5 3

are not equal (even though they contain the same elements and are
the same size) since the corresponding elements differ.

Definition 1.2.7. Adding Matrices


The sum of two m × n matrices X and Y is the m × n matrix X+Y
in which each element is the sum of the corresponding elements of
X and Y .

Example 1.2.9. Find each sum, if possible.


Solution:
" # " # " #
5 −6 −4 6 5 + (−4) −6 + 6
(a) + = =
8 9 8 −3 8+8 9 + (−3)
" #
1 0
.
16 6
(b) The matrices
" # " #
5 −8 3 −9 1
A= and B=
6 2 4 2 −5

are different sizes. Therefore, the sum A + B does not exist.

Definition 1.2.8. Subtracting Matrices


The difference of two m × n matrices X and Y is the m × n

36
matrix X − Y in which each element is found by subtracting the
corresponding elements of X and Y .

Example 1.2.10. Subtract each pair of matrices, if possible.


Solution:
" # " #
8 6 −4 3 5 −8
(a) − =
−2 7 5 −4 2 9
" # " #
8 − 3 6 − 5 −4 − (−8) 5 1 4
= .
−2 − (−4) 7 − 2 5−9 2 5 −4
(b) The matrices
" # " #
−2 5 3
and
0 1 5

are different sizes and cannot be subtracted.

Exercise

1. Decide whether each statement is true or false. If false, tell


why
 
" # " # 1
1 3 1 5 h i
(a) · = (b) ·  2  = 1 2 3
 
5 7 3 7
3
" # " #
x −2
(c). = if x = −2 and y = 8
y 8
" #
3 5 2 8
(d). is a 4 × 2 matrix.
1 −1 4 0
 
1 9 −4
(e).  3 7 2  is a square matrix.
 

−1 1 0

37
 
2 4 −1 " #
2 4 −1
(f).  3 7 5 =
 
3 7 5
0 0 0

1.2.6 Multiplication of Matrices

We begin by defining the product of a real number and a matrix. In


work with matrices, a real number is called a scalar.

Definition 1.2.9. Product of a Matrix and a Scalar


The product of a scalar k and a matrix X is the matrix kX, each of
whose elements is k times the corresponding element of X.

" #
3 4
Example 1.2.11. Calculate −5A, where A = .
0 −1
Solution :
" # " #
3 4 −15 −20
(−5) =
0 −1 0 5
.

Definition 1.2.10. Product of Two Matrices


Let A be an m × n matrix and let B be an n × k matrix. To find the
element in the i th row and j th column of the product matrix AB,
multiply each element in the i th row of A by the corresponding
element in the jth column of B, and then add these products. The
product matrix AB is an m × k matrix.

38
Example 1.2.12. Find the product AB of matrices

" # 1
2 3 −1
A= and B= 8 
 
4 2 2
6

Solution
Since A is 2 × 3 and B is 3 × 1, we can find the product matrix AB.
Step 1 Multiply the elements of the first row of A and the
corresponding elements of the column of B.
 
" # 1
2 3 −1
 8  2 · 1 + 3 · 8 + (−1) · 6 = 20
 
4 2 2
6

Thus, 20 is the first-row entry of the product matrix AB.


Step 2 Multiply the elements of the second row of A and the
corresponding elements of B.
 
" # 1
2 3 −1
 8  4 · 1 + 2 · 8 + 2 · 6 = 32
 
4 2 2
6

The second-row entry of the product matrix AB is 32 .


Step 3 Write the product as a column matrix using the two entries
found above.
 
" # 1 " #
2 3 −1 20
AB =  8 =
 
4 2 2 32
6

39
Note that the product of a 2 × 3 matrix and a 3 × 1 matrix is a 2 × 1
matrix.

Remark:the product AB of two matrices A and B can be found


only if the number of columns of A is the same as the number of
rows of B.
Exercise
" # " #
−2 4 −6 2
1. Let A = and B = . Find each value.
0 3 4 0
(a). 2A
(b). −3B
(c). −6A
(d). 5B
(e). −4A + 5B
(f). 7B − 3A
(g). AB
(h).BA
(i).AB + BA

1.2.7 Matrix Inverses

In this section, we introduce the idea of a matrix inverse, which is


comparable to the reciprocal of a real number. This will allow us
to solve a matrix equation.
If I is to be the identity matrix, both of the products AI and
IA must equal A. This means that an identity matrix exists only
for square matrices. The 2 × 2 identity matrix that satisfies these

40
conditions is " #
1 0
I=
0 1
To check that I, as defined above, is really the 2 × 2 identity, let
" #
a b
A=
c d

Then AI and IA should both equal A.


" #" #
a b 1 0
AI = =
c d 0 1
" # " #
a(1) + b(0) a(0) + b(1) a b
= =A
c(1) + d(0) c(0) + d(1) c d
" #" #
1 0 a b
IA = =
0 1 c d
" # " #
1(a) + 0(c) 1(b) + 0(d) a b
= =A
0(a) + 1(c) 0(b) + 1(d) c d

This verifies that I has been defined correctly. It is easy to


verify that the identity matrix I is unique. Suppose there is another
identity; call it J. Then IJ must equal I, because J is an identity,
and IJ must also equal J, because I is an identity. Thus I = J.

Definition 1.2.11. Let A be a square matrix of order n × n. The


Multiplicative inverse of a matrix A is a square matrix A−1 (read
“ A-inverse”) which satisfies the below conditions

A × A−1 = A−1 × A = I.

41
" #
1 3
Example 1.2.13. Verify that the matrices A = and B =
2 5
" #
−5 3
are inverses of each other.
2 −1
Solution :
Multiply A times B as in the previous section:
" #" # " #
1 3 −5 3 1 0
AB = =
2 5 2 −1 0 1

Similarly,
" #" # " #
−5 3 1 3 1 0
BA = =
2 −1 2 5 0 1

Since AB = BA = I, A and B are inverses of each other.

Finding a Multiplicative Inverse Matrix


To obtain A−1 for any n × n matrix A for which A−1 exists, follow
these steps.
1. Form the augmented matrix [A | I], where I is the n × n identity
matrix.
2. Perform row operations on [A | I] to get a matrix of the form
[I | B], if this is possible.
3. Matrix B is A−1 .
 
1 0 1
Example 1.2.14. Find A−1 if A =  2 −2 −1 
 

3 0 0
Solution :

42
Write the augmented matrix [A | I].
 
1 0 1 1 0 0
[A | I] =  2 −2 −1 0 1 0 
 

3 0 0 0 0 1

Begin by selecting the row operation that produces a zero for the
first element in row 2.
 
1 0 1 1 0 0
− 2R1 + R2 → R2 
 0 −2 −3 −2 1 0 

− 3R1 + R3 → R3
0 0 −3 −3 0 1

Get 0 ’s in the first column. Column 2 already has zeros in the


required positions, so work on column 3.
 
3 0 0 0 0 1
R3 + 3R1 → R1 
 0 2 0 −1 −1 1 

R3 + (−1)R2 → R2
0 0 −3 −3 0 1

Get 0 ’s in the third column. Now get 1’s down the main diagonal.

1
R1 → R1  1

3 1 0 0 0 0 3
1
R2 → R2  0 0 1 − 2 − 12
1 1
 
2 
2
1 1 0 − 13
− R3 → R3
3

Get 1’s down the diagonal. From the last transformation, the

43
desired inverse is
 1

0 0 3
A−1 =  − 12 − 21 1
.
 
2
1 0 − 13

Confirm this by forming the products A−1 A and AA−1 , both of


which should equal I.

Solving Systems of Equations with Inverses

We use matrices to solve linear systems is to write the system as


a matrix equation where A is the matrix of the coefficients of the
variables of the system, X is the matrix of the variables, and B
is the matrix of the constants. Matrix A is called the coefficient
matrix.
To solve the matrix equation AX = B, first see if A−1 exists.
Assuming A−1 exists and using the facts that A−1 A = I and IX =
X gives

AX = B
A−1 (AX) = A−1 B Multiply both sides by A−1 .
A−1 A X = A−1 B

Associative property
IX = A−1 B Multiplicative inverse property
X = A−1 B. Identity property

Solving a System AX=B Using Matrix Inverses


To solve a system of equations AX = B, where A is the square

44
matrix of coefficients and A−1 exists, X is the matrix of variables,
and B is the matrix of constants, first find A−1 . Then X = A−1 B.

Example 1.2.15. Use the inverse of the coefficient matrix to solve


the linear system
2x − 3y = 4
x + 5y = 2
Solution :
To represent the system as a matrix equation, use the coefficient
matrix of the system together with the matrix of variables and the
matrix of constants:
" # " # " #
2 −3 x 4
A= , X= , and B=
1 5 y 2

The system can now be written in matrix form as the equation


AX = B since
" #" # " # " #
2 −3 x 2x − 3y 4
AX = = = = B.
1 5 y x + 5y 2

To solve the system, first find A−1 . Do this by using row operations
on matrix [A | I] to get
" #
5 3
1 0 13 13
1 2
.
0 1 − 13 13

From this result, " #


5 3
−1 13 13
A = 1 2
− 13 13

45
Next, find the product A−1 B.
" #" # " #
5 3
4 2
A−1 B = 13
1
13
2
= .
− 13 13
2 0

Since X = A−1 B,
" # " #
x 2
X= =
y 0

The solution of the system is (2, 0).

Exercise

1. Decide whether the given matrices are inverses of each other.


(Check
" to see
# if their
" product is# the identity matrix I.)
2 1 3 −1
(a). and
5 3 −5 2
" # " #
1 −4 −7 4
(b). and
2 −7 −2 1
" # " #
2 6 −1 2
(c). and
2 4 2 −4
" # " #
−1 2 −5 −2
(d). and
3 −5 −3 −1
   
2 0 1 1 1 −1
(e).  1 1 2  and  0 1 0 
   

0 1 0 −1 −2 2
2. Find"the inverse,
# if it exists, for each matrix.
1 −1
(a).
2 0

46
" #
1 1
(b).
2 3
" #
3 −1
(c).
−5 2
" #
−3 −8
(d).
1 3
" #
1 −3
(e).
−2 6
" #
5 10
(f).
−3 −6
 
1 0 0
(g).  0 −1 0
 

1 0 1
 
1 3 0
(h).  0 2 −1
 

1 0 2

1.2.8 Input-Output Models

Input-output models are concerned with the production and flow of


goods (and perhaps services). In an economy with n basic
commodities, or sectors, the production of each commodity uses
some (perhaps all) of the commodities in the economy as inputs.
For example, oil is needed to run the machinery that plants and
harvests the wheat, and wheat is used to feed the people who drill
and refine the oil. The amounts of each commodity used in the
production of one unit of each commodity can be written as an
n × n matrix A, called the technological matrix or input-output

47
matrix of the economy.

Example 1.2.16. Input-Output Matrix


Suppose a simplified economy involves just three commodity
categories: agriculture, manufacturing, and transportation, all in
appropriate units. Production of 1 unit of agriculture requires 1/2
unit of manufacturing and 1/4 unit of transportation; production
of 1 unit of manufacturing requires 1/4 unit of agriculture and 1/4
unit of transportation; and production of 1 unit of transportation
requires 1/3 unit of agriculture and 1/4 unit of manufacturing.
Give the input-output matrix for this economy.
Solution :

The first column of the input-output matrix represents the amount


of each of the three commodities consumed in the production of 1
unit of agriculture. The second column gives the amounts
required to produce 1 unit of manufacturing, and the last column
gives the amounts required to produce 1 unit of transportation.
(Although it is perhaps unrealistic that production of a unit of each
commodity requires none of that commodity, the simpler matrix
involved is useful for our purposes.)

Example 1.2.17. Production Matrix

48
In Example 1.2.16, suppose the production matrix is

60
X =  52 
 

48

Then 60 units of agriculture, 52 units of manufacturing, and 48


units of transportation are produced. Because 1/4 unit of
agriculture is used for each unit of manufacturing produced, 1/4 ×
52 = 13 units of agriculture must be used in the ”production” of
manufacturing. Similarly, 1/3 × 48 = 16 units of agriculture will
be used in the ”production” of transportation. Thus, 13 + 16 = 29
units of agriculture are used for production in the economy. Look
again at the matrices A and X. Since X gives the number of units
of each commodity produced and A gives the amount (in units)
of each commodity used to produce 1 unit of each of the various
commodities, the matrix product AX gives the amount of each
commodity used in the production process.
 1 1
   
0 4 3
60 29
1 1
AX =  0   52  =  42 
    
2 4
1 1
4 4
0 48 28

From this result, 29 units of agriculture, 42 units of manufactur-


ing, and 28 units of transportation are used to produce 60 units of
agriculture, 52 units of manufacturing, and 48 units of
transportation.

49
Module 2

Linear Programming: The


Graphical Method

2.1 Graphing Linear Inequalities

2.1.1 Linear Inequality

A linear inequality in two variables has the form

ax + by ≤ c
ax + by < c,
ax + by ≥ c,
or ax + by > c,

for real numbers a, b, and c, with a and b not both 0 .

Example 2.1.1. (Graphing an Inequality)

50
Graph the linear inequality 2x − 3y ≤ 12.
Solution : Because of the “ = ” portion of ≤, the points of the line
2x − 3y = 12 satisfy the linear inequality 2x − 3y ≤ 12 and are
part of its graph. As in Chapter 1, find the intercepts by first letting
x = 0 and then letting y = 0; use these points to get the graph of
2x − 3y = 12 shown in Figure 2.1 .

Figure 2.1: Graph of 2x − 3y = 12

The points on the line satisfy“ 2x − 3y equals 12 .” To locate


the points satisfying “2x − 3y is less than or equal to 12 ,” first
solve 2x − 3y ≤ 12 for y.

2x − 3y ≤ 12
−3y ≤ −2x + 12 Subtract 2x
y ≥ 32 x − 4 Multiply by − 31

(Recall that multiplying both sides of an inequality by a negative

51
number reverses the direction of the inequality symbol.)

Figure 2.2: Graph of 2x − 3y = 12

As shown in Figure 2.2, the points above the line 2x − 3y = 12


satisfy
2
y > x − 4,
3
while those below the line satisfy

2
y < x−4
3

In summary, the inequality 2x − 3y ≤ 12 is satisfied by all points


on or above the line 2x − 3y = 12. Indicate the points above the
line by shading, as in Figure 2.3 . The line and shaded region in
Figure 3 make up the graph of the linear inequality 2x − 3y ≤ 12.

52
Figure 2.3: Graph of 2x − 3y = 12

Graphing a Linear Inequality

1. Draw the graph of the boundary line. Make the line solid if
the inequality involves ≤ or ≥; make the line dashed if the
inequality involves ⟨ or ⟩.

2. Decide which half-plane to shade. Use either of the following


methods.

(a) Solve the inequality for y; shade the region above the
line if the inequality is of the form y > or y ≥; shade
the region below the line if the inequality is of the form
y < or y ≤.
(b) Choose any point not on the line as a test point. Shade
the half-plane that includes the test point if the test point

53
satisfies the original inequality; otherwise, shade the
half-plane on the other side of the boundary line.

2.1.2 Systems of Inequalities

Realistic problems often involve many inequalities. For example,


a manufacturing problem might produce inequalities resulting from
production requirements as well as inequalities about cost
requirements. A collection of at least two inequalities is called a
system of inequalities. The solution of a system of inequalities is
made up of all those points that satisfy all the inequalities of the
system at the same time. To graph the solution of a system of in-
equalities, graph all the inequalities on the same axes and identify,
by heavy shading or direction arrows, the region common to all
graphs. The next example shows how this is done.

Example 2.1.2. (Graphing a System of Inequalities)


Graph the system
y < −3x + 12
x < 2y
Solution :
The graph of the first inequality has the line y = −3x + 12 as its
boundary. Because of the < symbol, we use a dotted line and shade
below the line. The second inequality should first be solved for y to
get y > (1/2)x to see that the graph is the region above the dotted
boundary line y = (1/2)x.
The heavily shaded region in Figure 2.4 (a) shows all the points
that satisfy both inequalities of the system. Since the points on

54
the boundary lines are not in the solution, the boundary lines are
dashed.

Figure 2.4: Graph of y = −3x + 12 and x = 2y

A region consisting of the overlapping parts of two or more


graphs of inequalities in a system, such as the heavily shaded re-
gion in Figure 2.4, is sometimes called the region of feasible so-
lutions or the feasible region, since it is made up of all the points
that satisfy (are feasible for) all inequalities of the system.

Example 2.1.3. (Graphing a Feasible Region)


Graph the feasible region for the system

2x − 5y ≤ 10
x + 2y ≤ 8
x≥0
y≥0

Solution :

55
On the same axes, graph each inequality by graphing the boundary
and choosing the appropriate half-plane. Then find the feasible
region by locating the overlap of all the half-planes. This feasible
region is shaded in Figure 2.5 . The inequalities x ≥ 0 and y ≥ 0
restrict the feasible region to the first quadrant.

Figure 2.5: Graph of system of inequalities

Exercise

1. Graph each linear inequality.


(a). x + y ≤ 2
(b). y ≤ x + 1
(c). x ≥ 2 − y
(d). y ≥ x − 3
(e). 4x − y < 6
(f). 4y + x > 6
(g). 4x + y < 8

56
(h). 2x − y > 2
(i). x + 3y ≥ −2
(k). 2x + 3y ≤ 6

2. Graph the feasible region for each system of inequalities. Tell


whether each region is bounded or unbounded.
(a). x + y ≤ 1
x−y ≥2

(b). 4x − y < 6
3x + y < 9

(c). x + 3y ≤ 6
2x + 4y ≥ 7

(d). −x − y < 5
2x − y < 4

(e). x + y ≤ 7
x − y ≤ −4
x + y ≤ −5

(f). 3x − 2y ≥ 6
4x + y ≥ 0
y ≤ −6

57
2.2 Solving Linear Programming Problems
Graphically

Many mathematical models designed to solve problems in


business, biology, and economics involve finding an optimum value
(maximum or minimum) of a function, subject to certain
restrictions. In a linear programming problem, we must find the
maximum or minimum value of a function, called the objective
function, and satisfy a set of restrictions, or constraints, given
by linear inequalities. When only two variables are involved, the
solution to a linear programming problem can be found by first
graphing the set of constraints, then finding the feasible region as
discussed in the previous section. This method is explained in the
following example.

Example 2.2.1. Find the maximum value of the objective function


z = 3x + 4y, subject to the following constraints.

2x + y ≤ 4
−x + 2y ≤ 4
x≥0
y≥0

Solution : The feasible region is graphed in Figure 2.6 We can find


the coordinates of point A, (4/5, 12/5), by solving the system

2x + y = 4
−x + 2y = 4

58
Every point in the feasible region satisfies all the constraints;
however, we want to find those points that produce the maximum
possible value of the objective function. To see how to find this
maximum value, change the graph of Figure 11 by adding lines
that represent the objective function z = 3x + 4y for various sam-
ple values of z. By choosing the values 0,5 , 10 , and 15 for z, the
objective function becomes (in turn)

0 = 3x+4y, 5 = 3x+4y, 10 = 3x+4y, and 15 = 3x+4y.

Figure 2.6: Graph of y + 2x = 4 and −x + 2y = 4

These four lines (known as isoprofit lines) are graphed in


Figure 2.7. (Why are the lines parallel?) The figure shows that
z cannot take on the value 15 because the graph for z = 15 is
entirely outside the feasible region. The maximum possible value of

59
z will be obtained from a line parallel to the others and between the
lines representing the objective function when z = 10 and z = 15.
The value of z will be as large as possible and all constraints will
be satisfied if this line just touches the feasible region. This occurs
at point A. We find that A has coordinates (4/5, 12/5). (See the
review in the margin.) The value of z at this point is
   
4 12 60
z = 3x + 4y = 3 +4 = = 12.
5 5 5

Figure 2.7: Graph of y + 2x = 4 and −x + 2y = 4

The maximum possible value of z is Of all the points in the


feasible region, A leads to the largest possible value of z.

Theorem 2.2.1. (Corner Point Theorem)


If an optimum value (either a maximum or a minimum) of the
objective function exists, it will occur at one or more of the

60
corner points of the feasible region.

Solving a Linear Programming Problem


1. Write the objective function and all necessary constraints.
2. Graph the feasible region.
3. Identify all corner points.
4. Find the value of the objective function at each corner point.
5. For a bounded region, the solution is given by the corner point
producing the optimum value of the objective function.
6. For an unbounded region, check that a solution actually exists.
If it does, it will occur at a corner point.

Example 2.2.2. Sketch the feasible region for the following set of
constraints, and then find the maximum and minimum values of the
objective function z = x + 10y.

x + 4y ≥ 12
x − 2y ≤ 0
2y − x ≤ 6
x≤6

Solution :
The graph in below figure shows that the feasible region is bounded.
Use the corner points from the graph to find the maximum and
minimum values of the objective function.

61
The minimum value of z = x + 10y is 24 at the corner point
(4, 2). The maximum value is 66 at (6, 6).

Exercise

1. Use graphical methods to solve each linear programming


problem.

62
(a). Maximize z =5x + 2y
subject to: 4x − y ≤ 16
2x + y ≥ 11
x≥3
y ≤8.
(b). Maximize subject to:

z = 10x + 8y
2x + 3y ≤ 100
5x + 4y ≤ 200
x ≥ 10
0 ≤ y ≤ 20

(c). Maximize subject to:

z = 10x + 10y
5x + 8y ≥ 200
25x − 10y ≥ 250
x + y ≤ 150
x≥0
y ≥ 0.

63
(d). Maximize subject to:

z = 4x + 5y
10x − 5y ≤ 100
20x + 10y ≥ 150
x + 12
y≥1
x≥0
y≥0

2.3 Applications of Linear Programming

Example 2.3.1. Andrew Crowley plans to start a new business


called River Explorers, which will rent canoes and kayaks to
people to travel 10 miles down the Clarion River in Cook Forest
State Park. He has $45, 000 to purchase new boats. He can buy
the canoes for $600 each and the kayaks for $750 each. His facility
can hold up to 65 boats. The canoes will rent for $25 a day, and the
kayaks will rent for $30 a day. How many canoes and how many
kayaks should he buy to earn the most revenue if all boats can be
rented each day?
Solution :
Let x represent the number of canoes and let y represent the number
of kayaks. Summarize the given information in a table.

64
Rental Information
Canoes Kayaks Total
Number of Boats x y ≤ 65
Cost of Each $600 $750 ≤ $45, 000
Revenue $25 $30
The constraints, imposed by the number of boats and the cost,
correspond to the rows in the table as follows.

x + y ≤ 65
600x + 750y ≤ 45, 000

Dividing both sides of the second constraint by 150 gives the


equivalent inequality

4x + 5y ≤ 300.

Since the number of boats cannot be negative, x ≥ 0 and y ≥


0. The objective function to be maximized gives the amount of
revenue. If the variable z represents the total revenue, the objective
function is
z = 25x + 30y

In summary, the mathematical model for the given linear

65
programming problem is as follows:

Maximize z = 25x + 30y (2.1)


subject to: x + y ≤ 65 (2.2)
4x + 5y ≤ 300 (2.3)
x≥0 (2.4)
y≥0 (2.5)

Using the methods described in the previous section, graph


the feasible region for the system of inequalities (2.2)-(2.5), as in
Figure 2.8. Three of the corner points can be identified from the
graph as (0, 0), (65, 0), and (0, 60). The fourth corner point,
labeled Q in the figure, can be found by solving the system of
equations
x + y = 65
4x + 5y = 300
Solve this system to find that Q is the point (25, 40). Now test these
four points in the objective function to determine the
maximum value of z. The results are shown in the table. Values
of the Objective Function at Corner Points Corner Point

66
The objective function, which represents revenue, is maximized
when x = 25 and y = 40. He should buy 25 canoes and 40 kayaks
for a maximum revenue of $1825 a day.

Figure 2.8: Graph of x + y = 65 and 4x + 5y = 300

Example 2.3.2. Nutrition


Certain animals in a rescue shelter must have at least 30 g of
protein and at least 20 g of fat per feeding period. These
nutrients come from food A, which costs 18 cents per unit and
supplies 2 g of protein and 4 g of fat; and food B, which costs
12 cents per unit and has 6 g of protein and 2 g of fat. Food B is
bought under a long-term contract requiring that at least 2 units of
B be used per serving. Another contract requires that the amount
of food B used be no more than 3 times the amount of food A used.
(a) How much of each food must be bought to produce the
minimum cost per serving?
Solution :

67
Let x represent the required amount of food A and y the amount of
food B. Use the given information to prepare the following table

Since the animals must have at least 30 g of protein and 20 g


of fat, we use ≥ in the inequality. If the animals needed at most
a certain amount of some nutrient, we would use ≤ The long-term
contract requires that y ≥ 2.
In addition to the information in the table, we also have the
requirement that the amount of food B used be no more than 3 times
the amount of food A used. We can write this as y ≤ 3x. The linear
programming problem can be stated as follows.
Minimize z = 0.18x + 0.12y
subject to: 2x + 6y ≥ 30 Protein
4x + 2y ≥ 20 Fat
2 ≤ y ≤ 3x Contracts
x ≥ 0.
(The usual constraint y ≥ 0 is redundant because of the
constraint y ≥ 2.) A graph of the feasible region is shown in Figure
22. The corner points are (2, 6), (3, 4), and (9, 2). Test each corner
point in the objective function to find the minimum cost.

68
Figure 2.9: Graph of feasible region

The minimum of 1.02 occurs at (3, 4) Thus, 3 units of food A


and 4 units of food B will produce a minimum cost of $1.02 per
serving
(b) The rescue shelter manager notices that although the long-term
contract states that at least 2 units of food B be used per serving,
the solution uses 4 units of food B, which is 2 units more than the
minimum amount required. Can a more economical solution be
found that only uses 2 units of food B?
Solution :
The solution found in part (a) is the most

69
economical solution, even though it exceeds the requirement for
using at least 2 units of food B. Notice from Figure 22 that the
four lines representing the four constraints do not meet at a single
point, so any solution in the feasible region will have to exceed at
least one constraint. The rescue shelter manager might use this
information to negotiate a better deal with the distributor of food B
by making a guarantee to use at least 4 units of food B per serving
in the future.

70
Module 3

Linear Programming: The


Simplex Method

3.1 Slack Variables and the Pivot

Because the simplex method is used for problems with many


variables, it usually is not convenient to use letters such as x, y, z, or
w as variable names. Instead, the symbols x1 (read ” x-sub-one”),
x2 , x3 , and so on, are used. These variable names lend themselves
easily to use on the computer.
In this section we will use the simplex method only for

71
problems such as the following:

Maximize z = 2x1 − 3x2


subject to: 2x1 + x2 ≤ 10
x1 − 3x2 ≤ 5
with x1 ≥ 0, x2 ≥ 0.

This type of problem is said to be in standard maximum form. All


constraints must be expressed in the linear form

a1 x1 + a2 x2 + a3 x3 + · · · + an xn ≤ b,

where x1 , x2 , x3 , . . . , xn are variables and a1 , a2 , . . . , an and b are


constants, with b ≥ 0.
Standard Maximum Form

A linear programming problem is in standard maximum form


if the following conditions are satisfied.
1. The objective function is to be maximized.
2. All variables are nonnegative (xi ≥ 0).
3. All remaining constraints are stated in the form

a1 x 1 + a2 x 2 + · · · + an x n ≤ b with b ≥ 0.

(Problems that do not meet all of these conditions are discussed


in Sections 3.3 and 3.4.) To use the simplex method, we start
by converting the constraints, which are linear inequalities, into
linear equations by adding a nonnegative variable, called a slack
variable,to each constraint. For example, the inequality x1 + x2 ≤

72
10 is converted into an equation by adding the slack variable s1 to
get
x1 + x2 + s1 = 10, where s1 ≥ 0.

The inequality x1 + x2 ≤ 10 says that the sum x1 + x2 is less than


or perhaps equal to 10 . The variable s1 ”takes up any slack” and
represents the amount by which x1 + x2 fails to equal 10. For ex-
ample, if x1 + x2 equals 8, then s1 is 2. If x1 + x2 = 10, then s1 is
0.
Remark :A different slack variable must be used for each con-
straint.

Example 3.1.1. Slack Variables


Restate the following linear programming problem by introducing
slack variables.

Maximize z = 3x1 + 2x2 + x3


subject to: 2x1 + x2 + x3 ≤ 150
2x1 + 2x2 + 8x3 ≤ 200
2x1 + 3x2 + x3 ≤ 320

with
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0

. Solution : Rewrite the three constraints as equations by adding


slack variables s1 , s2 , and s3 , one for each constraint. Then the
problem can be restated as follows.

73
Maximize z = 3x1 + 2x2 + x3
subject to: 2x1 + x2 + x3 + s1 = 150
2x1 + 2x2 + 8x3 + s2 = 200
2x1 + 3x2 + x3 +s3 = 320

with

x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, s1 ≥ 0, s2 ≥ 0, s3 ≥ 0

Adding slack variables to the constraints converts a linear


programming problem into a system of linear equations. In each
of these equations, all variables should be on the left side of the
equal sign and all constants on the right. All the equations in
Example 3.1.1 satisfy this condition except for the objective
function, z = 3x1 + 2x2 + x3 , which may be written with all
variables on the left as

−3x1 − 2x2 − x3 + z = 0.

Now the equations in Example 3.1.1 can be written as the following


augmented matrix.

74
This matrix is called the initial simplex tableau. The numbers
in the bottom row, which are from the objective function, are called
indicators(except for the 1 and 0 at the far right).

Example 3.1.2. Initial Simplex Tableau


Set up the initial simplex tableau for the following problem.
A farmer has 100 acres of available land on which he wishes to
plant a mixture of potatoes, corn, and cabbage. It costs him $400
to produce an acre of potatoes, $160 to produce an acre of corn,
and $280 to produce an acre of cabbage. He has a maximum of
$20, 000 to spend. He makes a profit of $120 per acre of potatoes,
$40 per acre of corn, and $60 per acre of cabbage. How many
acres of each crop should he plant to maximize his profit?
Solution: Begin by summarizing the given information as follows.

If the number of acres allotted to each of the three crops is rep-


resented by x1 , x2 , and x3 , respectively, then the constraint pertain-
ing to the number of acres can be expressed as

x1 + x2 + x3 ≤ 100 Number of acres

where x1 , x2 , and x3 are all nonnegative. This constraint says that


x1 + x2 + x3 is less than or perhaps equal to 100 . Use s1 as the

75
slack variable, giving the equation

x1 + x2 + x3 + s1 = 100.

Here s1 represents the amount of the farmer’s 100 acres that will
not be used ( s1 may be 0 or any value up to 100 ). The constraint
pertaining to the production cost can be expressed as

400x1 + 160x2 + 280x3 ≤ 20, 000, Production costs

or if we divide both sides by 40 , as

10x1 + 4x2 + 7x3 ≤ 500.

This inequality can also be converted into an equation by adding a


slack variable, s2 .

10x1 + 4x2 + 7x3 + s2 = 500

If we had not divided by 40 , the slack variable would have repre-


sented any unused portion of the farmer’s $20, 000 capital. Instead,
the slack variable represents 1/40 of that unused portion. (Note
that s2 may be any value from 0 to 500 .) The objective function
represents the profit. The farmer wants to maximize

z = 120x1 + 40x2 + 60x3 .

76
The linear programming problem can now be stated as follows:

Maximize z = 120x1 + 40x2 + 60x3


subject to: x1 + x2 + x3 + s1 = 100
10x1 + 4x2 + 7x3 + s2 = 500
with x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, s1 ≥ 0, s2 ≥ 0

Rewrite the objective function as −120x1 −40x2 −60x3 +z = 0,


and complete the initial simplex tableau as follows.

Exercise

1. Convert each inequality into an equation by adding a slack


variable.

(a) x1 + 2x2 ≤ 7
(b) 6x1 + 2x2 ≤ 50
(c) 1.5x1 + 2.1x2 + 1.3x3 ≤ 12
(d) 0.5x1 + 1.1x2 + 1.4x3 ≤ 21

2. For Exercises 2.(a)–2.(b),


(i) determine the number of slack variables needed,

77
(ii) name them, and
(iii) use slack variables to convert each constraint into a linear
equation.

(a)
Maximize z = 5x1 + 7x2
subject to: 2x1 + 3x2 + ≤ 15
4x1 + 5x2 + ≤ 35
1x1 + 6x2 + ≤ 20

with
x1 ≥ 0, x2 ≥ 0

.
(b)
Maximize z = 1.2x1 + 3.5x2
subject to: 2.4x1 + 1.5x2 + ≤ 15
4x1 + 5x2 + ≤ 35
1x1 + 6x2 + ≤ 20

with
x1 ≥ 0, x2 ≥ 0

3.2 Maximization Problems

In the previous section we showed how to prepare a linear


programming problem for solution. First, we converted the
constraints to linear equations with slack variables; then we used

78
the coefficients of the variables from the linear equation to write an
augmented matrix. Finally, we used the pivot to go from one corner
point to another corner point in the region of feasible
solutions. Now we are ready to put all this together and produce
an optimum value for the objective function. To see how this is
done, let us complete Example 3.1.2 from Section 3.1. In this
example, we were trying to determine, under certain constraints,
the number of acres of potatoes (x1 ), corn (x2 ), and cabbage (x3 )
the farmer should plant in order to optimize his profit (z). In the
previous section, we set up the following simplex tableau.
 
x1 x2
x3 s 1 s 2 z
 

 1 11 1 0 0 100  

 10 47 0 1 0 500  
−120 −40 −60 0 0 1 0

This tableau leads to the solution x1 = 0, x2 = 0, x3 = 0, s1 =


100, and s2 = 500, with s1 and s2 as the basic variables. These
values produce a value of 0 for z. In this solution, the farmer is
planting 0 acres and earning $0 profit. We can easily see that
there are other combinations of potatoes, corn, and cabbage that
produce a nonzero profit, and thus we know that the farmer has
better alternatives than planting nothing.
To decide which crops he should plant, we look at the original
objective function representing profit,

z = 120x1 + 40x2 + 60x3 .

79
The coefficient of x1 is the largest, which indicates that he will
make the most profit per acre planting potatoes. It makes sense,
then, to first try increasing x1 to improve the profit. To determine
how much we can increase x1 , we look at the constraint equations:

x1 + x2 + x3 + s1 = 100
10x1 + 4x2 + 7x3 + s2 = 500.

Because there are two equations, only two of the five variables can
be basic (and nonzero). If x1 is nonzero in the solution, then x1
will be a basic variable. Therefore, x2 and x3 will stay at 0 , and
the equations simplify to

x1 + s1 = 100
10x1 + s2 = 500

Since s1 and s2 are both nonnegative, the first equation implies that
x1 cannot exceed 100 , and the second implies that 10x1 cannot
exceed 500 , so x1 cannot exceed 500/10, or 50 . To satisfy both of
these conditions, x1 cannot exceed 50 , the smaller of 50 and 100 .
If we let x1 take the value of 50 , then x1 = 50, x2 = 0, x3 = 0, and
s2 = 0. Since x1 + s1 = 100, then s1 = 100 − x1 = 100 − 50 = 50.
Therefore, s1 is still a basic variable, while s2 is no longer a basic
variable, having been replaced in the set of basic variables by x1 .
This solution gives a profit of

z = 120x1 + 40x2 + 60x3 + 0s1 + 0s2


= 120(50) + 40(0) + 60(0) + 0(50) + 0(0) = 6000

80
or $6000, when 50 acres of potatoes are planted. The same result
could have been found from the initial simplex tableau given below.
Recall that the indicators are the numbers in the bottom row in the
columns labeled with real or slack variables. To use the tableau,
we select the variable with the most negative indicator. (If no
indicator is negative, then the value of the objective function cannot
be improved.) In this example, the variable with the most negative
indicator is x1 . Basic variables
 
x1 x2
x3 s 1 s 2 z
 

 1 1
1 1 0 0 100  

 10 4
7 0 1 0 500  
−120 −40 −60 0 0 1 0

The most negative indicator identifies the variable whose value is


to be made nonzero, if possible, because it indicates the variable
with the largest coefficient in the objective function. To find the
variable that is now basic and will become nonbasic, calculate the
quotients that were found above. Do this by dividing each number
from the right side of the tableau by the corresponding number from
the column with the most negative indicator.

Notice that we do not form a quotient for the bottom row. Of the
two quotients found, the smallest is 50 (from the second row). This

81
indicates that x1 cannot exceed 500/10 = 50, so 10 is the pivot.
Using 10 as the pivot, perform the appropriate row operations to
get zeros in the rest of the column. We will use the method from
Section 3.1 (calculating by hand) to perform the pivoting.

The solution read from this tableau is

x1 = 50, x2 = 0, x3 = 0, s1 = 50, s2 = 0,

with z = 6000, the same as the result found above. None of the
indicators in the final simplex tableau are negative, which means
that the value of z cannot be improved beyond $6000. To see
why, recall that the last row gives the coefficients of the objective
function so that or

0x1 + 8x2 + 24x3 + 0s1 + 12s2 + z = 6000


z = 6000 − 0x1 − 8x2 − 24x3 − 0s1 − 12s2

Since x2 , x3 , and s2 are zero, z = 6000, but if any of these three


variables were to increase, z would decrease.
This result suggests that the optimal solution has been found
as soon as no indicators are negative. As long as an indicator is
negative, the value of the objective function may be improved. If
any indicators are negative, we just find a new pivot and use row

82
operations, repeating the process until no negative indicators
remain.
Once there are no longer any negative numbers in the final row,
create a 1 in the columns corresponding to the basic variables and
z. In the previous example, this is accomplished by dividing rows
1 and 2 by 10 .

It is now easy to read the solution from this tableau:

x1 = 50, x2 = 0, x3 = 0, s1 = 50, s2 = 0,

with z = 6000. We can finally state the solution to the problem


about the farmer. The farmer will make a maximum profit of $6000
by planting 50 acres of potatoes, no acres of corn, and no acres of
cabbage. The value s1 = 50 indicates that of the 100 acres of land
available, 50 acres should be left unplanted. It may seem strange
that leaving assets unused can produce a maximum profit, but such
results actually occur often.
Note that since each variable can be increased by a different
amount, the most negative indicator is not always the best choice.
On average, though, it has been found that the most
negative indicator is the best choice.
In summary, the following steps are involved in solving a

83
standard maximum linear programming problem by the simplex
method.
Simplex Method For Standard Maximization Problems

1. Determine the objective function.

2. Write all the necessary constraints.

3. Convert each constraint into an equation by adding a slack


variable in each.

4. Set up the initial simplex tableau.

5. Locate the most negative indicator. If there are two


such indicators, choose the one farther to the left.

6. Form the necessary quotients to find the pivot. Disregard any


quotients with 0 or a negative number in the
denominator. The smallest nonnegative quotient gives the
location of the pivot. If all quotients must be disregarded, no
maximum
solution exists. If two quotients are both equal and smallest,
choose the pivot in the row nearest the top of the matrix.

7. Use row operations to change all other numbers in the pivot


column to zero by adding a suitable multiple of the pivot row
to a positive multiple of each row.

8. . If the indicators are all positive or 0, this is the final tableau.


If not, go back to Step 5 and repeat the process until a tableau
with no negative indicators is obtained.

84
9. Read the solution from the final tableau.

Example 3.2.1. Using the Simplex Method


To compare the simplex method with the graphical method, we use
the simplex method to solve the problem in Example 2.3.1, Section
2.3. The graph is shown again in Figure 3.1.

Figure 3.1:

The objective function to be maximized was

z = 25x1 + 30x2 . Revenue

(Since we are using the simplex method, we use x1 and x2 instead

85
of x and y as variables.) The constraints were as follows:

x1 + x2 ≤ 65 Number
4x1 + 5x2 ≤ 300 Cost
x1 ≥ 0, x2 ≥ 0

Add a slack variable to each constraint:

x1 + x2 + s1 = 65
4x1 + 5x2 + s2 = 300
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0.

with Write the initial tableau.


 
x1 x2 s 1 s 2 z
 

 1 1 1 0 0 65 


 4 5 0 1 0 300 

−25 −30 0 0 1 0

This tableau leads to the solution x1 = 0, x2 = 0, s1 = 65, and


s2 = 300, with z = 0, which corresponds to the origin in Figure 5
. The most negative indicator is −30, which is in column 2 of row
3 . The quotients of the numbers in the right-hand column and in
column 2 are
65 300
= 65 and = 60.
1 5
The smaller quotient is 60 , giving 5 as the pivot. Use row
operations to get the new tableau. For clarity, we will continue
to label the columns with x1 , x2 , and so on, although this is not
necessary in practice.

86
The solution from this tableau is x1 = 0 and x2 = 60, with z =
1800. (From now on, we will list only the original variables when
giving the solution.) This corresponds to the corner point (0, 60)
in Figure 3.1 . Verify that if we instead pivoted on the column with
the indicator of −25, we would arrive at the corner point (65, 0),
where the objective function has the value 1625, which is smaller
than its value at (0, 60).
Because of the indicator −1, the value of z might be improved.
We compare quotients and choose the 1 in row 1, column 1, as pivot
to get the final tableau.

There are no more negative indicators, so the optimum solution


has been achieved. Create a 1 in column 2 by multiplying row 2 by
1/5.

87
Here the solution is x1 = 25 and x2 = 40, with z = 1825. This
solution, which corresponds to the corner point (25, 40) in Figure
3.1 , is the same as the solution found earlier.
Each simplex tableau above gave a solution corresponding to
one of the corner points of the feasible region. As shown in Figure
3.2 , the first solution corresponded to the origin, with z = 0. By
choosing the appropriate pivot, we moved systematically to a new
corner point, (0, 60), which improved the value of z to 1800 . The
next tableau took us to (25, 40), producing the optimum value of
z = 1825. There was no reason to test the last corner point, (65, 0),
since the optimum value z was found before that point was reached.

Figure 3.2:

Exercise

1. In Exercises 1.(a)–1.(c), the initial tableau of a linear

88
programming problem is given. Use the simplex method to
solve each problem.

(a)  
x1 x2
x3 s 1 s 2 z
 

 1 4
4 1 0 0 16 

 2 1
5 0 1 0 20 
−3 −1 −2 0 0 1 0

(b)  
x1 x2
x3 s 1 s 2 z
 

 3 3
2 1 0 0 18 

 2 3 0 1 0 16 
2 
−4 −6 −2 0 0 1 0

(c)  
x1 x2 x3 s 1 s 2 s 3 z
2 1 2 1 0 0 0 25 
 

 

 4 3 2 0 1 0 0 40 

3 1 6 0 0 1 0 60 
 

−4 −2 −3 0 0 0 1 0

2. Use the simplex method to solve each linear programming


problem.

(a)
Maximize z = 3x1 + 5x2
subject to: 4x1 + x2 ≤ 25
2x1 + 3x2 ≤ 15
with x1 ≥ 0, x2 ≥ 0

89
(b)
Maximize z = 5x1 + 2x2
subject to: 2x1 + 4x2 ≤ 15
3x1 + x2 ≤ 10
with x1 ≥ 0, x2 ≥ 0

(c)
Maximize z = 10x1 + 12x2
subject to: 4x1 + 2x2 ≤ 20
5x1 + x2 ≤ 50
2x1 + 2x2 ≤ 24
with x1 ≥ 0, x2 ≥ 0

3.3 Minimization problems; Duality

Minimization Problems: The definition of a problem in standard


maximum form was given earlier in this chapter. Now we can
define a linear programming problem in standard minimum form,
as follows.
Standard Minimum Form
A linear programming problem is in standard minimum form if the
following conditions are satisfied.

1. The objective function is to be minimized.

2. All variables are nonnegative.

3. All remaining constraints are stated in the form

a1 y1 + a2 y2 + · · · + an yn ≥ b, with b ≥ 0

90
rather than maximized, and all constraints must have ≥ instead of
≤.
We use y1 , y2 , etc., for the variables and w for the objective
function as a reminder that these are minimizing problems. Thus,
w = c1 y1 + c2 y2 + · · · + cn yn .
Duality: An interesting connection exists between standard
maximization and standard minimization problems: any solution
of a standard maximization problem produces the solution of an
associated standard minimization problem, and vice versa. Each
of these associated problems is called the dual of the other. One
advantage of duals is that standard minimization problems can be
solved by the simplex method discussed in the first two sections of
this chapter. Let us explain the idea of a dual with an example.

Example 3.3.1. Duality

Minimize w = 8y1 + 16y2


subject to: y1 + 5y2 ≥ 9
2y1 + 2y2 ≥ 10
with y1 ≥ 0, y2 ≥ 0

Solution :Without considering slack variables just yet, write


the augmented matrix of the system of inequalities and include the
coefficients of the objective function (not their negatives) as the last
row in the matrix.

91
Now look at the following matrix, which we obtain from the one
above by interchanging rows and columns.

The rows of the first matrix (for the minimization problem) are
the columns of the second matrix.
The entries in this second matrix could be used to write the
following maximization problem in standard form (again ignoring
the fact that the numbers in the last row are not negative):

Maximize z = 9x1 + 10x2


subject to: x1 + 2x2 ≤ 8
5x1 + 2x2 ≤ 16
with x1 ≥ 0, x2 ≥ 0

92
Figure 3.3:

Figure 3.4:

Figure 3.3 shows the region of feasible solutions for the


minimization problem just given, while Figure 3.4 shows the region

93
of feasible solutions for the maximization problem produced by
exchanging rows and columns. The solutions of the two problems
are given below.

The two feasible regions in Figure 3.3 and Figure 3.4 are
different and the corner points are different, but the values of the
objective functions are equal—both are 48. An even closer
connection between the two problems is shown by using the
simplex method to solve this maximization problem.

94
Notice that the solution to the minimization problem is found
in the bottom row and slack variable columns of the final simplex
tableau for the maximization problem. This result suggests that
standard minimization problems can be solved by forming the dual
standard maximization problem, solving it by the simplex method,
and then reading the solution for the minimization problem from
the bottom row of the final simplex tableau.

Before using this method to actually solve a minimization

95
problem, let us find the duals of some typical linear programming
problems. The process of exchanging the rows and columns of
a matrix, which is used to find the dual, is called transposing the
matrix, and each of the two matrices is the transpose of the other.
The transpose of an m × n matrix A, written AT , is an n × m
matrix.

Example 3.3.2. Transpose


Find the transpose of each matrix.
 
2 −1 5
A= 6 8 0 
 

−3 7 −1
Solution : Both matrix A and its transpose are 3 × 3 matrices.
Write the rows of matrix A as the columns of the transpose.
 
2 6 −3
AT =  −1 8 7 
 

5 0 −1

Example 3.3.3. Write the dual of each standard linear


programming problem.

Maximize z = 2x1 + 5x2


subject to: x1 + x2 ≤ 10
2x1 + x2 ≤ 8
with x1 ≥ 0, x2 ≥ 0

Solution :Begin by writing the augmented matrix for the given

96
problem.  
1 1 10
 2 1 8 
 

2 5 0
Form the transpose of the matrix as follows:
 
1 2 2
 1 1 5 
 

10 8 0

The dual problem is stated from this second matrix as follows


(using y instead of x ):

Minimize w = 10y1 + 8y2


subject to: y1 + 2y2 ≥ 2
y1 + y2 ≥ 5
with y1 ≥ 0, y2 ≥ 0.

The following table shows the close connection between a


problem and its dual.

Theorem 3.3.1. Theorem of Duality


The objective function w of a minimization linear programming

97
problem takes on a minimum value if and only if the objective
function z of the corresponding dual maximization problem takes
on a maximum value. The maximum value of z equals the minimum
value of w.

Example 3.3.4.

Minimize w = 3y1 + 2y2


subject to: 2y1 + y2 ≥ 3
y1 + y2 ≥ 5
with y1 ≥ 0, y2 ≥ 0.

Solution:Use the given information to write the matrix.


 
1 3 6
 2 1 3 
 

3 2 0

Transpose to get the following matrix for the dual problem.


 
1 2 3
 3 1 2 
 

6 3 0

Write the dual problem from this matrix, as follows:

Maximize z = 6x1 + 3x2


subject to: x1 + 2x2 ≤ 3
3x1 + x2 ≤ 2
with x1 ≥ 0, x2 ≥ 0

98
Solve this standard maximization problem using the simplex method.
Start by introducing slack variables to give the system

x1 + 2x2 + s1 = 3
3x1 + x2 +s2 = 2
−6x1 − 3x2 + z = 0
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0

The first tableau for this system is given below, with the pivot as
indicated.

The simplex method gives the following as the final tableau.

 
x1 x2 s 1 s 2 z
3
− 15 0 7
 

 0 1 5 5



 1 0 − 15 2
5
0 1
5


3 9 27
0 0 5 5
1 5

Since a 1 has been created in the z column, the last row of this
final tableau gives the solution to the minimization problem. The
minimum value of w = 3y1 + 2y2 , subject to the given constraints,
is 27/5 and occurs when y1 = 3/5 and y2 = 9/5. The minimum
value of w, 27/5, is the same as the maximum value of z.

99
Let us summarize the steps in solving a standard minimization
linear programming problem by the method of duals.
Solving a Standard Minimum Problem with Duals

1. Find the dual standard maximization problem.

2. Solve the maximization problem using the simplex method.

3. The minimum value of the objective function w is the


maximum value of the objective function z.

4. The optimum solution to the minimization problem is given


by the entries in the bottom row of the columns
corresponding to the slack variables, so long as the entry in
the z column is equal to 1 .

Exercise

1. Find the transpose of each matrix.

(a)  
1 2 3
 3 2 1 
 

1 10 0

(b) " #
3 4 −2 0 1
2 0 11 5 7

100
(c)  
4 5 −3 15
 7 14 20 −8 
 

5 0 −2 23

(d)  
1 11 15
0 10 −6
 
 
 

 4 12 −2 

1 −1 13
 
 
2 25 −1

2. State the dual problem for each linear programming problem.

(a)
Maximize z = 4x1 + 3x2 + 2x3
subject to: x1 + x2 + x3 ≤ 5
x1 + x2 ≤ 4
2x1 + x2 + 3x3 ≤ 15
with x1 ≥ 0, x2 ≥ 0, x3 ≥ 0.

(b)
Maximize z = 2x1 + 7x2 + 4x3
subject to: 4x1 + 2x2 + x3 ≤ 26
x1 + 7x2 + 8x3 ≤ 33
with x1 ≥ 0, x2 ≥ 0, x3 ≥ 0.

101
(c)

Minimize w = 3y1 + 6y2 + 4y3 + y4


subject to: y1 + y2 + y3 + y4 ≥ 150
2y1 + 2y2 + 3y3 + 4y4 ≥ 275
with y1 ≥ 0, y2 ≥ 0, y3 ≥ 0,

3.4 Nonstandard Problems

So far we have used the simplex method to solve linear


programming problems in standard maximum or minimum form
only. Now this work is extended to include linear programming
problems with mixed ≤ and ≥ constraints.
For example, suppose a new constraint is added to the farmer
problem in Example 2 of Section 3.1: To satisfy orders from regular
buyers, the farmer must plant a total of at least 60 acres of the three
crops. Notice that our solution from Section 3.2 (plant 50 acres of
potatoes, no acres of corn, and no acres of cabbage) does not satisfy
this constraint, which introduces the new inequality

x1 + x2 + x3 ≥ 60

As before, this inequality must be rewritten as an equation in which


the variables all represent nonnegative numbers. The inequality
x1 + x2 + x3 ≥ 60 means that

x1 + x2 + x3 − s3 = 60

102
for some nonnegative variable s3 . (Remember that s1 and s2 are
the slack variables in the problem.)
The new variable, s3 , is called a surplus variable. The value of
this variable represents the excess number of acres (over 60 ) that
may be planted. Since the total number of acres planted is to be no
more than 100 but at least 60, the value of s3 can vary from 0 to 40
. We must now solve the system of equations

x1 + x2 + x3 +s1 =100
10x1 + 4x2 + 7x3 + s2 =500
x1 + x2 + x3 − s3 =60
−120x1 − 40x2 − 60x3 +z =0

with x1 , x2 , x3 , s1 , s2 , and s3 all nonnegative.


Set up the initial simplex tableau.
 
x1 x2 x3 s1 s2 s3 z
1 1 1 1 0 0 0 100 
 

 

 10 4 7 0 1 0 0 500 

1 1 1 0 0 −1 0 60 
 

−120 −40 −60 0 0 0 1 0

This tableau gives the solution

x1 = 0, x2 = 0, x3 = 0, s1 = 100, s2 = 500, s3 = −60.

But this is not a feasible solution, since s3 is negative. This means


that the third constraint is not satisfied; we have x1 + x2 + x3 = 0,

103
but the sum is supposed to be at least 60. All the variables in any
feasible solution must be nonnegative if the solution is to
correspond to a point in the feasible region.
When a negative value of a variable appears in the solution, row
operations are used to transform the matrix until a solution is found
in which all variables are nonnegative. Here the problem is the −1
in a column corresponding to a basic variable. If the number in that
row of the right-hand column were 0 , we could simply multiply
this row by −1 to remove the negative from the column. But we
cannot do this with a positive number in the righthand column.
Instead, we find the positive entry that is farthest to the left in the
third row (the row containing the −1 ); namely, the 1 in row 3 ,
column 1 . We will pivot using this column. (Actually, any column
with a positive entry in row 3 will do; we chose the column farthest
to the left arbitrarily.) Use quotients as before to find the pivot,
which is the 10 in row 2, column 1. Then use row operations to get
the following tableau.

Notice from the s3 column that −10s3 = 100, so s3 is still


negative. Therefore, we apply the procedure again. The 6 in row 3
, column 2 , is the positive entry farthest to the left in row 3 , and by
investigating quotients, we see that it is also the pivot. This leads
to the following tableau

104
The value of s3 is now 0 and the solution is feasible. We now
continue with the simplex method until an optimal solution is found.
We check for negative indicators, but since
We use this rule for simplicity. There are, however, more
complicated methods for choosing the pivot element that require,
on average, fewer pivots to find the solution. there are none, we
have merely to create a 1 in each column corresponding to a basic
variable or z.

The solution is

130 1 50 2
x1 = = 43 , x2 = = 16 , x3 = 0
3 3 3 3
17, 600
z= = 5866.67
3
For maximum profit with this new constraint, the farmer should
plant 43 31 acres of potatoes, 16 23 acres of corn, and no cabbage.
The profit will be $5866.67, less than the $6000 profit if the farmer

105
were to plant only 50 acres of potatoes. Because of the additional
constraint that at least 60 acres must be planted, the profit is
reduced. Notice that s1 = 40. This is the slack variable for the
constraint that no more than 100 acres are available. It indicates
that 40 of the 100 available acres are still unused. In summary, the
following steps are involved in solving the nonstandard problems
in
Solving a Nonstandard Problem

1. If necessary, convert the problem to a maximization problem.

2. Add slack variables and subtract surplus variables as needed.

3. Write the initial simplex tableau.

4. If any basic variable has a negative value, locate the nonzero


number in that variable’s column, and note what row it is in.

5. In the row located in Step 4, find the positive entry that is


farthest to the left, and note what column it is in.

6. In the column found in Step 5, choose a pivot by investigating


quotients.

7. Use row operations to change the other numbers in the pivot


column to 0 .

8. Continue Steps 4 through 7 until all basic variables are


nonnegative. If it ever becomes impossible to continue, then
the problem has no feasible solution.

106
9. Once a feasible solution has been found, continue to use
the simplex method until the optimal solution is found this
section.

In the next example, we use this method to solve a minimization


problem with mixed constraints.

Example 3.4.1. Minimization


Minimize w = 3y1 + 2y2
subject to: y1 + 3y2 ≤ 6
2y1 + y2 ≥ 3
with y1 ≥ 0, y2 ≥ 0.
Solution :Change this to a maximization problem by letting z equal
the negative of the objective function: z = −w. Then find the
maximum value of

z = −w = −3y1 − 2y2 .

The problem can now be stated as follows.

Maximize z = −3y1 − 2y2


subject to: y1 + 3y2 ≤ 6
2y1 + y2 ≥ 3
with y1 ≥ 0, y2 ≥ 0.

To begin, we add slack and surplus variables, and rewrite the

107
objective function.

y1 + 3y2 + s1 = 6
2y1 + y2 − s2 = 3
3y1 + 2y2 +z = 0

Set up the initial simplex tableau.

The solution y1 = 0, y2 = 0, s1 = 6, and s2 = −3, is not


feasible. Row operations must be used to get a feasible solution.
We start with s2 , which has a −1 in row 2 . The positive entry
farthest to the left in row 2 is the 2 in column 1. The element in
column 1 that gives the smallest quotient is 2, so it becomes the
pivot. Pivoting produces the following matrix.

Now s2 = 0, so the solution is feasible. Furthermore, there are


no negative indicators, so the solution is optimal. Divide row 1 by 2

108
, row 2 by 2 , and row 3 by 2 to find the final solution: y1 = 3/2 and
y2 = 0. Since z = −w = −9/2, the minimum value is w = 9/2.

Example 3.4.2. Transportation Problem


An auto manufacturer sends cars from two plants, I and II, to
dealerships A and B located in a midwestern city. Plant I has a
total of 28 cars to send, and plant II has 8 . Dealer A needs 20
cars, and dealer B needs 16. Transportation costs per car based
on the distance of each dealership from each plant are $220 from
I to A, $300 from I to B, $400 from II to A, and $180 from II to B.
How many cars should be sent from each plant to each of the two
dealerships to minimize transportation costs? Use the simplex method
to find the solution.
Solution :To begin, let and

y1 = the number of cars shipped from I to A;


y2 = the number of cars shipped from I to B;
y3 = the number of cars shipped from II to A;
y4 = the number of cars shipped from II to B.

Plant I has only 28 cars to ship, so

y1 + y2 ≤ 28

Similarly, plant II has only 8 cars to ship, so

y3 + y4 ≤ 8

109
Since dealership A needs 20 cars and dealership B needs 16 cars,

y1 + y3 ≥ 20 and y2 + y4 ≥ 16

The manufacturer wants to minimize transportation costs, so the


objective function is

w = 220y1 + 300y2 + 400y3 + 180y4 .

Now write the problem as a system of linear equations, adding


slack or surplus variables as needed, and let z = −w.

Set up the initial simplex tableau.


 
y1 y2 y3 y4 s1 s2 s3 s4 z
 

 1 1 0 0 1 0 0 0 0 28 


 0 0 1 1 0 1 0 0 0 8 
 

 1 0 1 0 0 0 −1 0 0 20 


 0 1 0 1 0 0 0 −1 0 16 

220 300 400 180 0 0 0 0 1 0

Because s3 = −20, we choose the positive entry farthest to


the left in row 3, which is the 1 in column 1. After forming the

110
necessary quotients, we find that the 1 is also the pivot, leading to
the following tableau.

We still have s4 = −16. Verify that the 1 in row 1 , column 2 ,


is the next pivot, leading to the following tableau.

We still have s4 = −8. Choosing column 3 to pivot, there is a tie


between rows 2 and 4 . Ordinarily in such cases, we
arbitrarily choose the pivot in the row nearest to the top of the
matrix. With surplus variables, however, we have the immediate
goal of making all basic variables nonnegative. Because choosing
row 4 will remove s4 from the set of basic variables, we will choose
as the pivot the 1 in column 3 , row 4 . The result is the following
tableau.

111
We now have the feasible solution

y1 = 12, y2 = 16, y3 = 8, y4 = 0,

s1 = 0, s2 = 0, s3 = 0, s4 = 0.

with w = 10, 640. But there are still negative indicators in the
bottom row, so we can keep going. After two more tableaus, we
find that
y1 = 20, y2 = 8, y3 = 0, y4 = 8,

with Therefore, the manufacturer should send 20 cars from plant


I to dealership A and 8 cars to dealership B. From plant II, 8
cars should be sent to dealership B and none to dealership A. The
transportation cost will then be $8240, a savings of $2400 over the
original stated cost of $10, 640.

Exercise

1. Rewrite each system of inequalities as a system of linear


equations, adding slack variables or subtracting surplus
variables as necessary.

(a)
2x1 + 3x2 ≤ 8
x1 + 4x2 ≥ 7

(b)
3x1 + 7x2 ≤ 9
4x1 + 5x2 ≥ 11

112
(c)
2x1 + x2 + 2x3 ≤ 50
x1 + 3x2 + x3 ≥ 35
x1 + 2x2 ≥ 15

(d)
2x1 + x3 ≤ 40
x1 + x2 ≥ 18
x1 + x3 ≥ 20

2. Convert each problem into a maximization problem.

(a)
Minimize w = 3y1 + 4y2 + 5y3
subject to: y1 + 2y2 + 3y3 ≥ 9
y2 + 2y3 ≥ 8
2y1 + y2 + 2y3 ≥ 6
with y1 ≥ 0, y2 ≥ 0, y3 ≥ 0.

(b)
Minimize w = 8y1 + 3y2 + y3
subject to: 7y1 + 6y2 + 8y3 ≥ 18
4y1 + 5y2 + 10y3 ≥ 20
with y1 ≥ 0, y2 ≥ 0, y3 ≥ 0.

(c)

Minimize w = y1 + 2y2 + y3 + 5y4


subject to: y1 + y2 + y3 + y4 ≥ 5
3y1 + y2 + 2y3 + y4 ≥ 100
with y1 ≥ 0, y2 ≥ 0, y3 ≥ 0, y4 ≥ 0.

113

You might also like