Skip to content
Graphing Systems of Linear Inequalities

Graphing Systems of Linear Inequalities

By the end of this section, you will be able to: determine whether an ordered pair is a solution of a system of linear inequalities, solve a system of linear inequalities by graphing, and solve applications of systems of inequalities.

Determine whether an ordered pair is a solution of a system of linear inequalities

The definition of a system of linear inequalities is very similar to the definition of a system of linear equations.

System of linear inequalities. Two or more linear inequalities grouped together form a system of linear inequalities.

A system of linear inequalities looks like a system of linear equations, but it has inequalities instead of equations. A system of two linear inequalities is shown here:

{x+4y103x2y<12 \left\{\begin{array}{l} x+4y\geq10 \\ 3x-2y<12 \end{array}\right.

To solve a system of linear inequalities, we will find values of the variables that are solutions to both inequalities. We solve the system by using the graphs of each inequality and show the solution as a graph. We will find the region on the plane that contains all ordered pairs (x,y)(x,y) that make both inequalities true.

Solutions of a system of linear inequalities. Solutions of a system of linear inequalities are the values of the variables that make all the inequalities true. The solution of a system of linear inequalities is shown as a shaded region in the x,yx,y coordinate system that includes all the points whose ordered pairs make the inequalities true.

To determine if an ordered pair is a solution to a system of two inequalities, we substitute the values of the variables into each inequality. If the ordered pair makes both inequalities true, it is a solution to the system.

Example. Determine whether the ordered pair is a solution to the system {x+4y103x2y<12\left\{\begin{array}{l} x+4y\geq10 \\ 3x-2y<12 \end{array}\right.: (a) (2,4)(-2,4) (b) (3,1)(3,1).

(a) Is the ordered pair (2,4)(-2,4) a solution? We substitute x=2x=-2 and y=4y=4 into both inequalities.

x+4y102+4(4)?101410 true3x2y<123(2)2(4)<?1214<12 true \begin{array}{rcl} x+4y &\geq& 10 \\[4pt] -2+4(4) &\overset{?}{\geq}& 10 \\[4pt] 14 &\geq& 10\ \text{true} \end{array} \qquad \begin{array}{rcl} 3x-2y &<& 12 \\[4pt] 3(-2)-2(4) &\overset{?}{<}& 12 \\[4pt] -14 &<& 12\ \text{true} \end{array}

(2,4)(-2,4) made both inequalities true. Therefore (2,4)(-2,4) is a solution to this system.

(b) Is the ordered pair (3,1)(3,1) a solution? We substitute x=3x=3 and y=1y=1 into both inequalities.

x+4y103+4(1)?10710 false3x2y<123(3)2(1)<?127<12 true \begin{array}{rcl} x+4y &\geq& 10 \\[4pt] 3+4(1) &\overset{?}{\geq}& 10 \\[4pt] 7 &\geq& 10\ \text{false} \end{array} \qquad \begin{array}{rcl} 3x-2y &<& 12 \\[4pt] 3(3)-2(1) &\overset{?}{<}& 12 \\[4pt] 7 &<& 12\ \text{true} \end{array}

(3,1)(3,1) made one inequality true, but the other one false. Therefore (3,1)(3,1) is not a solution to this system.

For the system {y>4x24xy<20\left\{\begin{array}{l} y>4x-2 \\ 4x-y<20 \end{array}\right., determine whether each ordered pair is a solution.

Is the ordered pair (2,1)(-2,1) a solution to the system {y>4x24xy<20\left\{\begin{array}{l} y>4x-2 \\ 4x-y<20 \end{array}\right.?

Is the ordered pair (4,1)(4,-1) a solution to the system {y>4x24xy<20\left\{\begin{array}{l} y>4x-2 \\ 4x-y<20 \end{array}\right.?

Solve a system of linear inequalities by graphing

The solution to a single linear inequality is the region on one side of the boundary line that contains all the points that make the inequality true. The solution to a system of two linear inequalities is a region that contains the solutions to both inequalities. To find this region, we will graph each inequality separately and then locate the region where they are both true. The solution is always shown as a graph.

Example. How to solve a system of linear inequalities by graphing. Solve the system by graphing: {y2x1y<x+1\left\{\begin{array}{l} y\geq2x-1 \\ y<x+1 \end{array}\right..

Step 1. Graph the first inequality. We graph the boundary line y=2x1y=2x-1. It is a solid line because the inequality sign is \geq. We choose (0,0)(0,0) as a test point. Since 02(0)10\geq2(0)-1 is true, (0,0)(0,0) is a solution, so we shade in the side of the boundary line that contains (0,0)(0,0).

Step 2. On the same grid, graph the second inequality. We graph the boundary line y=x+1y=x+1. It is a dashed line because the inequality sign is <<. Testing (0,0)(0,0) again: since 0<0+10<0+1 is true, we shade in the side of this boundary line that also contains (0,0)(0,0).

xy−8−6−4−22468−8−6−4−22468

Step 3. The solution is the region where the shading overlaps. The point where the boundary lines intersect, (2,3)(2,3), is not included in the solution, since it is not a solution to y<x+1y<x+1. The solution is the region shaded twice, which appears as the darkest region in the graph.

Step 4. Check by choosing a test point. We’ll use (1,1)(-1,-1).

Check the point (1,1)(-1,-1) in the system {y2x1y<x+1\left\{\begin{array}{l} y\geq2x-1 \\ y<x+1 \end{array}\right.: substitute it into y2x1y\geq2x-1 and simplify the right side.

Solve a system of linear inequalities by graphing.

  1. Graph the first inequality.
    • Graph the boundary line.
    • Shade in the side of the boundary line where the inequality is true.
  2. On the same grid, graph the second inequality.
    • Graph the boundary line.
    • Shade in the side of that boundary line where the inequality is true.
  3. The solution is the region where the shading overlaps.
  4. Check by choosing a test point.

Example. Solve the system by graphing: {xy>3y<15x+4\left\{\begin{array}{l} x-y>3 \\ y<-\tfrac{1}{5}x+4 \end{array}\right..

Graph xy>3x-y>3 by graphing xy=3x-y=3 and testing a point. The intercepts are x=3x=3 and y=3y=-3, and the boundary line will be dashed. We test (0,0)(0,0), which makes the inequality false, so we shade the side that does not contain (0,0)(0,0).

Graph y<15x+4y<-\tfrac{1}{5}x+4 by graphing y=15x+4y=-\tfrac{1}{5}x+4 using the slope m=15m=-\tfrac{1}{5} and yy-intercept b=4b=4. The boundary line will be dashed. We test (0,0)(0,0), which makes the inequality true, so we shade the side that contains (0,0)(0,0).

xy−8−6−4−22468−8−6−4−22468

The point where the two lines intersect is not included in the solution, since both boundary lines are dashed. The solution is the area shaded twice — which appears as the darkest shaded region.

Example. Solve the system by graphing: {x2y<5y>4\left\{\begin{array}{l} x-2y<5 \\ y>-4 \end{array}\right..

Graph x2y<5x-2y<5 by graphing x2y=5x-2y=5 and testing a point. The intercepts are x=5x=5 and y=2.5y=-2.5, and the boundary line will be dashed. We test (0,0)(0,0), which makes the inequality true, so we shade the side that contains (0,0)(0,0).

Graph y>4y>-4 by graphing y=4y=-4 and recognizing that it is a horizontal line through y=4y=-4. The boundary line will be dashed. We test (0,0)(0,0), which makes the inequality true, so we shade the side that contains (0,0)(0,0).

xy−8−6−4−22468−8−6−4−22468

The point (0,0)(0,0) is in the solution, as we already found it to be a solution of each inequality. The point of intersection of the two lines is not included, since both boundary lines are dashed. The solution is the area shaded twice — which appears as the darkest shaded region.

Systems of linear inequalities where the boundary lines are parallel might have no solution. We’ll see this in the next example.

Example. Solve the system by graphing: {4x+3y12y<43x+1\left\{\begin{array}{l} 4x+3y\geq12 \\ y<-\tfrac{4}{3}x+1 \end{array}\right..

Graph 4x+3y124x+3y\geq12 by graphing 4x+3y=124x+3y=12 and testing a point. The intercepts are x=3x=3 and y=4y=4, and the boundary line will be solid. We test (0,0)(0,0), which makes the inequality false, so we shade the side that does not contain (0,0)(0,0).

Graph y<43x+1y<-\tfrac{4}{3}x+1 by graphing y=43x+1y=-\tfrac{4}{3}x+1 using the slope m=43m=-\tfrac{4}{3} and yy-intercept b=1b=1. The boundary line will be dashed. We test (0,0)(0,0), which makes the inequality true, so we shade the side that contains (0,0)(0,0).

xy−8−6−4−22468−8−6−4−22468

There is no point in both shaded regions, so this system has no solution.

Does the system {4x+3y12y<43x+1\left\{\begin{array}{l} 4x+3y\geq12 \\ y<-\tfrac{4}{3}x+1 \end{array}\right. have a solution?

Some systems of linear inequalities where the boundary lines are parallel will have a solution. We’ll see this in the next example.

Example. Solve the system by graphing: {y>12x4x2y<4\left\{\begin{array}{l} y>\tfrac{1}{2}x-4 \\ x-2y<-4 \end{array}\right..

Graph y>12x4y>\tfrac{1}{2}x-4 by graphing y=12x4y=\tfrac{1}{2}x-4 using the slope m=12m=\tfrac{1}{2} and the intercept b=4b=-4. The boundary line will be dashed. We test (0,0)(0,0), which makes the inequality true, so we shade the side that contains (0,0)(0,0).

Graph x2y<4x-2y<-4 by graphing x2y=4x-2y=-4 and testing a point. The intercepts are x=4x=-4 and y=2y=2, and the boundary line will be dashed. We choose a test point in the solution and verify that it is a solution to both inequalities. We test (0,0)(0,0), which makes the inequality false, so we shade the side that does not contain (0,0)(0,0).

xy−8−6−4−22468−8−6−4−22468

No point on the boundary lines is included in the solution, since both lines are dashed. The solution is the region that is shaded twice, which is also the solution to x2y<4x-2y<-4 alone.

For the system {y>12x4x2y<4\left\{\begin{array}{l} y>\tfrac{1}{2}x-4 \\ x-2y<-4 \end{array}\right., what is the yy-intercept of the boundary line x2y=4x-2y=-4?

Solve applications of systems of inequalities

The first thing we’ll need to do to solve applications of systems of inequalities is to translate each condition into an inequality. Then we graph the system, as we did above, to see the region that contains all the solutions. Many situations will be realistic only if both variables are positive, so we add inequalities to the system as additional requirements.

Example. Christy sells photographs at a booth at a street fair. At the start of the day, she wants to display at least 25 photos. Each small photo she displays costs her $4 and each large photo costs her $10, and she doesn’t want to spend more than $200 on photos to display.

(a) Write a system of inequalities to model this situation.

Let x=x= the number of small photos and y=y= the number of large photos. She wants to have at least 25 photos, so the number of small plus the number of large should be at least 25: x+y25x+y\geq25. Each small photo costs $4 and each large photo costs $10, and the total must be no more than $200: 4x+10y2004x+10y\leq200. The number of small and the number of large photos must each be greater than or equal to zero: x0x\geq0, y0y\geq0. We have the system of inequalities:

{x+y254x+10y200x0y0 \left\{\begin{array}{l} x+y\geq25 \\ 4x+10y\leq200 \\ x\geq0 \\ y\geq0 \end{array}\right.

(b) Graph the system. Since x0x\geq0 and y0y\geq0, all solutions will be in the first quadrant, so our graph shows only Quadrant I. To graph x+y25x+y\geq25, graph x+y=25x+y=25 as a solid line; testing (0,0)(0,0) makes the inequality false, so we shade the side that does not contain (0,0)(0,0). To graph 4x+10y2004x+10y\leq200, graph 4x+10y=2004x+10y=200 as a solid line; testing (0,0)(0,0) makes the inequality true, so we shade the side that contains (0,0)(0,0).

xy510152025303540455055510152025303540455055

The solution of the system is the region of the graph that is shaded the darkest. The boundary line sections that border the darkly shaded section are included in the solution, as are the points on the xx-axis from (25,0)(25,0) to (55,0)(55,0).

(c) Could she display 10 small and 20 large photos? We look at the graph to see whether the point (10,20)(10,20) is in the solution region. It is not, so Christy would not display 10 small and 20 large photos.

(d) Could she display 20 small and 10 large photos? We look at the graph to see whether the point (20,10)(20,10) is in the solution region. It is, so Christy could choose to display 20 small and 10 large photos.

When we use variables other than xx and yy to define an unknown quantity, we must change the names of the axes of the graph as well.

Example. Omar needs to eat at least 800 calories before going to his team practice. All he wants is hamburgers and cookies, and he doesn’t want to spend more than $5. At the hamburger restaurant near his college, each hamburger has 240 calories and costs $1.40. Each cookie has 160 calories and costs $0.50.

(a) Write a system of inequalities to model this situation.

Let h=h= the number of hamburgers and c=c= the number of cookies. The calories from the hamburgers, at 240 calories each, plus the calories from the cookies, at 160 calories each, must be more than 800: 240h+160c800240h+160c\geq800. The amount spent on hamburgers, at $1.40 each, plus the amount spent on cookies, at $0.50 each, must be no more than $5.00: 1.40h+0.50c51.40h+0.50c\leq5. The number of hamburgers and the number of cookies must each be greater than or equal to zero: h0h\geq0, c0c\geq0. We have the system of inequalities:

{240h+160c8001.40h+0.50c5h0c0 \left\{\begin{array}{l} 240h+160c\geq800 \\ 1.40h+0.50c\leq5 \\ h\geq0 \\ c\geq0 \end{array}\right.

(b) Graph the system. Since h0h\geq0 and c0c\geq0, our graph shows only Quadrant I. To graph 240h+160c800240h+160c\geq800, graph 240h+160c=800240h+160c=800 as a solid line; testing (0,0)(0,0) makes the inequality false, so we shade the side that does not contain (0,0)(0,0). To graph 1.40h+0.50c51.40h+0.50c\leq5, graph 1.40h+0.50c=51.40h+0.50c=5 as a solid line; testing (0,0)(0,0) makes the inequality true, so we shade the side that contains (0,0)(0,0).

hc123456123456

The solution of the system is the region of the graph that is shaded the darkest.

(c) Could he eat 3 hamburgers and 1 cookie? We look at the graph to see whether the point (3,2)(3,2), three hamburgers and two cookies, is in the solution region. It is, so Omar might choose to eat 3 hamburgers and 1 cookie.

(d) Could he eat 2 hamburgers and 4 cookies? We look at the graph to see whether the point (2,4)(2,4) is in the solution region. It is, so Omar might choose to eat 2 hamburgers and 4 cookies.

Tenison needs to eat at least an extra 1,000 calories a day to prepare for running a marathon. He has only $25 to spend on the extra food he needs and will spend it on $0.75 donuts, which have 360 calories each, and $2 energy drinks, which have 110 calories each.

Let dd be the number of donuts and ee be the number of energy drinks Tenison buys. Write an inequality that models needing at least 1,000 extra calories, given each donut has 360 calories and each energy drink has 110 calories.

Tenison's system is {360d+110e10000.75d+2e25\left\{\begin{array}{l} 360d+110e\geq1000 \\ 0.75d+2e\leq25 \end{array}\right., where dd is the number of donuts and ee is the number of energy drinks. Can he buy 8 donuts and 4 energy drinks and satisfy both his caloric needs and his budget?

Key terms

system of linear inequalities — two or more linear inequalities grouped together. solutions of a system of linear inequalities — the values of the variables that make all the inequalities in the system true, shown as a shaded region in the x,yx,y coordinate system that includes all the points whose ordered pairs make the inequalities true.


This section is adapted from Intermediate Algebra 2e, Section 4.7: Graphing Systems of Linear Inequalities by Lynn Marecek, MaryAnne Anthony-Smith, and Andrea Honeycutt Mathis, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: recreated the coordinate-plane figures as accessible interactive graphs; omitted the Be Prepared quiz, Media links, Self Check, and Section Exercises; and converted the source Try Its into interactive exercises with instant feedback.