Interval notation
Interval notation is a short way to write all the numbers between two endpoints. A square bracket [ ] means the endpoint is included, and a round bracket ( ) means it is not. So 2 < x ≤ 5 is written (2, 5]: 2 is left out and 5 is included. Infinity, ∞, always takes a round bracket, because it is not a number you can reach.
Interval notation rules
- Write the smaller endpoint first, then a comma, then the larger one: (2, 5], never (5, 2].
- Use a square bracket for ≤ or ≥: the endpoint is in the set.
- Use a round bracket for < or >: the endpoint is not in the set.
- Use a round bracket next to ∞ or −∞, always.
- Join separate pieces with ∪, the union symbol, meaning "or".
Round brackets are also called parentheses. On a number line, a square bracket matches a closed (filled) circle and a round bracket matches an open (empty) circle.
Inequalities in interval notation
| Inequality | Interval notation | Endpoints | Name |
|---|---|---|---|
| 2 < x < 5 | (2, 5) | Neither included | Open interval |
| 2 ≤ x ≤ 5 | [2, 5] | Both included | Closed interval |
| 2 < x ≤ 5 | (2, 5] | 5 only | Half-open interval |
| 2 ≤ x < 5 | [2, 5) | 2 only | Half-open interval |
| x > 3 | (3, ∞) | 3 not included | Unbounded |
| x ≥ 3 | [3, ∞) | 3 included | Unbounded |
| x < −1 | (−∞, −1) | −1 not included | Unbounded |
| x ≤ −1 | (−∞, −1] | −1 included | Unbounded |
| All real numbers | (−∞, ∞) | None | The whole number line |
On a number line
The shaded part runs from the open circle at 2 to the closed circle at 5. Every number in between is in the set, including decimals like 2.001 and 4.99.
Unions: two separate pieces
When the answer is "x < −2 or x ≥ 4", there are two separate stretches of the number line. Write each as an interval and join them with ∪:
Unions come up with "greater than" absolute value inequalities and with domains that skip a value. For example, all real numbers except 0 is (−∞, 0) ∪ (0, ∞). See absolute value for inequalities that split like this.
Interval notation vs set-builder notation
| Inequality | Interval notation | Set-builder notation |
|---|---|---|
| 2 < x ≤ 5 | (2, 5] | {x | 2 < x ≤ 5} |
| x ≥ 3 | [3, ∞) | {x | x ≥ 3} |
| x < −2 or x ≥ 4 | (−∞, −2) ∪ [4, ∞) | {x | x < −2 or x ≥ 4} |
Set-builder notation reads "the set of all x such that...". All three forms say the same thing, and questions often ask for one in particular. The inequality solver gives the answer in plain form, interval notation and set notation, with the number line.
Writing the answer to an inequality in interval notation
Example 1: 3x − 4 < 11
Add 4 to get 3x < 15, then divide by 3: x < 5. In interval notation, that is (−∞, 5).
Example 2: dividing by a negative
Solve −2x + 1 ≥ 7. Subtract 1: −2x ≥ 6. Divide by −2 and flip the sign, because you are dividing by a negative: x ≤ −3. The answer is (−∞, −3].
Example 3: a compound inequality
Solve −1 ≤ 2x + 3 < 9. Do the same thing to all three parts. Subtract 3: −4 ≤ 2x < 6. Divide by 2: −2 ≤ x < 3. The answer is [−2, 3).
Try solving one yourself, then press Mark to check your answer in the course.
Solve a linear inequality; see the solution on a number line.
Press Mark to have your answer marked in the Algebra course.
Domain and range in interval notation
Interval notation is the standard way to give the domain (allowed inputs) and range (possible outputs) of a function in precalculus:
| Function | Domain | Range |
|---|---|---|
| f(x) = x² | (−∞, ∞) | [0, ∞) |
| f(x) = √(x − 3) | [3, ∞) | [0, ∞) |
| f(x) = 1/x | (−∞, 0) ∪ (0, ∞) | (−∞, 0) ∪ (0, ∞) |
| f(x) = 2x + 1 | (−∞, ∞) | (−∞, ∞) |
The range of x² starts with a square bracket because 0 is reached, at x = 0. The Graphing Functions course has a section on reading domain and range from a graph.
Common mistakes
- A square bracket next to infinity. [3, ∞] is wrong. Write [3, ∞).
- The bigger number first. (5, 2) is not an interval. Write the smaller endpoint on the left.
- Mixing up the brackets. ≤ and ≥ get square brackets. < and > get round ones.
- Forgetting to flip the inequality when you multiply or divide by a negative, before writing the interval.
- Confusing (2, 5) with a point. In interval notation it means every number between 2 and 5. Context tells you which: a coordinate pair is a single point.
To practise inequalities among other topics in a short timed paper, try today's Geometry, Algebra 2 & SAT Math paper, or the AP Precalculus paper for domain and range.
Interval notation practice questions
1. Write x > −6 in interval notation.
2. Write 0 ≤ x ≤ 12 in interval notation.
3. Write (−∞, 8] as an inequality.
4. Solve 5 − x > 2 and give the answer in interval notation.
Answer: (−∞, 3).
5. Write x ≤ 1 or x > 5 in interval notation.
Common questions
What does a square bracket mean in interval notation?
What does a round bracket (parenthesis) mean?
Why does infinity always get a round bracket?
How do you write all real numbers in interval notation?
What does ∪ mean in interval notation?
How do you write a single excluded value?
Revision cards
Say the answer first, then flip the card to check it.
Where to go next
- Solve it
Inequality Solver
Solve inequalities and show the answer on a number line
Open the tool - Learn it
Algebra
Master equations, inequalities and the language of abstract mathematics
Start the course - Test it
Geometry, Algebra 2 & SAT Math
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper