How to Write Interval Notation

Write any inequality in interval notation: find the endpoints, choose ( or [, handle infinity, and join pieces with ∪. Worked examples and common mistakes.

How to Write Interval Notation

You have an inequality like −3 ≤ x < 7 and need to write it as a compact set of real numbers. The answer is [−3, 7). Write interval notation in four steps, with five worked examples and a checklist of the mistakes that trip up most students.

Step 1: Find The Endpoints

Every interval has two boundaries: a left endpoint and a right endpoint. For the inequality 3 ≤ x < 7, the smallest number in the set is 3 and the largest is 7. Write them down in order: left first, then right.

If the inequality is x > −2, the left endpoint is −2. There is no upper bound, so the right endpoint is infinity, written as ∞. For x ≤ 5, the left endpoint is −∞ and the right endpoint is 5.

The endpoint search is mechanical. Pull the two numbers that appear on either side of the variable in the inequality. That is your pair.

Step 2: Open Or Closed?

Now decide whether each endpoint is included in the set. This is the rule from OpenStax College Algebra 2e, section 1.1 on interval notation:

  • If the inequality uses ≤ or ≥, the endpoint is included. In interval notation, that is a bracket: [ or ].
  • If the inequality uses < or >, the endpoint is not included. That is a parenthesis: ( or ).

For 3 ≤ x < 7, the left endpoint 3 uses ≤ so it gets a bracket. The right endpoint 7 uses < so it gets a parenthesis. The interval is [3, 7).

For x > 5, the left endpoint 5 uses > so it gets a parenthesis. The interval is (5, ∞).

Step 3: Infinity Always Gets A Parenthesis

Infinity is not a number you can reach. OpenStax College Algebra 2e, section 2.7 on linear inequalities makes this explicit: ∞ and −∞ always take a parenthesis, never a bracket. Writing [5, ∞] is incorrect because it treats infinity as an included endpoint.

This rule applies regardless of the inequality direction. x ≥ −2 becomes [−2, ∞). x < 3 becomes (−∞, 3). (−∞, ∞) is the interval notation for all real numbers.

Step 4: Joining Pieces With ∪

Some solution sets are not a single continuous block. The inequality x < −1 or x ≥ 3 describes two separate intervals. You join them with the union symbol ∪: (−∞, −1) ∪ [3, ∞).

Never write two intervals next to each other without the ∪. The notation (−∞, −1) [3, ∞) is not valid. Also check whether the intervals overlap. If they do, combine them into one interval instead of using a union.

For compound inequalities using "and" (also called intersections), the solution set is the overlap of two intervals. The symbol for intersection is ∩.

From A Number Line Graph

Sometimes you are given a number line with shaded segments rather than an inequality. Read the endpoints off the graph:

If the line is shaded from −3 to 4, with a closed circle at −3 and an open circle at 4, the interval is [−3, 4). A closed circle means bracket; an open circle means parenthesis.

If the shading extends past the edge of the line toward the right, the right endpoint is ∞. If it extends left, the left endpoint is −∞. The same parenthesis rule for infinity applies.

Worked Examples

Five examples covering the most common patterns. Write each one out yourself before checking the answer.

Example 1: −1 ≤ x ≤ 4

Endpoints: −1 and 4. Both use ≤, so both are included. Interval: [−1, 4].

Example 2: x > 5

Left endpoint: 5, excluded (strict >). Right endpoint: ∞, always parenthesis. Interval: (5, ∞).

Example 3: x ≤ −2

Left endpoint: −∞, parenthesis. Right endpoint: −2, included (≤). Interval: (−∞, −2].

Example 4: 2 ≤ x < 6

Left: 2, bracket. Right: 6, parenthesis. Interval: [2, 6).

Example 5: x < −1 or x ≥ 3

Two pieces. The first: (−∞, −1). The second: [3, ∞). Join with ∪: (−∞, −1) ∪ [3, ∞).

Mistakes Checklist
MistakeWrongRightWhy It Fails
Infinity bracket[5, ∞](5, ∞)∞ cannot be included
Wrong order(7, 3)(3, 7)Left endpoint must be smaller
Missing union(-∞,-1)[3,∞)(-∞,-1) ∪ [3,∞)Intervals must be joined with ∪
Double inclusion[2,6] for 2 < x < 6(2,6)Strict inequalities mean open endpoints
Empty set confusion[ ] or ( )∅ or { }Empty set has its own symbol
Reversed brackets(2,6] for 2 ≤ x < 6[2,6)Left included = bracket, right excluded = parenthesis

Common Mistakes To Watch For

One mistake happens more than any other: writing a bracket with infinity. It appears in tests, homework, and calculator outputs from the interval notation calculator tool. The rule is absolute, infinity always gets a parenthesis, because infinity is a concept, not a reachable number.

The second most common failure is forgetting the union symbol. When you have two separate pieces, you must write ∪ between them. Leaving a space or a comma does not count.

Third: reversing the order of endpoints. The left endpoint must be smaller than the right endpoint. [7, 3) is always wrong. Check your pair before you write the final interval.

Common Questions

What does the ∪ mean in interval notation?

∪ means "or", a number belongs to one interval or the other. It is used when the solution set is made of two or more separate pieces. For "and" problems, use ∩ (intersection).

How do I write 'all real numbers except 2' in interval notation?

Write (−∞, 2) ∪ (2, ∞). The union is required because the two intervals do not touch. The number 2 is excluded, so it has a parenthesis on both sides.

Can I use a bracket with infinity?

No. Infinity is not a real number, so it cannot be included. Always use a parenthesis next to ∞ or −∞, no matter which inequality symbol is used.

What is the empty set and how do I write it?

The empty set means no real numbers satisfy the condition. Write it as ∅ or { }. Never use [ ] or ( ), which are not standard notation.