Graphing Inequalities

Learning goals

  • Draw the boundary dashed for strict and solid for inclusive
  • Choose an off-boundary test point and use it to decide which half-plane to shade
  • Recognize x>cx > c as a vertical boundary and y≤cy \le c as horizontal
  • Check whether a given point, including one on the boundary, is a solution
  • Keep only the overlap for a system, the feasible region

The boundary line and the two half-planes

For y>2x+1y > 2x+1, replacing >> with == gives y=2x+1y=2x+1. This line is the boundary between solutions and non-solutions. Graph it using its slope and intercept.

More generally, we graph inequalities such as Ax+By≤CAx+By \le C, where AA and BB are not both zero. The matching equation Ax+By=CAx+By=C is a line. If both coefficients were zero, we would instead have a constant statement, such as 0≤60 \le 6, with no boundary line.

A line splits the plane into two sides, called half-planes. The inequality selects one whole side. An inclusive symbol also includes the boundary. Here is why all the points on one side give the same answer.

Why one whole side satisfies the inequality#

At x=2x=2, the boundary y=2x+1y=2x+1 has height 2(2)+1=52(2)+1=5. The point (2,7)(2,7) sits 22 units above it, so 7>57>5 is true. The point (2,4)(2,4) sits 11 unit below it, so 4>54>5 is false.

Now take any line y=mx+by=mx+b and any input xx. The boundary height there is mx+bmx+b, so

y>mx+b⟺y−(mx+b)>0.y > mx+b \quad\Longleftrightarrow\quad y-(mx+b)>0.

The difference on the right is the vertical gap: positive above the line, zero on it, and negative below it. Thus every point above the line satisfies y>mx+by>mx+b, and every point below it fails. In the same way, y<mx+by<mx+b selects the points below the line, and ≥\ge or ≤\le also keep the line itself.

For Ax+By≤CAx+By \le C with B≠0B\ne0, solve for yy to make this comparison, reversing the symbol if you divide by a negative BB. When B=0B=0, we have A≠0A\ne0 and the vertical boundary x=C/Ax=C/A instead. Dividing by AA, reversing the symbol if AA is negative, compares xx with C/AC/A. Then the horizontal gap x−C/Ax-C/A is positive to the right and negative to the left. In either case, testing one point off the boundary tells you the answer for its whole side.

Picking the side with a test point

Choose a point off the boundary and substitute its coordinates into the original inequality. If the result is true, shade that point’s side. If it is false, shade the other side.

The origin (0,0)(0,0) usually makes the arithmetic easiest. But if it lies on the boundary, its test only tells you whether equality counts; it cannot choose between the two sides. Use another off-line point, such as (1,0)(1,0) or (0,1)(0,1).

Draw the boundary dashed for << or >>: equality is excluded. Draw it solid for ≤\le or ≥\ge: equality is included. This is the same distinction as open and filled circles on a 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)+1⟹0>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+2y≤63x + 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)≤6⟹0≤6,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.

You chose the side with the test point, without solving for yy. To check, try a point on the far side. The point (4,4)(4, 4) gives 3(4)+2(4)=203(4) + 2(4) = 20, and 20≤620 \le 6 is false, so that point is correctly left unshaded.

Check your understanding

To graph y≥−x+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 kinds of inequality have boundaries that run straight across or straight up and down, and you graph them the same way as any other. An inequality in xx alone, such as x>−2x > -2, has the vertical boundary x=−2x = -2. An inequality in yy alone, such as y≤1y \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 y≤1y \le 1 the boundary is the horizontal line one unit above the xx-axis, drawn solid because ≤\le is inclusive. Testing the origin gives 0≤10 \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 y≤1y \le 1 says ”yy is at most 11,” and smaller yy lies downward, so the region opens downward. A test point gives the same answer.

Check your understanding

To graph x>0x > 0, how should you draw the boundary, why can't you use the origin as the test point, and which side should you shade?

Answer choices

Checking whether a point is a solution

