Algebra

Graphing Linear Inequalities in Two Variables

Last updated: March 2026 · Intermediate
Before you start

You should be comfortable with:

Real-world applications
💰
Retail & Finance

Discounts, tax, tips, profit margins

📐
Carpentry

Measurements, material estimation, cutting calculations

A linear inequality in two variables looks like a linear equation but uses an inequality symbol instead of an equals sign. Instead of graphing a single line, you graph an entire region — a half-plane of points that satisfy the inequality.

For example, y>2x+1y > 2x + 1 does not describe a line. It describes every point (x,y)(x, y) where the yy-coordinate is greater than 2x+12x + 1. That is an infinite set of points filling one side of the line y=2x+1y = 2x + 1.

The Three-Step Process

Every linear inequality in two variables is graphed using the same three steps:

  1. Graph the boundary line (the related equation)
  2. Choose solid or dashed based on the inequality symbol
  3. Shade the correct side by testing a point

Step 1: Graph the Boundary Line

Replace the inequality symbol with an equals sign and graph that line using any method you know (slope-intercept, intercepts, table of values).

For y>2x+1y > 2x + 1, the boundary line is y=2x+1y = 2x + 1.

This line has slope 2 and yy-intercept 1. Plot the intercept at (0,1)(0, 1), then use the slope to find another point: up 2, right 1 gives (1,3)(1, 3). Draw the line through these points.

Step 2: Solid or Dashed?

The inequality symbol tells you whether points on the boundary line are included in the solution:

SymbolLine StylePoints on Line Included?
<<DashedNo
>>DashedNo
\leqSolidYes
\geqSolidYes

For y>2x+1y > 2x + 1, the symbol is >> (strict), so the boundary line is dashed. Points exactly on the line y=2x+1y = 2x + 1 are not part of the solution.

For y2x+1y \leq 2x + 1, the symbol is \leq (non-strict), so the boundary line would be solid. Points on the line are included.

Step 3: Shade the Correct Side

The boundary line divides the coordinate plane into two half-planes. One side contains the solutions; the other does not. To determine which side to shade, test a point that is not on the boundary line.

The easiest test point is (0,0)(0, 0) — as long as the line does not pass through the origin.

For y>2x+1y > 2x + 1, test (0,0)(0, 0):

0>2(0)+10 > 2(0) + 1 0>10 > 1

This is false, so (0,0)(0, 0) is not in the solution region. Shade the opposite side of the line from (0,0)(0, 0) — that is, shade above the line.

If the test point makes the inequality true, shade the side that contains the test point.

Worked Examples

Example 1: Graph yx+4y \leq -x + 4

Step 1 — Boundary line: y=x+4y = -x + 4. Slope is 1-1, yy-intercept is 4. Points: (0,4)(0, 4) and (4,0)(4, 0).

Step 2 — Line style: The symbol is \leq, so draw a solid line.

Step 3 — Test (0,0)(0, 0):

0(0)+40 \leq -(0) + 4 040 \leq 4 \quad \checkmark

True! Shade the side that contains (0,0)(0, 0) — the region below the line.

Solution region: The solid line through (0,4)(0, 4) and (4,0)(4, 0), with shading below and to the left.

Example 2: Graph 2x+3y>122x + 3y > 12

Step 1 — Boundary line: 2x+3y=122x + 3y = 12. Find intercepts:

  • xx-intercept: set y=0    2x=12    x=6y = 0 \implies 2x = 12 \implies x = 6. Point: (6,0)(6, 0)
  • yy-intercept: set x=0    3y=12    y=4x = 0 \implies 3y = 12 \implies y = 4. Point: (0,4)(0, 4)

Step 2 — Line style: The symbol is >>, so draw a dashed line.

Step 3 — Test (0,0)(0, 0):

2(0)+3(0)>122(0) + 3(0) > 12 0>120 > 12

False. Shade the side that does not contain (0,0)(0, 0) — the region above the line.

Example 3: Graph y12xy \geq \frac{1}{2}x

Step 1 — Boundary line: y=12xy = \frac{1}{2}x. This line passes through the origin with slope 12\frac{1}{2}.

