Skip to content
Graphs of Linear Inequalities

Graphs of Linear Inequalities

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, and graph linear inequalities.

We have learned how to solve inequalities in one variable. Now we look at inequalities in two variables, which 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 would make a profit.

Verify solutions to an inequality in two variables

Linear inequality. A linear inequality is an inequality that can be written in one of the following forms:

Ax+By>CAx+ByCAx+By<CAx+ByCAx + By > C \qquad Ax + By \geq C \qquad Ax + By < C \qquad Ax + By \leq C

where AA and BB are not both zero.

An inequality in one variable, like x>3x > 3, has many solutions — any number greater than 33 — shown on the number line by shading to the right of 33 with an open circle at 33. Similarly, an inequality in two variables has many solutions: any ordered pair (x,y)(x, y) that makes the inequality true when substituted in is a solution of the inequality.

Solution of a linear inequality. An ordered pair (x,y)(x, y) is a solution of a linear inequality if the inequality is true when we substitute the values of xx and yy.

Example. Determine whether each ordered pair is a solution to the inequality y>x+4y > x + 4: (a) (0,0)(0, 0) (b) (1,6)(1, 6) (c) (2,6)(2, 6) (d) (5,15)(-5, -15) (e) (8,12)(-8, 12).

(a) Substituting x=0,y=0x = 0, y = 0: is 0>0+40 > 0 + 4? Since 040 \not> 4, (0,0)(0, 0) is not a solution.

(b) Substituting x=1,y=6x = 1, y = 6: is 6>1+46 > 1 + 4? Since 6>56 > 5 is true, (1,6)(1, 6) is a solution.

(c) Substituting x=2,y=6x = 2, y = 6: is 6>2+46 > 2 + 4? Since 666 \not> 6, (2,6)(2, 6) is not a solution.

(d) Substituting x=5,y=15x = -5, y = -15: is 15>5+4-15 > -5 + 4? Since 151-15 \not> -1, (5,15)(-5, -15) is not a solution.

(e) Substituting x=8,y=12x = -8, y = 12: is 12>8+412 > -8 + 4? Since 12>412 > -4 is true, (8,12)(-8, 12) is a solution.

Is the ordered pair (4,9)(4, 9) a solution to the inequality y>x3y > x - 3?

Is the ordered pair (2,1)(-2, -1) a solution to the inequality y>x3y > x - 3?

Recognize the relation between the solutions of an inequality and its graph

Just as the point x=3x = 3 separates the number line into the numbers less than 33 and the numbers greater than 33, a line y=x+4y = x + 4 separates the plane into two regions. On one side of the line are the points with y<x+4y < x + 4; on the other side are the points with y>x+4y > x + 4. We call the line y=x+4y = x + 4 a boundary line.

Boundary line. The line with equation Ax+By=CAx + By = C is the boundary line that separates the region where Ax+By>CAx + By > C from the region where Ax+By<CAx + By < C.

For an inequality in one variable, the endpoint is shown with a parenthesis (not included) or a bracket (included). Similarly, for an inequality in two variables, the boundary line is drawn solid or dashed to show whether it is included in the solution.

Boundary lines for linear inequalities

InequalityBoundary line
Ax+By<CAx + By < C or Ax+By>CAx + By > Cnot included — dashed
Ax+ByCAx + By \leq C or Ax+ByCAx + By \geq Cincluded — solid

Points on one side of the boundary line y=x+4y = x + 4 are solutions to y>x+4y > x + 4, and points on the other side are solutions to y<x+4y < x + 4. Any point on the boundary line itself, where y=x+4y = x + 4, is not a solution to y>x+4y > x + 4, so the boundary line is not part of the solution — we draw it dashed. The shaded region shows the solutions to y>x+4y > x + 4.

xyy > x + 4y < x + 4

Example. The boundary line shown is y=2x1y = 2x - 1, drawn as a solid line. Write the inequality shown by the graph.

