Intermediate level

Intervals

An interval is shorthand for infinitely many numbers — all the ones lying between two ends. Learn open and closed intervals, unbounded intervals with the infinity symbol, the union and intersection of two intervals, and how the condition |x − a| < r becomes a single interval.

Before you start

This topic builds on earlier ideas. Before you start, it's worth working through the lessons below — they'll make everything click:

Where this is used

Real situations where you count exactly the way this lesson teaches:

  • Clothing sizes
    A size chart assigns size M to a chest measurement of [96, 104) cm. A chest of 104 cm is already an L — and that is what the round bracket on the right end says, not the small print under the table.
  • Tax brackets
    The first tax band covers an annual income of [0, 120,000] units and the second starts at (120,000, +∞). An income of exactly 120,000 is still in the first band — a closed end is real money, not a formality.
  • Control systems
    A boiler controller holds the temperature in [19.5, 20.5] °C, which is written as the single condition |t − 20| ≤ 0.5. Going above 20.5 °C switches the heating off and dropping below 19.5 °C switches it on.
  • Pharmacy and dosing
    The dose for an 18 kg child is [10, 15] mg per kilogram, that is between 180 and 270 mg a day. Both ends belong to the interval, so 270 mg is an allowed dose and 275 mg is not.

All formulas

  • Closed interval

    [a,b]={xR:axb}[a, b] = \{ x \in \mathbb{R} : a \le x \le b \}

    both endpoints belong to the set

  • Open interval

    (a,b)={xR:a<x<b}(a, b) = \{ x \in \mathbb{R} : a < x < b \}

    neither endpoint belongs to the set

  • Half-closed interval

    [a,b)={xR:ax<b}[a, b) = \{ x \in \mathbb{R} : a \le x < b \}

    the left end belongs, the right one does not

  • Unbounded interval

    (,b)={xR:x<b}(-\infty, b) = \{ x \in \mathbb{R} : x < b \}

    infinity always takes a round bracket

  • Intersection

    AB={x:xA and xB}A \cap B = \{ x : x \in A \ \text{and} \ x \in B \}

    the numbers belonging to both intervals at once

  • Union

    AB={x:xA or xB}A \cup B = \{ x : x \in A \ \text{or} \ x \in B \}

    the numbers belonging to at least one of the intervals

  • Modulus as an interval

    xa<r    x(ar,a+r)|x - a| < r \iff x \in (a - r, a + r)

    the numbers less than r away from a

The condition x>3x > 3 describes infinitely many numbers: 3.13.1, 44, 10001000 and everything in between. They cannot be listed, but they can be bounded from either side — and then only the bounds need writing down. That notation is called an interval, and it is to a set of numbers what a street address is to a street: shorter than a list of all the houses, and pointing at exactly the same thing.

The four bounded intervals

An interval has two ends, and at each of them one question has to be settled: does that end belong to the set? The shape of the bracket carries the answer — square when the end belongs, round when it does not:

[a,b]={xR:axb}[a, b] = \{ x \in \mathbb{R} : a \le x \le b \} (a,b)={xR:a<x<b}(a, b) = \{ x \in \mathbb{R} : a < x < b \} [a,b)={xR:ax<b}(a,b]={xR:a<xb}[a, b) = \{ x \in \mathbb{R} : a \le x < b \} \qquad (a, b] = \{ x \in \mathbb{R} : a < x \le b \}

On the number line an interval is drawn as a band, and each of its ends as a circle: filled when the end belongs to the interval, hollow when it does not.

−6−4−202468[−2, 5)
The interval [−2, 5): the number −2 belongs to it, the number 5 does not, and everything between them does.

The interval [2,5)[-2, 5) contains 2-2, contains 4.9994.999 and contains every number in between. It does not contain 55 — and that is the whole difference between the two brackets.

Unbounded intervals

When there is a bound on one side only, the other side gets the infinity symbol:

(,b)(,b](a,+)[a,+)(-\infty, b) \qquad (-\infty, b] \qquad (a, +\infty) \qquad [a, +\infty)

At infinity the bracket is always round, because \infty is not a number and cannot belong to a set of numbers. That is not a matter of house style — the notation [3,+][3, +\infty] is simply wrong.

The whole set of real numbers is an interval too: R=(,+)\mathbb{R} = (-\infty, +\infty).

Intervals and inequalities

An interval and an inequality say the same thing in two notations, and it pays to move between them in both directions:

