Interval notation packs a whole range of numbers into a few characters. “Every number from −1 up to, but not including, 3” becomes [−1, 3). It’s how textbooks write the solutions to inequalities, the domain and range of functions, and the regions where a graph rises or falls. This calculator converts in both directions, solves linear inequalities with every step shown, and draws the result on a number line, so the brackets match what you see.
Reading interval notation
Everything comes down to two rules. The smaller endpoint is written first. A square bracket means the endpoint is included, and a round bracket means it’s left out. Infinity is never included, since you can’t stop at it, so it always gets a round bracket.
| Inequality | Interval notation | On a number line |
|---|---|---|
| x > a | (a, ∞) | open dot at a, arrow right |
| x ≥ a | [a, ∞) | filled dot at a, arrow right |
| x < b | (−∞, b) | arrow left, open dot at b |
| x ≤ b | (−∞, b] | arrow left, filled dot at b |
| a < x < b | (a, b) | open dots at both ends |
| a ≤ x ≤ b | [a, b] | filled dots at both ends |
| a ≤ x < b | [a, b) | filled at a, open at b |
| every real number | (−∞, ∞) | the whole line |
| x ≠ a | (−∞, a) ∪ (a, ∞) | whole line with a hole at a |
The interval notation lesson goes through each of these with worked examples.
How to write an inequality in interval notation (step by step)
The calculator opens on −3 ≤ 2x − 1 < 5, a compound inequality with x in the middle. To write it as an interval, first get x on its own.
Step One: Undo the subtraction in all three parts
Whatever you do to the middle, do to both ends.
−3 ≤ 2x − 1 < 5
−3 + 1 ≤ 2x − 1 + 1 < 5 + 1
−2 ≤ 2x < 6
Step Two: Undo the multiplication
Divide all three parts by 2. It’s positive, so the signs stay the same.
−1 ≤ x < 3
Step Three: Choose the brackets
The left sign is ≤, so −1 is included and gets a square bracket. The right sign is <, so 3 is left out and gets a round bracket.
−1 ≤ x < 3 → [−1, 3)
Step Four: Check with a test value
Pick a number inside the interval, say x = 0: 2(0) − 1 = −1, and −3 ≤ −1 < 5 is true. Then try the endpoint x = 3: 2(3) − 1 = 5, and 5 < 5 is false, which confirms 3 is excluded.
Dividing by a negative flips the sign
Inequalities follow the same steps as equations, with one extra rule. When you multiply or divide both sides by a negative number, the inequality sign reverses.
−4x + 1 ≥ 9
−4x ≥ 8 subtract 1
x ≤ −2 divide by −4 and flip ≥ to ≤
interval: (−∞, −2]
Check it with x = −3: −4(−3) + 1 = 13, and 13 ≥ 9 is true. Without the flip you’d get x ≥ −2, which fails for x = 0 (1 ≥ 9 is false). The linear inequalities lesson explains why the flip happens.
“And” vs “or”: intersections and unions
Compound inequalities join two conditions, and the joining word changes the answer completely:
x > 0 and x ≤ 10 → (0, 10] both must hold: the overlap
x < −1 or x ≥ 4 → (−∞, −1) ∪ [4, ∞) either may hold: the union
x > 5 and x < 2 → ∅ nothing is in both
x < 5 or x > 2 → (−∞, ∞) everything is in one or the other
The ∪ symbol is how interval notation writes “or” when there’s a gap. For more on these, see the compound inequalities lesson.
Set-builder notation
Set-builder notation describes the set by its rule instead of its endpoints. It reads “the set of all x such that…”:
{x | −1 ≤ x < 3} same set as [−1, 3)
{x | x ≠ 3} same set as (−∞, 3) ∪ (3, ∞)
{x | x ∈ ℝ} same set as (−∞, ∞)
The calculator gives all three forms, since different teachers and textbooks ask for different ones.
Converting interval notation back to an inequality
Type an interval and the calculator works backwards. Each bracket turns into a sign: [ becomes ≤, ( becomes <, and an infinite end simply drops that side.
[−2, 5) ∪ (7, ∞) → −2 ≤ x < 5 or x > 7
(−∞, 4] → x ≤ 4
Overlapping or touching intervals are merged automatically: (−1, 3] ∪ [3, 6) is just (−1, 6).
Interval notation for domain and range
Outside of inequality homework, the most common place you’ll meet interval notation is in describing a function’s domain (the inputs allowed) and range (the outputs it produces). Square roots, fractions and squares each leave a recognizable mark:
f(x) = √(x − 2) domain [2, ∞) range [0, ∞)
f(x) = 1/(x − 3) domain (−∞, 3) ∪ (3, ∞) range (−∞, 0) ∪ (0, ∞)
f(x) = x² + 1 domain (−∞, ∞) range [1, ∞)
The square root needs x − 2 ≥ 0, which is a one-line inequality, and the calculator turns “x − 2 ≥ 0” into [2, ∞) instantly. The fraction can’t divide by zero, so x ≠ 3, the same two-ray union you get by typing “x ≠ 3”. Reading a range off a graph works the same way. Look at the lowest and highest y-values the graph reaches, and decide whether each end is actually reached (square bracket) or only approached (round bracket).
The domain lesson walks through finding the domain of every common function type, and each answer there is written in exactly this notation.
Later on, calculus uses intervals to describe behavior as well as inputs. “f is increasing on (−∞, −1) ∪ (2, ∞)” means the graph rises everywhere except between −1 and 2. Those endpoints usually get round brackets, because at a turning point the graph is momentarily neither rising nor falling. Getting comfortable with brackets and unions now pays off well beyond inequality chapters.
Common mistakes with interval notation
- Putting a square bracket next to infinity. [3, ∞] is wrong. Infinity always takes ( or ).
- Writing the larger number first. x < 3 and x > −2 is (−2, 3), not (3, −2).
- Forgetting to flip the sign after dividing by a negative.
- Mixing up (3, 5) as a point. In interval notation (3, 5) means every number between 3 and 5, not the coordinate point (3, 5). Context tells you which one is meant.
- Using ∪ for “and”. “And” is the overlap of the two sets. ∪ is only for “or”.
For practice writing solution sets, the interval notation practice problems generate new questions with answers.