Step 2 — Line style: The symbol is \geq, so draw a solid line.

Step 3 — Test point: Since the line passes through (0,0)(0, 0), choose a different test point. Try (0,2)(0, 2):

212(0)2 \geq \frac{1}{2}(0) 202 \geq 0 \quad \checkmark

True. Shade the side containing (0,2)(0, 2) — the region above the line.

Important: When the boundary passes through the origin, pick any convenient point that is clearly on one side, such as (0,1)(0, 1), (1,0)(1, 0), or (0,1)(0, -1).

Writing Inequalities from Graphs

You can also work backward — given a graph showing a boundary line and shading, write the inequality.

Steps:

  1. Find the equation of the boundary line (use slope and intercept)
  2. Determine if the line is solid (\leq or \geq) or dashed (<< or >>)
  3. Pick a point in the shaded region and test which inequality direction is true

Example 4: Identify the Inequality

A graph shows a dashed line through (0,3)(0, 3) and (3,0)(3, 0) with shading below the line.

Step 1 — Find the equation. Slope: 0330=1\frac{0 - 3}{3 - 0} = -1. The yy-intercept is 3. Equation: y=x+3y = -x + 3.

Step 2 — Dashed line means strict inequality (<< or >>).

Step 3 — Test a point in the shaded region. The shading is below the line, so test (0,0)(0, 0):

0  ?  (0)+30 \; ? \; -(0) + 3 0  ?  30 \; ? \; 3

Since 0<30 < 3 and the shading includes (0,0)(0, 0):

Answer: y<x+3y < -x + 3

Inequalities in Standard Form

When the inequality is in standard form like Ax+ByCAx + By \leq C, you do not need to convert to slope-intercept form to graph it. Just find two points on the boundary line (the intercepts work well), draw the line, and test a point.

Example 5: Graph 3x2y63x - 2y \geq 6

Boundary line: 3x2y=63x - 2y = 6

Intercepts:

  • xx-intercept: 3x=6    x=23x = 6 \implies x = 2. Point: (2,0)(2, 0)
  • yy-intercept: 2y=6    y=3-2y = 6 \implies y = -3. Point: (0,3)(0, -3)

Line style: \geq means solid.

Test (0,0)(0, 0):

3(0)2(0)63(0) - 2(0) \geq 6 060 \geq 6

False. Shade the side that does not contain (0,0)(0, 0) — below and to the right of the line.

Horizontal and Vertical Boundary Lines

Some inequalities produce horizontal or vertical boundary lines.

Horizontal: y3y \leq 3 has boundary line y=3y = 3 (a horizontal line). Shade below the solid line.

Vertical: x>2x > -2 has boundary line x=2x = -2 (a vertical line). Shade to the right of the dashed line.

These are simpler because you don’t need to test a point — the inequality directly tells you which direction to shade.

Systems of Linear Inequalities (Introduction)

A system of linear inequalities is two or more inequalities graphed on the same coordinate plane. The solution is the region where all shaded areas overlap.

Example 6: Graph the System

yx+3y \leq x + 3 y>2x+1y > -2x + 1

Graph each inequality separately:

First inequality: Boundary y=x+3y = x + 3 (solid line, slope 1, yy-intercept 3). Test (0,0)(0, 0): 00+30 \leq 0 + 3 is true, so shade the side containing the origin — below the line.

Second inequality: Boundary y=2x+1y = -2x + 1 (dashed line, slope 2-2, yy-intercept 1). Test (0,0)(0, 0): 0>2(0)+1=10 > -2(0) + 1 = 1 gives 0>10 > 1, which is false. Shade the side not containing the origin — above the line.

Solution region: The area where both shadings overlap. This is a wedge-shaped region above the dashed line and below the solid line. Only points in this overlap region satisfy both inequalities simultaneously.

The two boundary lines intersect where x+3=2x+1x + 3 = -2x + 1, which gives 3x=23x = -2, so x=23x = -\frac{2}{3} and y=73y = \frac{7}{3}. The overlap region extends to the right from near this intersection point.

