Sub topic 4
Writing solution sets in interval notation
Interval notation writes a set of real numbers as its two endpoints, with a bracket or parenthesis at each end showing whether that endpoint belongs to the set. This chapter assumes you can already solve a linear inequality and graph its solution on a number line. It also assumes you can read the symbols <, >, ≤, and ≥. Here you learn to turn those results into compact, unambiguous interval notation, and to avoid the usual mistakes.
Why a second notation
A number line graph shows a solution set well, but it is hard to type, hard to put in a sentence, and hard to combine with other sets. Interval notation fixes this. The solution of x < -2 becomes (-∞, -2). The solution of -2 ≤ x < 3 becomes [-2, 3).
Interval notation is built on three ideas:
- The smaller endpoint is written first, then a comma, then the larger endpoint.
- A square bracket means the endpoint is included.
- A parenthesis means the endpoint is excluded, or that there is no endpoint at all.
Brackets and parentheses
The choice between bracket and parenthesis depends only on the inequality symbol at that endpoint. Strict symbols (< and >) exclude the endpoint. Inclusive symbols (≤ and ≥) include it. This matches the open circle and closed circle on a number line graph.
| Inequality | Number line endpoint | Interval notation |
|---|---|---|
| x > 4 | open circle at 4, ray to the right | (4, ∞) |
| x ≥ 4 | closed circle at 4, ray to the right | [4, ∞) |
| x < 4 | open circle at 4, ray to the left | (-∞, 4) |
| x ≤ 4 | closed circle at 4, ray to the left | (-∞, 4] |
| 1 < x ≤ 5 | open at 1, closed at 5 | (1, 5] |
| 1 ≤ x ≤ 5 | closed at both ends | [1, 5] |
Infinity always gets a parenthesis
The symbols ∞ and -∞ do not name real numbers. They mean the set continues without end in that direction. Because no largest or smallest number exists to include, the delimiter next to an infinity symbol is always a parenthesis.
The whole real line, which is the solution when every number works, is written (-∞, ∞).
Reading left to right
Interval notation always lists the endpoints in increasing order. The left value is the smaller one, which matches how the numbers sit on a number line.
This matters when the inequality is written backwards. The inequality 5 > x says the same thing as x < 5. The interval is (-∞, 5), not (5, -∞). A reliable habit is to rewrite the inequality with the variable on the left before converting.
You can also convert a chain directly. In the chain -2 ≤ x < 3, the variable sits between two numbers. The left number is the left endpoint and the right number is the right endpoint, so the interval is [-2, 3).
From a solved inequality to an interval
Start with the worked example from the spine:
-3x + 5 > 11
-3x > 6 (subtract 5 from both sides)
x < -2 (divide by -3 and reverse the inequality)
Interval notation: (-∞, -2)Follow these steps:
- Finish solving, so the variable is alone: x < -2.
- Decide the direction. Since x is less than -2, the set extends left, so the left endpoint is -∞.
- Write the finite endpoint, -2. The original symbol is strict, so use a parenthesis.
- Write the infinity end with a parenthesis: (-∞, -2).
Now a bounded case:
-1 ≤ 2x + 3 < 9
-4 ≤ 2x < 6 (subtract 3 from all three parts)
-2 ≤ x < 3 (divide all three parts by 2)
Interval notation: [-2, 3)Here the left side uses ≤, which gives a bracket. The right side uses <, which gives a parenthesis. The two ends can have different delimiters.
Unions of intervals
Some solution sets have two separate pieces. The absolute value inequality from the spine is an example:
|x - 1| ≥ 3
x - 1 ≤ -3 or x - 1 ≥ 3
x ≤ -2 or x ≥ 4
Interval notation: (-∞, -2] ∪ [4, ∞)The symbol ∪ is called union. It means "all numbers that belong to either piece". Write the pieces in left-to-right order, and use one ∪ between each pair.
A union is the right notation for "or" compound inequalities. For "and" compound inequalities, the solution is the overlap of two sets, and it usually collapses to a single interval. For instance, x > 1 and x ≤ 5 gives (1, 5].
Common errors
These mistakes show up often in student work.
- Swapped endpoints. Writing (3, -2) instead of (-2, 3). The smaller number always goes first.
- Bracket at infinity. Writing [4, ∞] instead of [4, ∞).
- Wrong delimiter from the original symbol. Using a bracket for a strict symbol, or a parenthesis for ≤ or ≥. Match the symbol at that exact endpoint.
- Union where none is needed. Writing (-∞, 2) ∪ (-∞, 5) instead of simplifying. These pieces overlap, so the union is just (-∞, 5).
- Treating a single interval as two. The chain -2 ≤ x < 3 is one interval, not a union.
- Leaving the answer as "x in (a, b)" with a missing variable. A bare interval is a complete answer on its own. Writing x = (a, b) is incorrect because an interval is a set, not a number.
Checking an interval by computer
You can test an interval by checking one number on each side of every endpoint, and the endpoint itself. This short program builds interval strings and checks the first example from the spine.
import math
def interval(lo, hi, lo_closed=False, hi_closed=False):
left = "[" if lo_closed and lo != -math.inf else "("
right = "]" if hi_closed and hi != math.inf else ")"
lo_text = "-∞" if lo == -math.inf else str(lo)
hi_text = "∞" if hi == math.inf else str(hi)
return f"{left}{lo_text}, {hi_text}{right}"
def satisfies(x):
return -3 * x + 5 > 11
print(interval(-math.inf, -2)) # (-∞, -2)
print(interval(-2, 3, True, False)) # [-2, 3)
print(interval(4, math.inf, True)) # [4, ∞)
print([x for x in (-3, -2, -1) if satisfies(x)]) # [-3]The function forces a parenthesis whenever an endpoint is infinite, even if you pass a closed flag. This enforces the rule from the earlier warning. The last line tests -3x + 5 > 11 at -3, -2, and -1. Only -3 passes, and -2 fails because the inequality is strict, which agrees with the interval (-∞, -2).
Converting back
You should be able to read an interval and describe it in words and symbols.
| Interval | Inequality | Meaning |
|---|---|---|
| (-5, 0] | -5 < x ≤ 0 | greater than -5, up to and including 0 |
| [2, ∞) | x ≥ 2 | 2 or larger |
| (-∞, 7) | x < 7 | anything below 7 |
| (-∞, ∞) | any real x | every real number |
Connecting to set-builder notation
Interval notation and set-builder notation describe the same sets in different styles. The interval (-∞, -2) corresponds to {x | x < -2}. Set-builder notation can express conditions that intervals cannot, such as "x is an integer" or "x is not equal to 3". Interval notation is shorter for sets that are runs of the number line. The expression x ≠ 3 is written as the union (-∞, 3) ∪ (3, ∞) in interval notation.
Practice
Exercise
Write the solution of -5x ≤ 20 in interval notation.
Show answer
Divide both sides by -5 and reverse the inequality: x ≥ -4. The endpoint is included and the set extends to the right, so the interval is [-4, ∞).
Exercise
Write 5 > x ≥ -1 in interval notation, and explain which side needs the parenthesis.
Show answer
Rewrite it with the smaller value first: -1 ≤ x < 5. The left endpoint is included, so it gets a bracket. The right endpoint is excluded, so it gets a parenthesis. The interval is [-1, 5).
Exercise
Write the solution of |x + 2| > 1 in interval notation.
Show answer
Rewrite as x + 2 < -1 or x + 2 > 1, so x < -3 or x > -1. Both endpoints are excluded, so the interval is (-∞, -3) ∪ (-1, ∞).
Exercise
What is wrong with the answer [2, ∞] for x ≥ 2, and what is the correct form?
Show answer
Infinity is not a number that can be included, so it needs a parenthesis. The correct form is [2, ∞).