Learn
Lesson · Linear Equations and Inequalities · Inequalities

Interval and Set-Builder Notation

Two standard ways of writing a set of numbers down: interval notation, which names the two ends and says whether each is included, and set-builder notation, which states the condition a number must satisfy. Both are exact, and both have a small number of forms that describe nothing.

[a, b] a ≤ x ≤ b both ends included (a, b) a < x < b neither end included [a, ∞) a ≤ x ∞ is never included: never a square bracket { x ∈ ℝ : x ≥ 2 } set-builder: the condition, written out
Two notations for one set

Core ideas

What this lesson establishes

The notation carries very little, and every part of it is load-bearing.

1

The bracket is the whole content of the notation

A square bracket includes the endpoint and a round one excludes it. [2, 5) contains 2 and does not contain 5. Mixing the two in one interval is ordinary rather than a mistake — it is exactly what at least 2 and less than 5 says.

2

Infinity is a direction, not a number

∞ marks an end that never arrives. There is no number there to include, so the bracket beside it is always round: [2, ∞) and never [2, ∞]. The same holds for −∞ at the left end.

3

Set-builder notation states a condition

{ x ∈ ℝ : x ≥ 2 } reads the set of real numbers x such that x ≥ 2. It can express sets interval notation cannot — { x ∈ ℝ : x is rational } for one, which is not a union of finitely many intervals — and it makes explicit which numbers are being drawn from.

The material

Writing a solution set down

Four ways to say the same thing, the pieces each notation is made of, and the handful of written forms that mean nothing.

Every answer in “Linear Inequalities”, “Compound Inequalities”, “Absolute Value Equations” and “Absolute Value Inequalities” was a set of numbers written as an inequality. That is a perfectly good way to write a set, and it becomes clumsy the moment the set has two pieces. It also says nothing about which numbers were on the table to begin with. Two standard notations address both.

Definition · Interval notation

For a ≤ b: [a, b] is the set of x with a ≤ x ≤ b; (a, b) is the set with a < x < b; [a, b) and (a, b] include one end each. A square bracket includes its endpoint and a round bracket excludes it.

Unbounded ends use ∞ and −∞, always with a round bracket: [a, ∞), (−∞, b], and (−∞, ∞) for the whole line.

Definition · Set-builder notation

{ x ∈ ℝ : P(x) } is the set of all real numbers x for which the condition P(x) is true. The colon is read such that, and a vertical bar is used for the same purpose: { x ∈ ℝ | x ≥ 2 }.

∈ is read is an element of. Naming the set the numbers come from matters: { x ∈ ℝ : 2 ≤ x ≤ 5 } is an interval, while { x ∈ ℤ : 2 ≤ x ≤ 5 } is the four numbers 2, 3, 4, 5.

One set, four ways

inequality -1 ≤ x < 3 interval [-1, 3) set-builder { x ∈ ℝ : -1 ≤ x < 3 } number line filled dot at -1, hollow dot at 3, shaded between

The filled and hollow ends on the line are the brackets. A filled dot is a square bracket and a hollow one is round, and reading between the two representations should become automatic; the lab prints all four from one structure so that they cannot disagree.

Unions, and sets in two pieces

x ≤ −2 or x ≥ 5 is two pieces, and interval notation writes it as a union: (−∞, −2] ∪ [5, ∞). That ∪ is “Compound Inequalities”'s or. The intersection sign ∩ appears far less often, because an and of two intervals is itself an interval and gets written as one.

The forms that describe nothing

  • [3, ∞]. Infinity is not a number, so it cannot be an element of anything. Write [3, ∞).
  • [5, 2]. Interval notation names the smaller end first. Read literally it asks for numbers that are at least 5 and at most 2, of which there are none.
  • (4, 4). Both ends excluded and equal, so there is no number strictly between them: this is the empty set. Compare [4, 4], which is the one-element set { 4 }.
  • x = [2, 5). x is a number and [2, 5) is a set, so they cannot be equal. Write x ∈ [2, 5), or say that the solution set is [2, 5).

The empty set is written ∅, or { }. It is not { 0 } and it is not 0: { 0 } is a set with one element in it, and ∅ is a set with none. An inequality with no solutions has solution set ∅, and writing 0 claims that 0 is a solution.

(2, 5) is also how a point in the plane is written, in Lines, Functions and Graphs. The two notations share their symbols and are told apart by context: an interval is a set of numbers on a line, and a point is a pair of coordinates. Where both are in play, saying which you mean is worth the words.

Example · Reading a set back

