This site is a work in progress. New lessons are added regularly. Contact us

Graphing Inequalities

Learning goals

  • Draw the boundary dashed for strict and solid for inclusive
  • Shade the half-plane a test point proves true
  • Use the origin as the test point unless the line passes through
  • Recognize x>cx > c as a vertical boundary and ycy \le c as horizontal
  • Keep only the overlap for a system, the feasible region

The boundary line and the two half-planes

Every two-variable linear inequality has a matching equation, the one you get by replacing its inequality symbol with an equals sign. The graph of that equation is a straight line, and this line is the boundary of the solution region. It earns the name honestly: it is the exact border between the pairs that satisfy the inequality and the pairs that do not. Replacing >> with == in y>2x+1y > 2x + 1 gives y=2x+1y = 2x + 1, a line you can graph in seconds from its slope and intercept.

A single line splits the plane into two pieces, one on each side, and each piece is a half-plane. The boundary is the crease between them. The solutions of the inequality are exactly one of those two half-planes, never a mix of the two. That clean split between the two half-planes is what makes graphing an inequality quick. To see why an entire side either works or fails together, look at what the inequality is really measuring.

Why one whole side satisfies the inequality#

Put the inequality in the form y>mx+by > mx + b, solving for yy first if it is not already there. Pick any input xx. On the boundary line the height at that input is exactly mx+bmx + b. A point (x,y)(x, y) sitting at that same input lies above the line when its height yy is greater than mx+bmx + b, and below the line when yy is less. So the quantity

y(mx+b),y - (mx + b),

the signed vertical distance from the line up to the point, is positive at every point above the line. That distance is zero at every point on the line, and negative at every point below it. The inequality y>mx+by > mx + b is nothing more than the statement that this quantity is positive. The inequality is therefore true at every single point of the upper half-plane and false at every single point of the lower one. The boundary line is the only place where the verdict switches. The sign of y(mx+b)y - (mx + b) cannot change without passing through zero, and that quantity reaches zero only on the line. So you cannot move from a solution to a non-solution without crossing the boundary. That is exactly why testing one point settles its whole side at once. A vertical boundary x=cx = c behaves the same way through the horizontal distance xcx - c, and a standard-form inequality Ax+ByCAx + By \le C through the quantity Ax+ByCAx + By - C. Each of those is again a single number that is zero on the line and one fixed sign on each side.

Picking the side with a test point

The proof hands you a shortcut. Because a whole side shares one verdict, you never have to reason about “above” or “below” yourself. Choose any point that is not on the boundary, substitute its coordinates into the original inequality, and check whether the statement comes out true. If it is true, that point is a solution, so shade the entire side it sits on. If it is false, the solutions are on the other side, so shade that one instead. A single substitution decides everything.

The handiest test point is almost always the origin (0,0)(0, 0), because setting x=0x = 0 and y=0y = 0 collapses most of the arithmetic to nothing. The one time you cannot use the origin is when the boundary passes through it. Then (0,0)(0, 0) lies on the line, so the substitution returns a boundary result instead of a clear true or false. In that case pick another easy off-line point, such as (1,0)(1, 0) or (0,1)(0, 1).

One more decision fixes how you draw the boundary. If the inequality is strict, << or >>, the points on the line are not solutions. Then draw the boundary as a dashed line to show that the line is excluded. If the inequality is inclusive, \le or \ge, the points on the line do satisfy it. Then draw the boundary solid to show that the line is part of the answer. You read this straight off the symbol, exactly like the open or filled circle you used on the number line.

Worked example 1 Graph y>2x+1y > 2x + 1

Start with the boundary. Replacing >> with == gives y=2x+1y = 2x + 1, a line with slope 22 and yy-intercept (0,1)(0, 1). Plot (0,1)(0, 1), step up 22 and right 11 to (1,3)(1, 3), and draw the line. The symbol is strict, so make it dashed: the points on the line are not part of the solution.

Now pick the side. Test the origin (0,0)(0, 0), which is not on the line, in the original inequality:

0>2(0)+10>1,0 > 2(0) + 1 \quad\Longrightarrow\quad 0 > 1,

which is false. The origin is not a solution, so the solutions lie on the other side. Shade the half-plane that does not contain the origin, the region above the line.

The graph of y greater than 2x plus 1A dashed line y = 2x + 1 with the region above it shaded, and the origin marked as a test point that does not satisfy the inequality.xy1(0, 0)y > 2x + 1
The graph of y > 2x + 1. The boundary y = 2x + 1 is dashed because the inequality is strict, and the shaded half-plane above it holds every solution. The origin (0, 0) fails the test 0 > 1, so it lies in the unshaded side.

The finished graph is a dashed line with the region above it shaded. As a check, the point (2,0)(-2, 0) is in the shaded region, and the original reads 0>2(2)+1=30 > 2(-2) + 1 = -3, which is true. The unshaded point (2,0)(2, 0), by contrast, gives 0>2(2)+1=50 > 2(2) + 1 = 5, and 0>50 > 5 is false.

Worked example 2 Graph 3x+2y63x + 2y \le 6

