Algebra
How to Write Interval Notation: Step-by-Step Examples
Learn when to use brackets or parentheses, how to handle infinity, and how to turn any inequality into clean interval notation
By AI Picture Answer Education Team · · Updated September 25, 2026
What is interval notation?
Interval notation is a compact way to describe a set of real numbers that lie between two endpoints. Instead of writing "all real numbers greater than or equal to −2 and less than 5," you write [−2, 5). It is the standard way to state solutions to inequalities, the domain and range of functions, and the intervals where a function is increasing or decreasing.
If you want to check your answers while you practice, the interval notation calculator converts inequalities to intervals and shows which endpoints are included.
Quick definition:
An interval is written as (left endpoint, right endpoint). A square bracket [ ] means the endpoint is included; a parenthesis ( ) means it is not.
The rules of interval notation
Every interval follows the same four rules. Once you know them, writing interval notation becomes almost mechanical.
- Write the smaller number first. Intervals always read from left to right on the number line, so the left endpoint must be less than the right endpoint.
- Use a square bracket for "or equal to." The symbols ≤ and ≥ mean the endpoint belongs to the set, so it gets [ or ].
- Use a parenthesis for strict inequalities. The symbols < and > mean the endpoint is excluded, so it gets ( or ).
- Infinity always gets a parenthesis. ∞ and −∞ are not real numbers you can reach, so they are never included.
Symbol cheat sheet
| Inequality | Interval Notation | Number Line |
|---|---|---|
| x > a | (a, ∞) | Open circle at a, shade right |
| x ≥ a | [a, ∞) | Closed circle at a, shade right |
| x < b | (−∞, b) | Open circle at b, shade left |
| x ≤ b | (−∞, b] | Closed circle at b, shade left |
| a < x ≤ b | (a, b] | Open at a, closed at b, shade between |
| All real numbers | (−∞, ∞) | Shade the entire line |
How to write interval notation in 4 steps
- Solve or simplify the inequality so the variable is alone (for example, x ≥ 4 or −1 < x < 3).
- Find the endpoints. If the set continues forever in one direction, that endpoint is ∞ or −∞.
- Choose brackets or parentheses for each endpoint using the rules above.
- Join separate pieces with the union symbol ∪ if the solution has a gap in it.
Worked examples
Example 1: A one-sided inequality
Write x > 3 in interval notation.
Step 1: The variable is already isolated: x > 3.
Step 2: The numbers start just after 3 and continue to the right forever, so the endpoints are 3 and ∞.
Step 3: The symbol is strict (>), so 3 gets a parenthesis. Infinity always gets a parenthesis.
Answer: (3, ∞)
Check: 3 itself is not greater than 3, so excluding it is correct. A test value such as 10 satisfies x > 3 and lies inside (3, ∞).
Example 2: A double inequality with mixed endpoints
Write −2 ≤ x < 5 in interval notation.
Step 1: The left endpoint is −2 and the right endpoint is 5. The smaller number (−2) comes first.
Step 2: −2 uses ≤, so it is included: use [.
Step 3: 5 uses <, so it is excluded: use ).
Answer: [−2, 5)
Check: x = −2 gives −2 ≤ −2 (true), and x = 5 gives 5 < 5 (false). The brackets match those results.
Example 3: Solve first, then write the interval
Solve 3x − 7 ≥ 5 and write the answer in interval notation.
Step 1: Add 7 to both sides: 3x ≥ 12.
Step 2: Divide both sides by 3 (a positive number, so the sign does not flip): x ≥ 4.
Step 3: 4 is included (≥), and the set runs to +∞.
Answer: [4, ∞)
Check: x = 4 gives 3(4) − 7 = 5, and 5 ≥ 5 is true. x = 0 gives −7 ≥ 5, which is false, and 0 is outside [4, ∞).
Example 4: An "Or" statement becomes a union
Write x ≤ −1 or x > 4 in interval notation.
Step 1: The first piece, x ≤ −1, runs left forever and includes −1: (−∞, −1].
Step 2: The second piece, x > 4, runs right forever and excludes 4: (4, ∞).
Step 3: "Or" means a number can belong to either piece, so join them with a union.
Answer: (−∞, −1] ∪ (4, ∞)
Check: 0 is between the pieces and satisfies neither inequality, so the gap between −1 and 4 is correct.
Example 5: The domain of a function
Find the domain of f(x) = √(x − 2) / (x − 5) and write it in interval notation.
Step 1: The expression under the square root must be non-negative: x − 2 ≥ 0, so x ≥ 2.
Step 2: The denominator cannot be zero: x − 5 ≠ 0, so x ≠ 5.
Step 3: Start at 2 (included) and remove the single point 5 by splitting the interval there. Because 5 is excluded, both sides of the split use a parenthesis at 5.
Answer: [2, 5) ∪ (5, ∞)
Check: f(2) = √0 / (−3) = 0, which is defined. f(5) would divide by zero, so 5 must be excluded.
Converting back: Interval to inequality
You can reverse the process too. The interval (−3, 0] means −3 is excluded and 0 is included, so the inequality is −3 < x ≤ 0. Read the left symbol, then the right symbol, and translate each one.
Special cases
- A single number: {3} is written with set braces, not as an interval. [3, 3] is technically the same set, but most teachers expect {3}.
- No solution: write the empty set, ∅, rather than an interval.
- All real numbers: write (−∞, ∞), sometimes also shown as ℝ.
- Everything except one value: x ≠ 7 becomes (−∞, 7) ∪ (7, ∞).
Common mistakes to avoid
Watch out for these:
- Putting a bracket on infinity. [4, ∞] is wrong. Infinity is never included, so it is always [4, ∞).
- Writing the endpoints in the wrong order. x < 5 is (−∞, 5), not (5, −∞). The smaller value always comes first.
- Confusing the open interval (2, 6) with the point (2, 6). Context tells you which one is meant; in an inequality problem it is an interval.
- Forgetting to flip the inequality when you multiply or divide by a negative number before writing the interval.
- Using ∩ instead of ∪. Separate pieces of a solution are joined with union (∪). Intersection (∩) means "in both at once."
Practice problems
Try these on your own:
- Write x ≤ 8 in interval notation.
- Write 0 < x < 1 in interval notation.
- Solve −2x + 1 > 9 and write the answer as an interval.
- Write [−6, 2) as an inequality.
Click to see answers
- (−∞, 8]
- (0, 1)
- −2x > 8, divide by −2 and flip: x < −4, so (−∞, −4)
- −6 ≤ x < 2
Frequently asked questions
Does infinity ever get a square bracket?
No. Infinity is not a number that can be reached or included, so both ∞ and −∞ always use a parenthesis.
What does the U symbol mean in interval notation?
The symbol ∪ means union. It joins two or more separate intervals into one solution set, such as (−∞, 1) ∪ (3, ∞).
How do I write "x is not equal to 2" in interval notation?
Split the number line at 2 and exclude it on both sides: (−∞, 2) ∪ (2, ∞).
Need help with interval notation?
Interval notation shows up constantly once you start solving inequalities. Keep practicing with our guide on how to solve compound inequalities and our article on how to find the range, which uses interval notation for function outputs. When you want to confirm an answer, run it through the interval notation calculator.
Working from a worksheet or textbook? Snap a photo of your homework problem and AI Picture Answer will walk you through a step-by-step explanation.
Snap a photo of your homework problem
Upload a picture of any inequality or interval question and get a step-by-step solution in seconds
Try it free