Real-World Application: Retail — Budget and Inventory Constraints

A small retail shop owner is ordering two types of products for the holiday season:

  • Product A costs $15 per unit
  • Product B costs $25 per unit
  • The total budget is $3,000

The budget constraint is:

15x+25y300015x + 25y \leq 3000

where xx is the number of units of Product A and yy is the number of units of Product B.

Additionally, the shop has limited shelf space for at most 150 total items:

x+y150x + y \leq 150

And both quantities must be non-negative:

x0,y0x \geq 0, \quad y \geq 0

Graphing the budget line: 15x+25y=300015x + 25y = 3000

  • xx-intercept: x=200x = 200 (if only Product A)
  • yy-intercept: y=120y = 120 (if only Product B)

Graphing the shelf space line: x+y=150x + y = 150

  • xx-intercept: x=150x = 150
  • yy-intercept: y=150y = 150

Both are solid lines (non-strict inequalities) with shading toward the origin. The solution region is the area where all four inequalities overlap — a polygon in the first quadrant. Any point (x,y)(x, y) inside this region represents a valid order.

For instance, ordering 80 units of A and 60 units of B: cost is 15(80)+25(60)=1200+1500=2700300015(80) + 25(60) = 1200 + 1500 = 2700 \leq 3000, and total is 80+60=14015080 + 60 = 140 \leq 150. This combination is in the solution region.

Carpentry — Material and Time Constraints

A carpenter builds two types of furniture: tables and bookshelves. Each table requires 6 board-feet of lumber and 3 hours of labor. Each bookshelf requires 4 board-feet and 5 hours. The carpenter has 120 board-feet of lumber and 90 hours available this month.

Let tt = number of tables and bb = number of bookshelves.

Lumber constraint: 6t+4b1206t + 4b \leq 120

Time constraint: 3t+5b903t + 5b \leq 90

Non-negativity: t0,b0t \geq 0, \quad b \geq 0

Graphing these constraints creates a feasible region — the polygon of all possible production combinations. The carpenter can pick any point inside this region. The vertices of the polygon are especially important because they represent the combinations that maximize or minimize objectives like profit (this connects to linear programming, an advanced topic).

For example, making 10 tables and 12 bookshelves: lumber used is 6(10)+4(12)=60+48=1081206(10) + 4(12) = 60 + 48 = 108 \leq 120, time used is 3(10)+5(12)=30+60=90903(10) + 5(12) = 30 + 60 = 90 \leq 90. This point is on the boundary of the feasible region — the carpenter uses all available labor hours.

Common Mistakes to Avoid

  1. Using a solid line for strict inequalities. If the symbol is << or >> (no “equal to” bar), the line must be dashed. Points on the line are not solutions. This is the graphing equivalent of open vs. closed circles on a number line.

  2. Shading the wrong side. Always test a point. The most common error is assuming “greater than” always means “shade above.” This is true when the inequality is solved for yy (e.g., y>2x+1y > 2x + 1), but not when it is in standard form. For y>2x+1-y > 2x + 1, solving for yy gives y<2x1y < -2x - 1, and you shade below.

  3. Testing a point on the boundary line. If the test point is on the line, the result is ambiguous. Choose a point clearly on one side — (0,0)(0, 0) is the best default unless the line passes through the origin.

  4. Forgetting to shade at all. The graph of a linear inequality is a region, not a line. Without shading, your graph is incomplete and represents only the boundary equation, not the inequality.

  5. Confusing the system solution with individual solutions. For a system of inequalities, the solution is only the overlap of all regions — not the union. A point must satisfy every inequality in the system.

Practice Problems

Test your understanding with these problems. Click to reveal each answer.

Problem 1: Graph y>3x2y > 3x - 2. Describe the boundary line style and which side to shade.

Boundary line: y=3x2y = 3x - 2 (slope 3, yy-intercept 2-2).

Line style: Dashed (strict >>).

Test (0,0)(0, 0): 0>3(0)2=20 > 3(0) - 2 = -2. True, so shade the side containing the origin — above the line.