The boundary is 3x+2y=63x + 2y = 6, quickest from its intercepts. Setting y=0y = 0 gives 3x=63x = 6, so x=2x = 2 and the xx-intercept is (2,0)(2, 0). Setting x=0x = 0 gives 2y=62y = 6, so y=3y = 3 and the yy-intercept is (0,3)(0, 3). Draw the line through those two points. The symbol is \le, which is inclusive, so make the line solid: the points on it are solutions too.

Test the origin in the original inequality:

3(0)+2(0)606,3(0) + 2(0) \le 6 \quad\Longrightarrow\quad 0 \le 6,

which is true. The origin is a solution, so shade the side that contains it, the region below the line.

The graph of 3x plus 2y at most 6A solid line 3x + 2y = 6 with the region below it shaded, containing the origin test point, and the intercepts (2, 0) and (0, 3) marked.xy23(2, 0)(0, 3)(0, 0)3x + 2y ≤ 6
The graph of 3x + 2y ≤ 6. The boundary is solid because the inequality is inclusive, and the shaded half-plane below it, the side containing the origin, is the solution. The intercepts (2, 0) and (0, 3) fix the line.

Notice you never had to solve for yy or decide for yourself what “below” means. The test point did that work. As a check, the origin we tested is shaded. A point on the far side such as (4,4)(4, 4) gives 3(4)+2(4)=203(4) + 2(4) = 20, and 20620 \le 6 is false, so that point is correctly left unshaded.

Check your understanding

To graph yx+4y \ge -x + 4, how should you draw the boundary line, and does the origin (0,0)(0, 0) lie in the shaded region?

Answer choices

Horizontal and vertical boundaries

Two special inequalities have boundaries that run straight across or straight up and down, yet nothing about the method changes. An inequality in xx alone, such as x>2x > -2, has the vertical boundary x=2x = -2. An inequality in yy alone, such as y1y \le 1, has the horizontal boundary y=1y = 1. Draw the boundary dashed or solid from the symbol as always, then test a point.

For x>2x > -2 the boundary is the vertical line two units left of the yy-axis, drawn dashed because the symbol is strict. Testing the origin gives 0>20 > -2, which is true, so shade the side holding the origin, everything to the right of the line.

The graph of x greater than negative 2A dashed vertical line x = -2 with the half-plane to its right shaded, containing the origin.xy-2(0, 0)x > -2
The graph of x > -2. The vertical boundary x = -2 is dashed, and everything to its right, the side holding the origin, is shaded.

For y1y \le 1 the boundary is the horizontal line one unit above the xx-axis, drawn solid because \le is inclusive. Testing the origin gives 010 \le 1, which is true, so shade the side holding the origin, everything on or below the line.

The graph of y at most 1A solid horizontal line y = 1 with the half-plane below it shaded, containing the origin.xy1(0, 0)y ≤ 1
The graph of y ≤ 1. The horizontal boundary y = 1 is solid, and everything on or below it, the side holding the origin, is shaded.

There is a quick sense-check for the shading. The statement x>2x > -2 says ”xx is greater than 2-2,” and greater xx lies to the right, so the region opens rightward. In the same way y1y \le 1 says ”yy is at most 11,” and smaller yy lies downward, so the region opens downward. The test point confirms it, but the words already point the right way.

Checking whether a point is a solution

Reading a graph in the other direction matters just as much: given a point, is it in the solution region? Substitute its coordinates into the inequality and see whether the statement is true. If it is, the point is a solution and lies in the shaded region; if not, it lies outside. The only case that needs care is a point landing exactly on the boundary line. There the inequality becomes an equality, so the point counts as a solution only when the boundary is solid (\le or \ge). The point is not a solution when the boundary is dashed (<< or >>).

Worked example 3 Test three points against y2x1y \ge 2x - 1

Check each point by substituting it into y2x1y \ge 2x - 1 and judging the result.

The point (3,4)(3, 4): the right side is 2(3)1=52(3) - 1 = 5, so the statement is 454 \ge 5, which is false. This point is not a solution.

The point (1,2)(-1, 2): the right side is 2(1)1=32(-1) - 1 = -3, so the statement is 232 \ge -3, which is true. This point is a solution.

The point (2,3)(2, 3): the right side is 2(2)1=32(2) - 1 = 3, so the statement is 333 \ge 3, which is true. This point sits exactly on the boundary line, and because the symbol is \ge the boundary is solid and its points count, so (2,3)(2, 3) is a solution.

(3,4) is false,(1,2) is true,(2,3) is true on a solid edge.(3, 4)\text{ is false}, \qquad (-1, 2)\text{ is true}, \qquad (2, 3)\text{ is true on a solid edge}.

Had the inequality been the strict y>2x1y > 2x - 1, the point (2,3)(2, 3) would give 3>33 > 3, which is false, and it would not be a solution. The boundary is the one place where the dashed-or-solid distinction changes the answer.

Check your understanding

Is the point (1,2)(1, -2) a solution of 3xy<53x - y < 5?

Answer choices

Systems of linear inequalities

