Inequalities and Piecewise Functions
How to Graph Inequalities on a Coordinate Plane
To graph an inequality such as y > 2x − 1: graph the boundary line y = 2x − 1, make it dashed for < or > and solid for ≤ or ≥, then test a point not on the line. If the point makes the inequality true, shade its side; if not, shade the other side. The shaded region is every solution.
Check it yourself: every example here can be loaded into the Graphing Inequalities Calculator.
Open the Graphing Inequalities CalculatorThe method in three steps
- Draw the boundary. Replace the inequality sign with = and graph that line.
- Dashed for < or > (points on the line are not solutions).
- Solid for ≤ or ≥ (points on the line are solutions).
- Test a point that is not on the line. Substitute it into the original inequality.
- Shade. If the test point makes the inequality true, shade the side it is on; if false, shade the other side.
Worked example 1: y > 2x − 1
- Boundary: y = 2x − 1 (y-intercept −1, slope 2). The sign is >, so dashed.
- Test (0, 0): 0 > 2(0) − 1 → 0 > −1. True.
- Shade the side containing the origin — above the line.
Check another point in the shaded region, (−2, 3): 3 > −5 ✓. A point below, (3, 0): 0 > 5 ✗. The picture is consistent.
- Graph y > 2x − 1 — opens the Graphing Inequalities Calculator
Worked example 2: 2x + 3y ≤ 6
Text description of this figure
Three panels: the solid boundary 2x + 3y = 6 through (3, 0) and (0, 2); the test point (0, 0) checked; the region below the line shaded.
- Replace ≤ with = and graph the line (intercepts (3, 0), (0, 2)).
- Substitute (0, 0): 0 ≤ 6 is true.
- Shade the side containing (0, 0).
- Boundary 2x + 3y = 6 through (3, 0) and (0, 2) — solid, because of ≤.
- Test (0, 0): 0 ≤ 6. True.
- Shade the side containing the origin — below the line.
Solving for y gives the same result: 3y ≤ −2x + 6 → y ≤ −(2⁄3)x + 2, “y is less than or equal to”, so shade below.
- Graph 2x + 3y ≤ 6 — opens the Graphing Inequalities Calculator
Vertical and horizontal boundaries
- x ≥ −2: solid vertical line x = −2; shade to the right (x-values greater than −2).
- y < 3: dashed horizontal line y = 3; shade below.
- Graph x ≥ −2 (vertical boundary) — opens the Graphing Inequalities Calculator
When to flip the sign
If you solve for y and divide or multiply by a negative number, the inequality sign flips:
−2y > 4x − 6 → divide by −2 → y < −2x + 3 → shade below.
Forgetting to flip is the most common error. A test point catches it every time.
From one variable to two
A one-variable inequality like x > 3 is shown on a number line with an open circle at 3 and an arrow to the right. In two variables, x > 3 becomes a dashed vertical line with everything to its right shaded — the same idea, one dimension higher.
Common mistakes
- Solid line for a strict inequality (or dashed for ≤/≥). See dashed vs solid boundary lines.
- Testing a point on the boundary. It gives no information.
- Not flipping the sign after dividing by a negative.
- Shading “above” for x > … . For x-inequalities, think left and right.
Next: combine several inequalities in systems of inequalities, or use curved boundaries in nonlinear inequalities.
Questions
Which point should I test?
(0, 0) is easiest if the boundary does not pass through the origin. Otherwise use a point like (1, 0) or (0, 1).
Do I always shade above for >?
Only when the inequality is solved for y (y > …). In forms like 2x − 3y > 6, solve for y first — dividing by −3 flips the sign — or use a test point.
What is the solution of an inequality in two variables?
Every point (x, y) that makes it true. There are infinitely many, which is why the answer is a shaded region rather than a list.
Graph your own example with the Graphing Inequalities Calculator — free, in your browser.
Try it nowSources and further reading
- OpenStax, Elementary Algebra 2e — 4.7 Graphs of Linear Inequalities
- OpenStax, Intermediate Algebra 2e — 3.4 Graph Linear Inequalities in Two Variables
Worked examples and figures were produced and checked with the Graphing Calculator Lab engine. See the editorial policy.