To check a point, substitute its coordinates into the inequality. A true statement means the point belongs to the solution region. On the boundary, the two sides are equal: ≤\le and ≥\ge accept the point, while << and >> reject it.

Worked example 3 Test three points against y≥2x−1y \ge 2x - 1

Check each point by substituting it into y≥2x−1y \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 4≥54 \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 2≥−32 \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 3≥33 \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.

Had the inequality been the strict y>2x−1y > 2x - 1, the point (2,3)(2, 3) would give 3>33 > 3, which is false, and it would not be a solution. Whether the line is dashed or solid matters only for points on the boundary itself.

Check your understanding

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

Answer choices

Systems of linear inequalities

A system asks for points satisfying all its inequalities at once. Graph each half-plane, then keep their common part, called the feasible region. A point that lies in some of the shaded half-planes but not all of them fails at least one inequality, so it is left out.

A feasible region need not have any area at all. The conditions y≥xy\ge x and y≤xy\le x leave only the line y=xy=x. The conditions y>xy>x and y<xy<x have no common points, so their feasible region is empty.

Test a point separately for each inequality. The origin may be off one boundary but on another; choose a different test point whenever it lies on the boundary you are handling.

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

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

The first inequality y>x−1y > x - 1 has boundary y=x−1y = 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>0−10 > 0 - 1 is 0>−10 > -1, which is true, so shade the side containing the origin, above this line.

The second inequality y≤−x+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, 0≤−0+30 \le -0 + 3 is 0≤30 \le 3, which is true, so shade the side containing the origin, below this line.

The two boundaries cross where x−1=−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). That crossing point sits on the dashed boundary y=x−1y = x - 1, so it marks where the two lines meet, not a solution of the system; it is excluded because the first inequality is strict. 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. The crossing point (2, 1) is hollow, not filled, because it lies on the dashed boundary and is excluded from the feasible region.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), marked with a hollow circle because that point sits on the dashed boundary and is excluded.

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 3≤03 \le 0, false for the second, so the point is left out of the feasible region.

Worked example 5 Graph the system x≥0x \ge 0, y≥0y \ge 0, and x+y≤4x + y \le 4

The first two inequalities are the special vertical and horizontal kind. The region x≥0x \ge 0 is on or to the right of the yy-axis, and y≥0y \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+y≤4x + 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 0≤40 \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, or vertices, are (0,0)(0,0), (4,0)(4,0), and (0,4)(0,4). Each is a crossing of two boundaries and satisfies all three inequalities. Always check every condition: crossing two boundaries alone does not guarantee a feasible corner.

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 1≥01 \ge 0, then 1≥01 \ge 0, and then 1+1=2≤41 + 1 = 2 \le 4, all true. A point just outside, such as (3,3)(3, 3), has 3+3=6≤43 + 3 = 6 \le 4 false, so it is not in the feasible region even though it clears the first two conditions.

Adding a condition can shrink this region or leave it unchanged; it cannot add new points. For example, adding x≤2x\le2 removes (4,0)(4,0), even though it is still a crossing of two original boundaries.

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.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems 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)

Joseph Fourier is best known for studying how heat spreads through a solid. In the 18201820s, he also worked on lists of linear inequalities. An equation usually asks for an exact balance; several inequalities describe all the choices still allowed after a list of restrictions.

Fourier developed a way to eliminate one variable at a time from such a list. Pairing upper and lower bounds on that variable leaves conditions on the remaining variables. This gave an algebraic route to questions that also have a geometric picture: what region survives all the restrictions?

He published a short account in 18261826 and planned a fuller treatment as the seventh book of a larger work on analysis. That book was never completed. Even sixty years after Fourier’s death, an editor of his papers thought he had given inequalities too much importance. The study of linear inequalities grew a great deal later on.

Tinne Hoff Kjeldsen’s history of linear inequalities describes Fourier’s papers, the unfinished book, and that later reaction. The author’s full-text copy provides another way to read the study.

Your progress

See all your progress →