We test the point (0,0)(0, 0): is 0>2(0)10 > 2(0) - 1, or is 0<2(0)10 < 2(0) - 1? Since 0>10 > -1 is true, (0,0)(0, 0) is on the side of the line where y>2x1y > 2x - 1. Since the boundary line is solid, the inequality includes the equal sign, so the graph shows y2x1y \geq 2x - 1.

A dashed boundary line y=2x+3y = -2x + 3 is graphed, and the region above and to the left of the line is shaded (this region contains the point (0,0)(0, 0)). Write the complete inequality shown by the graph, solved for y.

Graph linear inequalities

Now we put this together to graph linear inequalities.

Graph a linear inequality.

  1. Identify and graph the boundary line.
    • If the inequality is \leq or \geq, the boundary line is solid.
    • If the inequality is << or >>, the boundary line is dashed.
  2. Test a point that is not on the boundary line. Is it a solution of the inequality?
  3. 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. Graph the linear inequality y34x2y \geq \tfrac{3}{4}x - 2.

We graph the boundary line y=34x2y = \tfrac{3}{4}x - 2. Since the inequality is \geq, we draw a solid line. We test (0,0)(0, 0): is 034(0)20 \geq \tfrac{3}{4}(0) - 2? Since 020 \geq -2 is true, (0,0)(0, 0) is a solution, so we shade the side of the boundary line that includes (0,0)(0, 0).

xy

Example. Graph the linear inequality x2y<5x - 2y < 5.

We graph the boundary line x2y=5x - 2y = 5, drawn dashed since the inequality is <<. Testing (0,0)(0, 0): is 02(0)<50 - 2(0) < 5? Since 0<50 < 5 is true, we shade the side that includes (0,0)(0, 0).

If the boundary line passes through the origin, (0,0)(0, 0) cannot be used as a test point — choose any other point not on the line instead.

Example. Graph the linear inequality y4xy \leq -4x.

The boundary line y=4xy = -4x is in slope-intercept form with m=4m = -4 and b=0b = 0; since it passes through the origin, we choose a different test point, such as (1,0)(1, 0). The inequality is \leq, so we draw a solid line. Testing (1,0)(1, 0): is 04(1)0 \leq -4(1)? Since 0≰40 \not\leq -4, (1,0)(1, 0) is not a solution, so we shade the side of the boundary line that does not include (1,0)(1, 0).

Graph the linear inequality y>3xy > -3x by testing the point (1,0)(1, 0). Is (1,0)(1, 0) a solution?

Some linear inequalities have only one variable — an xx but no yy, or a yy but no xx. As with equations, the boundary line is then either a vertical line, x=ax = a, or a horizontal line, y=by = b.

Example. Graph the linear inequality y>3y > 3.

The boundary line y=3y = 3 is horizontal, drawn dashed since the inequality is >>. Testing (0,0)(0, 0): is 0>30 > 3? Since this is false, (0,0)(0, 0) is not a solution, so we shade the side that does not include (0,0)(0, 0) — the region above the line.

xyy = 3

Graph the linear inequality y<=1y <= -1. Is the boundary line solid or dashed? Answer 1 for solid, 0 for dashed.

Key terms

linear inequality — an inequality that can be written as Ax+By>CAx + By > C, Ax+ByCAx + By \geq C, Ax+By<CAx + By < C, or Ax+ByCAx + By \leq C, where AA and BB are not both zero. solution of a linear inequality — an ordered pair (x,y)(x, y) that makes the inequality true when substituted in. boundary line — the line Ax+By=CAx + By = C that separates the plane into the region where Ax+By>CAx + By > C and the region where Ax+By<CAx + By < C; drawn dashed when strict (<< or >>) and solid when the inequality includes equality (\leq or \geq).


This section is adapted from Elementary Algebra 2e, Section 4.7: Graphs 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 boundary-line and shaded-region figures as accessible inline SVGs; condensed the worked examples; omitted the Be Prepared quiz, Media links, Self Check checklist, and Section Exercises; and converted the practice problems (“Try Its”) into interactive exercises with instant feedback.