Chapter 3 Linear Programming
3.2 Graph Linear Inequalities in Two Variables
Learning Objectives
By the end of this section, you will be able to:
- Verify solutions to an inequality in two variables
- Recognize the relation between the solutions of an inequality and its graph
- Graph linear inequalities in two variables
- Solve applications using linear inequalities in two variables
Verify Solutions to an Inequality in Two Variables
Previously we learned to solve inequalities with only one variable. We will now learn about inequalities containing two variables. In particular we will look at linear inequalities in two variables, which are very similar to linear equations in two variables.
Linear inequalities in two variables have many applications. If you ran a business, for example, you would want your revenue to be greater than your costs—so that your business made a profit.
A linear inequality is an inequality that can be written in one of the following forms:
where A and B are not both zero.
Recall that an inequality with one variable had many solutions. For example, the solution to the inequality [latex]x>3[/latex] is any number greater than 3. We show this on the number line below by shading in the number line to the right of 3 and putting an open parenthesis at 3.
Similarly, linear inequalities in two variables have many solutions. Any ordered pair [latex](x,y)[/latex] that makes an inequality true when we substitute in the values is a solution to a linear inequality.
An ordered pair [latex](x,y)[/latex] is a solution to a linear inequality if the inequality is true when we substitute the values of x and y.
Example 1
Determine whether each ordered pair is a solution to the inequality [latex]y>x+4[/latex]:
a) [latex](0,0)[/latex]
[latex]\begin{array}{lrcl} (0,0) & y & > & x+4\\ \text{Substitute } {0} \text{ for x and } {0} \text{ for y.} & {0} & \stackrel{?}{>} & {0}+4 \\ \text{Simplify.} & 0 & \ngtr & 4\\ \text{So, } (0,0) \text{ is not a solution to } y>x+4. \\ \end{array}[/latex]
Exercise 1
Determine whether each ordered pair is a solution to the inequality [latex]y>x-3[/latex]:
a) [latex](0,0)[/latex]
b) [latex](4,9)[/latex]
c) [latex](-2,1)[/latex]
d)[latex](-5,-3)[/latex]
e) [latex](5,1)[/latex]
Solution
a) yes
b) yes
c) yes
d) yes
e) no
Determine whether each ordered pair is a solution to the inequality [latex]y \lt x+1[/latex]:
a)[latex](0,0)[/latex]
b) [latex](8,6)[/latex]
c) [latex](-2,-1)[/latex]
d) [latex](3,4)[/latex]
e) [latex](-1,-4)[/latex]
Solution
a) yes
b) yes
c) no
d) no
e) yes
Recognize the Relation between the Solutions of an Inequality and Its Graph
Now we will look at how the solutions of an inequality relate to its graph.
Let’s think about the number line shown previously again. The point [latex]x=3[/latex] separated that number line into two parts. On one side of 3 are all the numbers less than 3. On the other side of 3, all the numbers are greater than 3. See the figure below.
Similarly, the line [latex]y=x+4[/latex] separates the plane into two regions.
On one side of the line are points with [latex]y \lt x+4[/latex].
On the other side of the line are the points with [latex]y > x+4[/latex].
We call the line [latex]y=x+4[/latex] a boundary line.
Boundary Line
For an inequality in one variable, the endpoint is shown with a parenthesis or a bracket depending on whether or not a is included in the solution:
Similarly, for an inequality in two variables, the boundary line is shown with a solid or dashed line to show whether or not the line is included in the solution.
[latex]\begin{array}{ll} Ax+By \lt C & Ax+By \leq C\\ Ax+By > C & Ax+By \geq C\\ \text{Boundary line is }Ax+By=C. & \text{Boundary line is }Ax+By=C.\\ \text{Boundary line is not included in solution.} & \text{Boundary line is included in solution.}\\ \text{Boundary line is dashed.} & \text{Boundary line is solid.}\\ \end{array}[/latex]
Now let’s take a look at what we found in the figure below. We’ll start by graphing the line [latex]y=x+4[/latex], and then we’ll plot the five points we tested, as shown in the graph.
We found that some of the points were solutions to the inequality [latex]y>x+4[/latex] and some were not.
Which of the points we plotted are solutions to the inequality [latex]y>x+4[/latex] ?
The points [latex](1,6)[/latex] and [latex](-8,12)[/latex] are solutions to the inequality [latex]y>x+4[/latex]. Notice that they are both on the same side of the boundary line [latex]y=x+4[/latex].
The two points [latex](0,0)[/latex] and [latex](-5,-15)[/latex] are on the other side of the boundary line [latex]y=x+4[/latex], and they are not solutions to the inequality [latex]y>x+4[/latex]. For those two points, [latex]y \lt x+4[/latex].
What about the point [latex](2,6)[/latex]? Because [latex]6=2+4[/latex] the point is a solution to the equation [latex]y=x+4[/latex] but not a solution to the inequality [latex]y>x+4[/latex]. So the point [latex](2,6)[/latex] is on the boundary line.
Any point you choose above the boundary line is a solution to the inequality [latex]y>x+4[/latex]. All points above the boundary line are solutions.
Similarly, all points below the boundary line, the side with [latex](0,0)[/latex] and [latex](-5,-15)[/latex], are not solutions to [latex]y>x+4[/latex] as shown in the figure.
The graph of the inequality [latex]y>x+4[/latex] is shown below.
The line [latex]y=x+4[/latex] divides the plane into two regions. The shaded side shows the solutions to the inequality [latex]y>x+4[/latex].
The points on the boundary line, [latex]y=x+4[/latex], are not solutions to the inequality [latex]y>x+4[/latex], so the line itself is not part of the solution. We show that by making the line dashed, not solid.
Example 2
Now graph the inequality [latex]y> 2x-1[/latex].
The solution and steps are given below.
The line [latex]y=2x-1[/latex] is the boundary line. On one side of the line are the points with [latex]y > 2x-1[/latex], and on the other side of the line are the points with [latex]y \lt 2x-1[/latex].
Let’s test the point [latex](0,0)[/latex] and see which inequality describes its position relative to the boundary line.
At [latex](0,0)[/latex], which inequality is true: [latex]y > 2x-1[/latex] or [latex]y \lt 2x-1[/latex]?
[latex]\begin{array}{rclcccrcl} y & > & 2x-1 & & & & y & \lt & 2x-1\\ 0 & \stackrel{?}{>} & 20-1 && & & 0 & \stackrel{?}{\lt} & 20-1\\ 0 & > & -1 & & & & 0 & \lt & -1\\ \end{array}[/latex]
Since [latex]y > 2x-1[/latex] is true, the side of the line with [latex](0,0)[/latex] is the solution. The shaded region shows the solution of the inequality [latex]y > 2x-1[/latex].
Since the boundary line is graphed with a solid line, the inequality includes the equal sign.
The graph shows the inequality [latex]y > 2x-1[/latex].
We could use any point as a test point, provided it is not on the line. Why did we choose [latex](0,0)[/latex]? Because it’s the easiest to evaluate. You may want to pick a point on the other side of the boundary line and check that [latex]y \lt 2x-1[/latex].
Graph Linear Inequalities in Two Variables
The steps we take to graph a linear inequality are summarized here.
- Identify and graph the boundary line.
- If the inequality is [latex]\leq[/latex] or [latex]\geq[/latex], the boundary line is solid.
- If the inequality is [latex]\lt[/latex] or [latex]>[/latex], the boundary line is dashed.
- Test a point that is not on the boundary line. Is it a solution of the inequality?
- Shade in one side of the boundary line.
- If the test point is a solution, shade in the side that includes the point.
- If the test point is not a solution, shade in the opposite side.
Example 3
Graph the linear inequality: [latex]y\ge\frac{3}{4}x-2[/latex].
Exercise 2
Graph the linear inequality: [latex]y>\frac{5}{2}x-4[/latex].
Solution
All points in the shaded region and on the boundary line, represent the solutions to [latex]y>\frac{5}{2}x-4[/latex].
Graph the linear inequality: [latex]y \lt \frac{2}{3}x-5[/latex].
Solution
All points in the shaded region, but not those on the boundary line, represent the solutions to [latex]y \lt \frac{2}{3}x-5[/latex].
Example 4
Graph the linear inequality: [latex]x-2y \lt 5[/latex].
First, we graph the boundary line [latex]x-2y = 5[/latex]. The inequality is [latex]\lt[/latex], so we draw a dashed line.
Then, we test a point. We’ll use [latex](0,0)[/latex] again because it is easy to evaluate and it is not on the boundary line.
Is [latex](0,0)[/latex] a solution of [latex]x-2y \lt 5[/latex]?
[latex]\begin{array}{rcl} 0-2(0) & \stackrel{?}{ \lt } & 5\\ 0-0 & \stackrel{?}{ \lt } & 5 \\ 0 & \lt & 5\\ \end{array}[/latex]
The point [latex](0,0)[/latex] is a solution of [latex]x-2y \lt 5[/latex], so we shade in that side of the boundary line.
All points in the shaded region, but not those on the boundary line, represent the solutions to [latex]x-2y \lt 5[/latex].
Exercise 3
Graph the linear inequality: [latex]2x-3y \lt 6[/latex].
Solution
All points in the shaded region, but not those on the boundary line, represent the solutions to [latex]2x-3y \lt 6[/latex].
Graph the linear inequality: [latex]2x-y > 3[/latex].
Solution
All points in the shaded region, but not those on the boundary line, represent the solutions to [latex]2x-y > 3[/latex].
What if the boundary line goes through the origin? Then, we will NOT be able to use [latex](0,0)[/latex] as a test point. No problem—we’ll just choose some other point that is not on the boundary line.
Example 5
Graph the linear inequality: [latex]y \leq -4x[/latex].
First, we graph the boundary line [latex]y=-4x[/latex]. It is in slope–intercept form, with [latex]m=-4[/latex] and [latex]b=0[/latex]. The inequality is [latex]\leq[/latex], so we draw a solid line.
Now we need a test point. We can see that the point [latex](1,0)[/latex] is not on the boundary line.
Is [latex](1,0)[/latex] a solution of [latex]y \leq -4x[/latex]?
[latex]\begin{array}{rcl} 0 & \stackrel{?}{ \leq } & -4(1)\\ 0 & \stackrel{?}{ \nleq } & -4 \\ \end{array}[/latex]
The point [latex](1,0)[/latex] is not a solution to [latex]y \leq -4x[/latex], so we shade in the opposite side of the boundary line.
All points in the shaded region and on the boundary line represent the solutions to [latex]y \leq -4x[/latex].
Exercise 4
Graph the linear inequality: [latex]y>-3x[/latex].
Solution
All points in the shaded region, but not those on the boundary line, represent the solutions to [latex]y>-3x[/latex].
Graph the linear inequality: [latex]y \geq -2x[/latex].
Solution
All points in the shaded region and on the boundary line, represent the solutions to [latex]y \geq -2x[/latex].
Some linear inequalities have only one variable. They may have an [latex]x[/latex] but no [latex]y[/latex] or a [latex]y[/latex] but no [latex]x[/latex]. In these cases, the boundary line will be either a vertical or a horizontal line.
Recall that:
[latex]\begin{array}{ll} x=a & \text{vertical line}\\ y=b & \text{horizontal line}\\ \end{array}[/latex]
Example 6
Graph the linear inequality: [latex]y > 3[/latex].
First, we graph the boundary line [latex]y=3[/latex]. It is a horizontal line. The inequality is [latex]>[/latex], so we draw a dashed line.
We test the point [latex](0,0)[/latex].
So [latex](0,0)[/latex] is not a solution to [latex]y>3[/latex].
So we shade the side that does not include [latex](0,0)[/latex] as shown in this graph.
All points in the shaded region, but not those on the boundary line, represent the solutions to [latex]y>3[/latex].
Exercise 5
Graph the linear inequality: [latex]y \lt 5[/latex]
Solution
All points in the shaded region, but not those on the boundary line, represent the solutions to [latex]y \lt 5[/latex].
Graph the linear inequality: [latex]y \leq -1[/latex]
Solution
All points in the shaded region and on the boundary line represent the solutions to [latex]y \leq -1[/latex].
Solve Applications Using Linear Inequalities in Two Variables
Many fields use linear inequalities to model a problem. While our examples may be about simple situations, they give us an opportunity to build our skills and to get a feel for how that might be used.
Example 7
Hilaria works two part-time jobs in order to earn enough money to meet her obligations of at least $240 a week. Her job in food service pays $10 an hour, and her tutoring job on campus pays $15 an hour. How many hours does Hilaria need to work at each job to earn at least $240?
a) Let [latex]x[/latex] be the number of hours she works at the job in food service, and let [latex]y[/latex] be the number of hours she works tutoring. Write an inequality that would model this situation.
We let [latex]x[/latex] be the number of hours she works at the job in food service and let [latex]y[/latex] be the number of hours she works tutoring.
She earns $10 per hour at the job in food service and $15 an hour tutoring. At each job, the number of hours multiplied by the hourly wage will give the amount earned at that job.
[latex]\begin{array}{cccc} \text{Amount she earned at } & \text{ } & \text{the amount} & \text{is at }\\ \text{the food service job} & \text{plus} & \text{earned tutoring} & \text{least} & $240\\ 10x & + & 15y & \ge & 240\\ \end{array}[/latex]
b) Graph the inequality.
To graph the inequality, we put it in slope–intercept form.
[latex]\begin{array}{rcl} 10x+15y & \geq & 240\\ 15y & \geq & -10x+240\\ y & \geq & -\frac{2}{3}x+16\\ \end{array}[/latex]
c) Find three ordered pairs [latex](x,y)[/latex] that would be solutions to the inequality. Then, explain what that means for Hilaria.
From the graph, we see that the ordered pairs [latex](15,10)[/latex], [latex](0,16)[/latex], and [latex](24,0)[/latex] represent three of infinitely many solutions. Check the values in the inequality.
[latex]\begin{array}{rclcrclcrcl} (15,10)& & & & (0,16) & & & & (24,0)\\ 10x-15y & \geq & 240 & & 10x+15y & \geq & 240 & & 10x+15y & \geq & 240\\ 10({15})-15({10}) & \geq & 240 & & 10({0})+15({16}) & \geq & 240 & & 10({24})+15({0}) & \geq & 240\\ 300 & \geq & 240 \text{ True} & & 240 & \geq & 240 \text{ True} & & 240 & \geq & 240 \text{ True}\\ \end{array}[/latex]
For Hilaria, it means that to earn at least $240, she can work 15 hours tutoring and 10 hours at her food service job, earn all her money tutoring for 16 hours, or earn all her money while working 24 hours at the job in food service.
Exercise 6
Hugh works two part-time jobs. One is at a grocery store that pays $10 an hour, and the other is babysitting for $13 an hour. Between the two jobs, Hugh wants to earn at least $260 a week. How many hours does Hugh need to work at each job to earn at least $260?
a) Let x be the number of hours he works at the grocery store and let y be the number of hours he works babysitting. Write an inequality that would model this situation.
b) Graph the inequality.
c) Find three ordered pairs [latex](x,y)[/latex] that would be solutions to the inequality. Then, explain what that means for Hugh.
Solution
a) [latex]10x+13y \geq 260[/latex]
b)
c) Answers will vary.
Veronica works two part-time jobs in order to earn enough money to meet her obligations of at least $280 a week. Her job at the day spa pays $10 an hour and her administrative assistant job on campus pays $17.50 an hour. How many hours does Veronica need to work at each job to earn at least $280?
a) Let x be the number of hours she works at the day spa and let y be the number of hours she works as an administrative assistant. Write an inequality that would model this situation.
b) Graph the inequality.
c) Find three ordered pairs (x, y) that would be solutions to the inequality. Then, explain what that means for Veronica.
Solution
a) [latex]10x+17.5y \geq 280[/latex]
b)
c) Answers will vary.
Access this online resource for additional instruction and practice with graphing linear inequalities in two variables.
Media Attributions
- 3.2 01 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 02 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 03 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 04 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 05 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 06 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 07 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 8a © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 8b © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 8c © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 09 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 10 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 11 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 12 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 13 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 14 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 15 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 16 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 17 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 18 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 19 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 20 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 21 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 22 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 23 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
- 3.2 24 © OpenStax Intermediate Algebra 2e. is licensed under a CC BY (Attribution) license
A linear inequality is an inequality that can be written in one of the following forms: [latex]Ax+By > C[/latex], [latex]Ax+By \geq C[/latex], [latex]Ax+By C[/latex], or [latex]Ax+By \leq C[/latex], where A and B are not both zero.
An ordered pair [latex](x,y)[/latex] is a solution to a linear inequality if the inequality is true when we substitute the values of x and y.
The line with equation [latex]Ax+By=C[/latex] is the boundary line that separates the region where [latex]Ax+By > C[/latex] from the region where [latex]Ax+By