Answer: Dashed line through (0,2)(0, -2) with slope 3, shading above.

Problem 2: Graph x+2y8x + 2y \leq 8. Find the intercepts and determine the shading.

Boundary: x+2y=8x + 2y = 8

xx-intercept: (8,0)(8, 0). yy-intercept: (0,4)(0, 4).

Line style: Solid (\leq).

Test (0,0)(0, 0): 0+080 + 0 \leq 8. True, so shade the side containing the origin — below the line.

Answer: Solid line through (8,0)(8, 0) and (0,4)(0, 4), shading below and to the left.

Problem 3: Is the point (2,5)(2, 5) a solution to y<3x+12y < -3x + 12?

Substitute: 5<3(2)+12=6+12=65 < -3(2) + 12 = -6 + 12 = 6

5<65 < 6 is true.

Answer: Yes, (2,5)(2, 5) is a solution.

Problem 4: Graph y23x1y \geq \frac{2}{3}x - 1. Note: the line passes close to the origin.

Boundary: y=23x1y = \frac{2}{3}x - 1. Slope is 23\frac{2}{3}, yy-intercept is 1-1.

Line style: Solid (\geq).

Test (0,0)(0, 0): 023(0)1=10 \geq \frac{2}{3}(0) - 1 = -1. True, so shade the side containing the origin — above the line.

Answer: Solid line through (0,1)(0, -1) and (3,1)(3, 1), shading above.

Problem 5: Write the inequality shown by a solid line through (0,5)(0, 5) and (5,0)(5, 0) with shading above the line.

Slope: 0550=1\frac{0 - 5}{5 - 0} = -1. Equation: y=x+5y = -x + 5.

Solid line means \leq or \geq. Shading above means yy is greater than the line.

Test a point in the shaded region, say (0,6)(0, 6): 6(0)+5=56 \geq -(0) + 5 = 5. True.

Answer: yx+5y \geq -x + 5

Problem 6: A carpenter has a $2,400 budget. Hardwood costs $8 per board-foot and plywood costs $3 per board-foot. Write and graph the inequality. Can the carpenter buy 150 board-feet of hardwood and 200 board-feet of plywood?

Let hh = board-feet of hardwood, pp = board-feet of plywood.

Inequality: 8h+3p24008h + 3p \leq 2400

Intercepts: hh-intercept (300,0)(300, 0), pp-intercept (0,800)(0, 800).

Solid line, shade toward origin (h0h \geq 0, p0p \geq 0).

Check (150,200)(150, 200): 8(150)+3(200)=1200+600=180024008(150) + 3(200) = 1200 + 600 = 1800 \leq 2400. True.

Answer: Yes, the carpenter can afford this combination ($1,800 is within the $2,400 budget with $600 to spare).

Problem 7: Graph the system y4y \leq 4 and x>1x > -1 and describe the solution region.

First inequality: horizontal solid line at y=4y = 4, shade below.

Second inequality: vertical dashed line at x=1x = -1, shade to the right.

The solution region is the overlap: all points where x>1x > -1 and y4y \leq 4. This is the region to the right of the dashed vertical line and below (or on) the solid horizontal line — an infinite quarter-plane extending right and downward.

Answer: The solution is the region where x>1x > -1 and y4y \leq 4, covering the lower-right area bounded by a dashed vertical line and a solid horizontal line.

Key Takeaways

  • A linear inequality in two variables represents a half-plane — an entire region of the coordinate plane, not just a line
  • Dashed lines for strict inequalities (<<, >>); solid lines for non-strict (\leq, \geq)
  • Always test a point (usually the origin) to determine which side to shade — do not guess based on the inequality symbol alone
  • A system of inequalities is solved by graphing all inequalities and finding where the shaded regions overlap
  • In real-world problems, linear inequalities model constraints — budgets, capacity limits, material availability — and the solution region shows all feasible combinations
  • This topic connects directly to linear programming, where you find the optimal point within a feasible region defined by multiple inequality constraints

Return to Algebra for more topics in this section.

Last updated: March 29, 2026