How Graphing Inequalities on a Number Line Works
A one-variable inequality (like x > 3 or -2 ≤ x < 5) does not have a single answer — it describes an entire range of numbers that make the statement true. Graphing that range on a number line is a two-part decision for each boundary: whether to draw an open circle (boundary excluded) or a closed circle (boundary included), and which direction to shade or draw an arrow. This calculator applies those rules to your inequality and also converts it into interval notation and set-builder notation, the two standard written forms used in algebra.
How the calculation works
Pick the inequality type that matches your problem, then enter the boundary value(s). For a single-sided inequality (x > a, x ≥ a, x < a, or x ≤ a), the calculator places one circle at a — open for a strict inequality (> or <), closed for ≥ or ≤ — and shades toward positive infinity for >/≥ or toward negative infinity for </≤. For a compound "and" inequality (a < x < b), it places a circle at each end and shades the segment between them. For a compound "or" inequality (x < a or x > b), it places a circle at each end and shades two rays pointing outward, away from each other. The tool also converts your inequality to interval notation, where parentheses ( ) mark excluded endpoints (matching open circles), square brackets [ ] mark included endpoints (matching closed circles), and infinity always takes a parenthesis since it is never actually reached.
Common mistakes
- Flipping the inequality sign: if you multiply or divide both sides of an inequality by a negative number, the direction of the inequality must flip (e.g., -x > 3 becomes x < -3).
- Mixing up open and closed circles: "at least" and "at most" (≥, ≤) include the boundary and need a closed circle; "more than" and "less than" (>, <) exclude it and need an open circle.
- Wrong bracket in interval notation: a closed circle must pair with a square bracket [ or ], and an open circle must pair with a parenthesis ( or ) — never mix a bracket with infinity.
- Compound "and" vs. "or" confusion: "and" inequalities graph as one connected segment between the boundaries; "or" inequalities graph as two separate rays pointing away from each other.
Real-world applications
- Algebra and pre-algebra coursework use number-line graphs to visualize solution sets for linear inequalities and compound inequalities.
- Word problems that describe a valid range (e.g., "you must be at least 18 and under 65") translate directly into compound inequalities and their number-line graphs.
- Domain and range restrictions in functions (such as where a square root or rational expression is defined) are commonly expressed and graphed as inequalities.
- Quality control and tolerance specifications in engineering describe acceptable ranges as inequalities, which are graphed the same way to visualize acceptable limits.