LINEAR
PROGRAMMING
CONTENTS
Linear Inequalities in Two Variables
System of Linear Inequalities in Two Variables
Linear Programming
Linear Inequalities
in Two Variables
Linear Inequalities in Two Variables
A linear inequality in two variables is a
statement in the form:
𝐴𝑥 + 𝐵𝑦 > 𝐶,
𝐴𝑥 + 𝐵𝑦 < 𝐶,
𝐴𝑥 + 𝐵𝑦 ≥ 𝐶,
𝐴𝑥 + 𝐵𝑦 ≤ 𝐶
where 𝐴 and 𝐵 are no both 0.
Steps in Graphing a Linear
Step 1.
Inequality in Two Variables
Graph the associated linear equation. The equation will be
a boundary for the desired region.
• If the inequality involves ≥ or ≤, draw a solid line to
indicate that the points on the line are included in the
solution.
• If the inequality sign is > or <, draw a dashed line
indicating that points on the line indicating that points on
the line are not solutions of the inequality.
Steps in Graphing a Linear
Inequality in Two Variables
Step 2.
Pick a test point, (0,0) if possible, not on the
boundary line and substitute its coordinates into
the given inequality.
Step 3.
If your test point satisfies the inequality, shade
the region containing it. If not, shade the region
on the other side of the boundary line.
Example 1.
Graph 𝒚 > 𝟐𝒙 + 𝟒.
Solution:
Step 1.
The associated linear equation is 𝑦 = 2𝑥 + 4.
•The line will be graphed using a dashed line
because the inequality symbol is >.
•The intercept points are (0, 4) and (-2, 0).
Plotting and connecting these points, we
have
Step 2.
Pick as test point on either side of the line. Since the
point (0, 0) is not on the line, we use this point.
Substituting 𝑥 = 0 and 𝑦 = 0 in 𝑦 > 2𝑥 + 4, we get
𝑦 > 2𝑥 + 4
0>2 0 +4 Substitute 𝑦 = 0 𝑎𝑛𝑑 𝑥 = 0
0>4 False
Step 3.
Since (0, 0) fails to satisfy the
inequality, so does every point
on the same side of the line
𝑦 = 2𝑥 + 4 as (0. 0). Shade
the region on the other side
of the boundary line.
Example 2
Graph the linear Inequalities
4𝑦 − 𝑥 ≥ 5
Solutions:
a) 4𝑦 − 𝑥 ≥ 5
Step 1.
The associated linear equation for this inequality
is 4𝑦 − 𝑥 ≥ 5.
• We graph this line using a solid line because the
inequality symbol is ≥.
5
• Thus, using the intercepts (0, ) and (−5, 0), the
4
graph is
Step 2.
Pick as test point on either side of the line. Since the
point (0, 0) is not on the line, we use this point.
Substituting 𝑥 = 0 and 𝑦 = 0 in 𝑦 > 2𝑥 + 4, we get
4𝑦 − 𝑥 ≥ 5
4 0 −0≥5 Substitute 𝑦 = 0 𝑎𝑛𝑑 𝑥 = 0
0≥5 False
Step 3.
Since (0, 0) fails to satisfy
the inequality, so does
every point on the same
side of the line 4𝑦 − 𝑥 ≥
5 as (0. 0). Shade the
region on the other side
of the boundary line.
Example 2
Graph the linear Inequalities
𝑥<2
Solution:
𝑥<2
Step 1.
The associated linear equation for this
inequality is the vertical line 𝑥 = 2. Hence,
the graph is given by
Step 2.
Pick as test point on either side of the line. Since
the point (0, 0) is not on the line, we use this
point. Substituting 𝑥 = 0 and 𝑦 = 0 in 𝑥 < 2, we
get:
𝑥<2
0<2 Substitute 𝑦 = 0 𝑎𝑛𝑑 𝑥 = 0
Therefore, the 𝑥 < 2 is True
Step 3.
Since (0, 0) satisfies the
inequality, so does every
point on the same side of
the line 𝑥 < 2 as (0. 0).
Shade the region on the
side of the vertical line
containing (0, 0)
Exercises 1
Graph the following inequalities
1. 𝑥 ≥ 2𝑦 − 1 6. 2𝑥 < −3𝑦 + 8
2. 2𝑥 + 𝑦 < −4 7. 𝑥 > −2𝑦 + 2
3. 𝑦 ≤ 1 8. 3𝑥 − 2𝑦 ≥ 0
4. 3𝑥 + 𝑦 > 4 9. 𝑦 > 2
5. 5𝑥 − 2𝑦 ≤ 9 10. 𝑥 ≤ 6
Problem Solving 1.
You have two part-time jobs:
tutoring and working at a café.
To maintain your school
performance, you want to work
a combined total of at least 20
hours per week.
Problem Solving 2.
A shipping company only accepts packages
where the combined weight of the
contents is at most 15 kilograms (kg). You
are packing two types of items: books and
clothing.
•Each book weighs 1.5 kg.
•Each piece of clothing weighs 0.5 kg.
Problem Solving 3.
A high school is selling tickets for a play to raise
funds. They need to sell at least $500 worth of
tickets to cover their costs. They offer two types
of tickets: student tickets and general
admission tickets.
• Student tickets (x) cost $5 each.
• General admission tickets (y) cost $10 each.
Problem Solving 4.
A small factory produces two items: wooden
chairs and wooden tables. They only have 180
hours of total machine time available per week
for production.
• Manufacturing one chair (x) requires 2 hours
of machine time.
• Manufacturing one table (y) requires 6 hours
of machine time.
System of Linear Inequalities in
Two Variables
A system of linear inequalities
•is a result of graphing two or more linear
inequalities on the same rectangular
coordinate system.
•The solution of such system is the region
that is common to every graph in the
system, that is, the set of points
satisfying all the inequalities in the
system.
ILLUSTRATIVE EXAMPLE:
To solve the system consisting of the inequalities
𝑥+𝑦 ≥3
𝑥 ≥ −4
We begin by
graphing the
associated linear
equations,
𝑥 + 𝑦 = 3 𝑎𝑛𝑑
𝑥 = −4.
To graph 𝑥 + 𝑦 ≥ 3, pick
(0,0) as a test point and
determine if it satisfies
the inequality. Since it
does not (satisfy), the
graph of 𝑥 + 𝑦 ≥ 3 is
the region above 𝑥 +
𝑦 = 3 and the line itself.
The graph of 𝑥 ≥ −4
is the set of all points
on and to the right of
the line 𝑥 = 4.
Thus, the solution set
of the system is the
intersection of the
solution sets of 𝑥 +
𝑦 ≥ 3 and 𝑥 ≥ −4.
Example 3
Graph the solution of the system
𝑥>1
𝑦>2
𝑥 > 2 − 2𝑦
Solution:
Graph the lines
𝑥 = 1,
𝑦=2
𝑥 = 2 − 2𝑦.
The graph of 𝑥 > 1 is
to the right of 𝑥 = 1.
The graph of 𝑦 > 2 is
above the line 𝑦 = 2.
The graph of
𝑥 > 2 − 2𝑦 is
above the line
𝑥 = 2 − 2𝑦.
Thus, the solution
is the intersection
of the three
regions as shown
below.
Exercises 2
Solve the following systems of inequalities
graphically.
1) 𝑥 − 𝑦 ≥ 1
3𝑥 − 𝑦 > 3
2) 𝑥 + 𝑦 ≥ −4
3𝑥 + 𝑦 < 5
Exercises 2
Solve the following systems of inequalities
graphically.
3) 𝑥 > 0
𝑦>0
𝑦 < 3 − 3𝑥
4) 2𝑥−𝑦≤3
𝑦≤𝑥
𝑥≥6
Exercises 2
Solve the following systems of inequalities graphically.
5) 𝑥+𝑦≥1
𝑥−𝑦≥1
𝑥≤ −1
6) 4𝑥−3𝑦≥6
1
𝑥− 𝑦≥2
2
𝑥+𝑦≥7
𝑥≤1
𝑦≤0
Quiz!
Solve the following systems of inequalities graphically.
1) y ˂ 2x – 3 4) y ≥ -3x + 2
1
y≥- x+4 2x + y ˂ 5
2
x˃0,y˃0
2) 2x + 3y ˂ 12
x–y˃2 5) 4𝑥−3𝑦≥6
1
𝑥− 𝑦≥2
2
3) y ≥ 2x + 1 𝑥+𝑦≥7
y≤-x +4 𝑥≤1 ; 𝑦≤0
Linear Programming
One application of systems of linear
inequalities is linear programming.
The goal is to minimize or maximize
quantities such as cost, profit,
production, storage capacity subject
to certain constraints.
Corner Principle
Let 𝑓 𝑥, 𝑦 = 𝑎𝑥 + 𝑏𝑦 + 𝑐 be an objective function
subject to constraints on two variables 𝑥 and 𝑦. If the
constraints form a system of linear inequalities, the
maximum and minimum values of 𝑓, if there is any, can
be found by:
1. Graphing systems of inequalities and locating the
vertices (the points of intersection)
2. Finding the value of the objective function 𝑓 at each
vertex.
The maximum and minimum values
of 𝑓 are the largest and the smallest
values obtained from Step 2,
respectively.
Example:
Find the maximum and minimum values of
the function 𝑓 𝑥, 𝑦 = 5𝑥 + 3𝑦 subject to
the following constraints:
𝑥 + 2𝑦 ≤ 8
𝑥+𝑦 ≤7
𝑥 ≥ 0, 𝑎𝑛𝑑
𝑦 ≥ 0.
Solution:
Graph each of the inequalities on the same
coordinate system. The common region is
that which contains all ordered pairs
satisfying the constraints. It is called the
feasible region. Following the Corner
Principle, 𝑓 has its maximum and minimum
values at the vertices of this region.
The coordinates of the vertices are found by solving four
systems of equations.
System Vertex Coordinates
𝑥+𝑦 = 7 A (7,0)
𝑦=0
𝑥 + 2𝑦 = 8 B (6,1)
𝑥+𝑦 = 7
𝑥 + 2𝑦 = 8 C (0,4)
𝑥=0
𝑦=0 D (0,0)
𝑥=0
Finally, compute for the value of 𝑓 𝑥, 𝑦 = 5𝑥 + 3𝑦 at each
vertex.
Vertex (𝑥, 𝑦) 𝑓 𝑥, 𝑦 = 5𝑥 + 3𝑦
A(7,0) 𝑓 7,0 = 5 7 + 3 0 = 35
B(6,1) 𝑓 6,1 = 33
C(0,4) 𝑓 0,4 = 12
D(0,0) 𝑓 0,0 = 0
Note that the maximum value of 𝑓 is
35, occurring at 𝐴(7,0). The
minimum value is 0, which occurs at
D (0,0).
Example:
Find the maximum and minimum values of
the function 𝑓 𝑥, 𝑦 = 𝑥 + 𝑦 subject to the
following constraints:
𝑥 − 2𝑦 ≥ −5
4𝑥 + 𝑦 ≤ 7
2𝑥 + 5𝑦 ≥ −1
Example
A school supplies retailer sells imported ballpens
and notebooks. He can regularly get between 50
and 100 ballpens and between 75 and 150
notebooks but no more than 225 items all
together. The ballpens cost Php20 pesos to buy
wholesale and sell for Php30 pesos, whereas the
notebooks cost Php30 but can be sold for Php45.
How many of each type should the retailer
acquire to make a maximum profit?
Solution:
Let us tabulate the information to visualize the
problem.
School Profit per Number Total Profit
Supplies item sold per item
Ballpens Php 10 𝑥 10𝑥
notebooks Php 15 𝑦 15𝑦
Solution:
The total profit which we seek to maximize is the
objective function
𝑓 𝑥, 𝑦 = 10𝑥 + 15𝑦
We wish to maximize the total profit 𝑓 subject to the
following constraints:
50 ≤ 𝑥 ≤ 100 At least 50 but no more than 100 ballpens
75 ≤ 𝑦 ≤ 150 At least 75 but no more than 150 notebooks
𝑥 + 𝑦 ≤ 225 Total number of school supplies cannot be more than 225
Graphing the system, we get
To solve five systems of equations, we need to get the
coordinates of the vertices A, B, D, E. Hence, we have
System Vertex Coordinates
𝑦 = 150 A (50,150)
𝑥 = 50
𝑦 = 150 B (75,150)
𝑥 + 𝑦 = 225
𝑥 + 𝑦 = 225 C (100,125)
𝑥 = 100
𝑥 = 100 D (100,75)
𝑦 = 75
𝑦 = 75 E (50,75)
𝑥 = 50
Finally, we compute for the value of 𝑓 𝑥, 𝑦 = 10𝑥 + 15𝑦 at each
vertex.
Vertex (𝑥, 𝑦) 𝑓 𝑥, 𝑦 = 10𝑥 + 15𝑦
A(50,150) 𝑓 50,150 = 10 50 + 15 150 = 2 750
B(75,150) 𝑓 75,150 = 3 000
C(100,125) 𝑓 100,125 = 2 875
D(100,75) 𝑓 100, 75 = 2 125
E(50,75) 𝑓 50,75 = 1 625
The maximum value of 𝑓 occurs at
75, 150 . Hence, the retailer should be able
to get 75 ballpens and 150 notebooks to
maximize his profit.
Example:
A factory produces chairs and tables. A chair gives a
profit of $30, and a table gives $50. A chair takes 4
hours of labor and a table takes 5 hours. The factory
has 200 hours of labor available. It can make no more
than 40 chairs due to material limits. How many of
each type should the factory make to get the
maximum profit?
Example:
A company produces two products, a customized t-
shirts and simple goods like stickers and magnets.
Each unit of customized t-shirts requires 1 hour of
labor and 2 units of material. Each unit of simple
goods like stickers and magnets requires 2 hours of
labor and 1 unit of material. The company has at
most 8 hours of labor and 6 units of material
available per day
3. A fruit stand sells Buko Juice and Mango Juice.
• Each bottle of Buko Juice gives ₱10 profit.
• Each bottle of Mango Juice gives ₱15 profit.
• Due to space, the stand can stock at most 40 bottles in total per
day.
• They have enough ingredients to make at most 25 bottles of Buko
Juice per day.
How many bottles of each juice should be made to maximize profit?
Exercises:
I. Find the minimum and maximum values given the objective
function subject to the following constraints:
1) 𝑓 𝑥, 𝑦 = 6𝑥 + 10𝑦 + 4
𝑦≥𝑥
𝑥≥0
𝑦≤2
Exercises:
I. Find the minimum and maximum values given the objective
function subject to the following constraints:
2) 𝑓 𝑥, 𝑦 = 2𝑥 + 𝑦
𝑥 + 𝑦 ≤ 12
𝑦≥6
𝑥≥5
𝑥 ≤ 15
Exercises:
I. Find the minimum and maximum values given the objective
function subject to the following constraints:
1) 𝑓 𝑥, 𝑦 = 4𝑥 + 𝑦
2𝑥 + 𝑦 ≤ 10
𝑥+𝑦 ≤6
𝑥≥0
𝑦≥0
Exercises
2) A grocery sells longganisas, tocinos and hams and
can put on display 500 of them per unit time. He can
sell at most 300 longganisas and 120 tocinos and,
currently, there are standing orders for 200 longganisas
and 70 hams. If the profit per piece is Php2.50 for
longanisas, Php3 for tocinos and Php4 for hams, how
many pieces of each type should be stocked to make a
maximum profit?
REFERENCES:
Rizaldi Nocon & Ederlina Nocon. Essential Mathematics for the Modern
World. DLSU
[Link]
Date Accessed: 04/18/2017