InequalityInterval
x>3x > 3(3,+)(3, +\infty)
x3x \ge 3[3,+)[3, +\infty)
x1x \le -1(,1](-\infty, -1]
2x<5-2 \le x < 5[2,5)[-2, 5)
xRx \in \mathbb{R}(,+)(-\infty, +\infty)

A strict sign (<<, >>) gives a round bracket, a non-strict one (\le, \ge) gives a square bracket. That rule is enough to convert either form into the other.

Write as an interval: the numbers greater than −4 and no greater than 1.

Union and intersection

Two intervals can be combined in two ways. The intersection ABA \cap B is the numbers belonging to both at once, and the union ABA \cup B is the numbers belonging to at least one:

AB={x:xA and xB}AB={x:xA or xB}A \cap B = \{ x : x \in A \ \text{and} \ x \in B \} \qquad A \cup B = \{ x : x \in A \ \text{or} \ x \in B \}

The safest method is a drawing: put both intervals one under the other on the same axis and read the answer off the shared band (intersection) or off the whole covered stretch (union).

−6−4−202468A ∩ BAB
A = [−4, 2), B = (−1, 6], and their intersection is (−1, 2) — the band at the bottom.

The left end of the intersection comes from the interval that starts later and the right end from the one that finishes earlier; each bracket travels with the end it came from. When two intervals share no stretch, their intersection is the empty set \varnothing.

Find (−∞, 4] ∩ [0, +∞) and (−∞, 0) ∪ [2, +∞).

The modulus as an interval

Absolute value measures a distance and an interval describes a set — which is why one turns into the other. The condition xa<r|x - a| < r reads as the numbers less than rr away from aa, that is:

xa<r    x(ar,a+r)|x - a| < r \iff x \in (a - r, a + r)
−202468223
|x − 3| < 2 — two steps left and two steps right of three give the open interval (1, 5).

A strict sign gives an open interval and a non-strict one a closed interval: xar|x - a| \le r is [ar,a+r][a - r, a + r]. That single formula describes every tolerance: 20 °C to within half a degree is t200.5|t - 20| \le 0.5, which is the interval [19.5,20.5][19.5, 20.5].

Practice

Work through a set of exercises — they get harder as you go. At the end you'll see your score and the mistakes worth reviewing.

Exercise 1 of 8Score: 0
How many integers: (2; 7]

Common mistakes

  • Mixing up the brackets[2,5)[2, 5) contains 22 and does not contain 55. Square means the end belongs, round means it does not.
  • Closing infinity — the notation [3,+][3, +\infty] is wrong; at \infty the bracket is always round.
  • Writing a union of disjoint intervals as one interval(,0)[2,+)(-\infty, 0) \cup [2, +\infty) is not an interval and has to stay as it is.
  • Taking the intersection from the wrong ends — the left end comes from the interval that starts later, not from the one lying further left.
  • Forgetting the empty set — intervals with no shared stretch have \varnothing as their intersection, not a missing answer.

Formula card

Topic: Intervals

  • Closed interval

    [a,b]={xR:axb}[a, b] = \{ x \in \mathbb{R} : a \le x \le b \}

    both endpoints belong to the set

  • Open interval

    (a,b)={xR:a<x<b}(a, b) = \{ x \in \mathbb{R} : a < x < b \}

    neither endpoint belongs to the set

  • Half-closed interval

    [a,b)={xR:ax<b}[a, b) = \{ x \in \mathbb{R} : a \le x < b \}

    the left end belongs, the right one does not

  • Unbounded interval

    (,b)={xR:x<b}(-\infty, b) = \{ x \in \mathbb{R} : x < b \}

    infinity always takes a round bracket

  • Intersection

    AB={x:xA and xB}A \cap B = \{ x : x \in A \ \text{and} \ x \in B \}

    the numbers belonging to both intervals at once

  • Union

    AB={x:xA or xB}A \cup B = \{ x : x \in A \ \text{or} \ x \in B \}

    the numbers belonging to at least one of the intervals

  • Modulus as an interval

    xa<r    x(ar,a+r)|x - a| < r \iff x \in (a - r, a + r)

    the numbers less than r away from a

−6−4−202468[−2, 5)
The interval [−2, 5) — the left end is filled because it belongs, the right one hollow because it does not.
−6−4−202468A ∩ BAB
The intersection of [−4, 2) and (−1, 6] is (−1, 2) — the stretch both bands cover.
−202468223
The condition |x − 3| < 2 is the interval (1, 5) — the numbers less than 2 away from 3.

Frequently asked questions

Related articles