(−∞, −2] ∪ [5, ∞). Two pieces. The left one runs for ever downward and stops at −2, which it includes. The right one starts at 5, which it includes, and runs for ever upward. In set-builder notation it is { x ∈ ℝ : x ≤ −2 or x ≥ 5 }. Nothing strictly between −2 and 5 belongs to it, and both −2 and 5 do.

One further form is worth having. A set small enough to list is listed: { 5, −3 } is the solution set of 3|x − 1| + 2 = 14 from “Absolute Value Equations”, and the list is the readable form. Interval notation does reach it, as [−3, −3] ∪ [5, 5], and reaches it clumsily. Listing, interval notation and set-builder notation are three tools, and the set decides which of them is readable.

Interactive

Writing a solution set down

Four notations for one set of numbers

a statement to solve
the solution setsatisfies the statementfails it

Method

Writing a solution set down

Four checks, in this order. The last one catches a bracket copied from the wrong side.

1

Decide how many pieces the set has

One piece is a single interval. Two or more are a union of intervals joined by ∪. A set small enough to list goes in braces. Nothing at all is ∅.

2

Write the smaller end first, then the larger

Interval notation is ordered. [−2, 5] is an interval and [5, −2] describes nothing, and the two are one transposition apart with no warning in between.

3

Choose each bracket from the relation that produced it

< and > give round brackets; ≤ and ≥ give square ones. The two ends are decided independently of each other, which is why [2, 5) is a perfectly ordinary interval.

4

Check one endpoint and one interior value against the original statement

Take the endpoint your notation claims is included and confirm that the original statement is true there. Then take a number from inside. A bracket written the wrong way round survives every other check and fails this one.

Brackets and ends

Score 0 / 0

Three answers from this course, written down

The solution sets from “Linear Inequalities”, “Compound Inequalities” and “Absolute Value Inequalities”, in each notation.

from “Linear Inequalities” x ≤ -6 interval (-∞, -6] set-builder { x ∈ ℝ : x ≤ -6 } number line filled dot at -6, shading running left from “Compound Inequalities” 2 ≤ x < 4 interval [2, 4) set-builder { x ∈ ℝ : 2 ≤ x < 4 } number line filled dot at 2, hollow dot at 4, shaded between from “Absolute Value Inequalities” x ≤ -2 or x ≥ 5 interval (-∞, -2] ∪ [5, ∞) set-builder { x ∈ ℝ : x ≤ -2 or x ≥ 5 } number line two shaded rays, filled dots at -2 and 5 degenerate no solutions ∅ every real number (-∞, ∞) or ℝ

The bracket beside −6 is square because the relation that produced it was ≤. The bracket beside −∞ is round because there is nothing there to include, and that bracket is round in every interval unbounded on the left, without exception.

The third set is the one that needs the union. Written as an inequality it takes a word, or; written as an interval it takes a symbol, ∪. Both are exact, and the interval form is the one that scales: however many pieces a set has, it is a list of intervals joined by ∪.

For a faded two-piece conversion, start from x ≤ −3 or x > 2. The left piece has been started as (−∞, −3 and the right as (2, ∞). Choose the missing bracket at −3, join the pieces, write the real-number set-builder form, and describe the corresponding endpoint dots before checking the worked patterns above.

Common mistakes

1
Putting a square bracket on infinity(−∞, 3] is right and [−∞, 3] is not. There is no number at the infinite end to include or exclude, so the bracket there is round in every interval, always.
2
Writing the two ends in the wrong order[5, 2] is not another way of writing [2, 5]. Read as a condition it says 5 ≤ x ≤ 2, and no number satisfies that. Interval notation is ordered, and nothing on the page announces when the order has gone.
3
Confusing the empty set with a set containing zero∅ has no elements. { 0 } has one element, the number 0. An inequality with no solutions has solution set ∅, and writing 0 or { 0 } instead claims that 0 is a solution.

Check your understanding

✓
Finish when you can move between the four representations without stopping to think.

Translate (−∞, 1) ∪ [6, ∞) into an inequality, a real-number set-builder condition and a number line with correct endpoint dots. Then list { n ∈ ℤ : −2 < n ≤ 2 } and explain why the same condition over ℝ cannot be listed. Every later solution set is expected in one of these exact forms.

Note: This closes the course. Every solution set of an inequality here has been an interval or a union of two intervals, because each statement reduces to at most two linear ones and a linear statement changes from true to false at most once along the line. Quadratics and Complex Numbers solves quadratic inequalities, where the answer is regularly the two pieces lying outside a pair of roots, and this notation is what keeps those answers readable.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.