A system of linear inequalities asks for the points that satisfy several inequalities at the same time. Each inequality on its own shades a half-plane. A point that works for the whole system has to lie in every one of those half-planes at once. The solution of the system is therefore the region where all the shaded half-planes overlap. That common region is called the feasible region, and every point inside it satisfies every inequality in the system.

Graph a system by shading each inequality’s half-plane, then keeping only the part they all share. With two inequalities you look for the overlap of two half-planes; with three you look for the overlap of three, and so on. Testing the origin in each inequality is still the fastest way to orient the individual half-planes before you find where they meet.

Worked example 4 Graph the system y>x1y > x - 1 and yx+3y \le -x + 3

Handle one inequality at a time, then take the overlap.

The first inequality y>x1y > x - 1 has boundary y=x1y = x - 1, a line with slope 11 and yy-intercept (0,1)(0, -1). The symbol is strict, so the line is dashed. Testing the origin, 0>010 > 0 - 1 is 0>10 > -1, which is true, so shade the side containing the origin, above this line.

The second inequality yx+3y \le -x + 3 has boundary y=x+3y = -x + 3, slope 1-1 and yy-intercept (0,3)(0, 3). The symbol is inclusive, so the line is solid. Testing the origin, 00+30 \le -0 + 3 is 030 \le 3, which is true, so shade the side containing the origin, below this line.

The two boundaries cross where x1=x+3x - 1 = -x + 3, that is 2x=42x = 4, so x=2x = 2 and then y=1y = 1: the point (2,1)(2, 1). The feasible region is the wedge that is above the dashed line and below the solid line at the same time.

The overlap of two linear inequalitiesA dashed line y = x - 1 and a solid line y = -x + 3 crossing at (2, 1); the region above the dashed line and below the solid line is shaded, containing the origin.xy2(2, 1)(0, 0)
The system y > x - 1 (dashed) and y ≤ -x + 3 (solid). The shaded wedge is the overlap of the two half-planes, the feasible region, and it contains the origin. The boundaries cross at (2, 1).

The origin sits inside the overlap, which agrees with both tests coming out true. A point in only one of the half-planes, such as (3,3)(3, 3), fails the system. That point gives 3>23 > 2, true for the first inequality, but 303 \le 0, false for the second, so the point is left out of the feasible region.

Worked example 5 Graph the system x0x \ge 0, y0y \ge 0, and x+y4x + y \le 4

The first two inequalities are the special vertical and horizontal kind. The region x0x \ge 0 is on or to the right of the yy-axis, and y0y \ge 0 is on or above the xx-axis. Together they pin everything to the first quadrant. Both boundaries are solid, since both symbols are inclusive.

The third inequality x+y4x + y \le 4 has boundary x+y=4x + y = 4, the line through (4,0)(4, 0) and (0,4)(0, 4), drawn solid. Testing the origin gives 040 \le 4, which is true, so its half-plane is the side toward the origin, below the line.

Overlapping all three leaves a triangle. Its edges are the two axes and the line x+y=4x + y = 4, and its three corners, where the boundaries meet in pairs, are (0,0)(0, 0), (4,0)(4, 0), and (0,4)(0, 4).

The feasible region of a three-inequality systemThe triangle with corners (0, 0), (4, 0), (0, 4) shaded, bounded by the two axes and the solid line x + y = 4, with an interior point (1, 1) marked.xy(0, 0)(4, 0)(0, 4)(1, 1)x + y ≤ 4
The feasible region of x ≥ 0, y ≥ 0, and x + y ≤ 4 is the shaded triangle bounded by the two axes and the solid line x + y = 4. Its corners are (0, 0), (4, 0), and (0, 4), and the interior point (1, 1) satisfies all three.

Every point of this triangle satisfies all three inequalities. The interior point (1,1)(1, 1), for instance, has 101 \ge 0, then 101 \ge 0, and then 1+1=241 + 1 = 2 \le 4, all true. A point just outside, such as (3,3)(3, 3), has 3+3=643 + 3 = 6 \le 4 false, so it is not in the feasible region even though it clears the first two conditions. A bounded region like this triangle, described by its edges and its corner points, is exactly the picture the next lesson builds on.

Check your understanding

Which point lies in the feasible region of the system y<3y < 3 and y>xy > x?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (Optional)

One inequality in two variables is easy enough to draw once you know the trick. A list of twenty is another matter, and for a long time nobody thought to ask what such a list looks like.

Joseph Fourier asked, in the eighteen twenties. Fourier is remembered for explaining how heat creeps through a solid. That is work about waves and sums, not about shaded corners of a plane. But he also studied long lists of linear inequalities. He treated a whole list as one object. Each inequality slices the available space in two and throws one part away. What survives every slice is the region. Fourier wanted to know what a region of that kind can look like.

He also found a way to squeeze one variable out of the list at a time. It works much as you eliminate a variable from a system of equations. The procedure is slow, and for a century almost nobody had a use for it. What lasted was the picture underneath. A pile of demands has a shape, and you can point at it.

That picture is the whole of this lesson. Every half-plane you shaded is one slice, and the feasible region is what all the slices left behind.