Uni-Sine
MathematicsAlgebra

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

  1. Write the smaller endpoint first, then a comma, then the larger one: (2, 5], never (5, 2].
  2. Use a square bracket for ≤ or ≥: the endpoint is in the set.
  3. Use a round bracket for < or >: the endpoint is not in the set.
  4. Use a round bracket next to ∞ or −∞, always.
  5. 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

InequalityInterval notationEndpointsName
2 < x < 5(2, 5)Neither includedOpen interval
2 ≤ x ≤ 5[2, 5]Both includedClosed interval
2 < x ≤ 5(2, 5]5 onlyHalf-open interval
2 ≤ x < 5[2, 5)2 onlyHalf-open interval
x > 3(3, ∞)3 not includedUnbounded
x ≥ 3[3, ∞)3 includedUnbounded
x < −1(−∞, −1)−1 not includedUnbounded
x ≤ −1(−∞, −1]−1 includedUnbounded
All real numbers(−∞, ∞)NoneThe whole number line

On a number line

−10123456
(2, 5]: 2 is not included (open circle), 5 is included (closed circle)

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.

practice
Pick an answer, then check it.
Which interval matches −4 ≤ x < 1?

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 ∪:

−10−8−6−4−2024681012
(−∞, −2) ∪ [4, ∞): the shading carries on forever in both directions
(-\infty, -2) \cup [4, \infty)

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

InequalityInterval notationSet-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:

FunctionDomainRange
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 &gt; −6 in interval notation.
(−6, ∞). −6 is not included, so the bracket is round.
2. Write 0 ≤ x ≤ 12 in interval notation.
[0, 12]. Both ends are included.
3. Write (−∞, 8] as an inequality.
x ≤ 8. The square bracket means 8 is included.
4. Solve 5 − x &gt; 2 and give the answer in interval notation.
Subtract 5: −x > −3. Multiply by −1 and flip the sign: x < 3.
Answer: (−∞, 3).
5. Write x ≤ 1 or x &gt; 5 in interval notation.
(−∞, 1] ∪ (5, ∞)

Common questions

What does a square bracket mean in interval notation?
The endpoint is included. [2, 5] contains 2 and 5.
What does a round bracket (parenthesis) mean?
The endpoint is not included. (2, 5) contains every number between 2 and 5, but not 2 or 5 themselves.
Why does infinity always get a round bracket?
Infinity isn't a number, so it can't be included in the set. The interval just keeps going.
How do you write all real numbers in interval notation?
(−∞, ∞).
What does ∪ mean in interval notation?
Union, or "or". (−∞, 1) ∪ (3, ∞) means numbers less than 1 or greater than 3.
How do you write a single excluded value?
Split the line at that value: all real numbers except 4 is (−∞, 4) ∪ (4, ∞).

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
Read next
Maths · AlgebraSet notation in A-level maths: symbols and inequalitiesThe set notation symbols you need for A-level maths, how to write the solution of an inequality in set notation, and how sets are used in probability.