Set-Builder Notation

Read and write set-builder notation like {x | x > 3}, convert it to interval notation and back, and see when set-builder is the better choice.

Set-Builder Notation vs Interval Notation

You have a set defined by an inequality and need to write it in a standard form. The two standard forms are set-builder notation and interval notation. Set-builder uses a variable, a condition, and a description of the set, while interval notation uses parentheses and brackets to show which endpoints are included. To convert between the two forms, use the worked examples and a conversion table.

Reading Set-Builder Notation

How Set-Builder Notation Works

Set-builder notation describes a set by stating the property its members must satisfy. The general form is {x | condition on x}. For example, {x | x > 3} reads as 'the set of all x such that x is greater than 3'. The vertical bar means 'such that'. The condition can be a simple inequality, a compound inequality, or a statement about the type of number (e.g., integers).

The notation always includes a variable (most often x) and a condition. The set includes every real number that meets the condition. When the condition uses < or >, the endpoint is not included. When it uses ≤ or ≥, the endpoint is included. This maps directly to parentheses and brackets in interval notation.

Example: {x | -2 ≤ x < 5} includes all numbers from -2 up to but not including 5, with -2 included.

Converting to Interval Notation

From Set-Builder to Interval

To convert from set-builder to interval notation, identify the smallest and largest numbers in the set, then decide whether each endpoint is included. Use a bracket [ or ] when the endpoint is included (≤ or ≥), and a parenthesis ( or ) when it is not (< or >). Write the interval from smallest to largest, with a comma between endpoints.

Example: {x | x > 2} becomes (2, ∞). The parenthesis at 2 means 2 is not included. Infinity always gets a parenthesis because it is not a number.

Example: {x | -3 ≤ x ≤ 4} becomes [-3, 4]. Both endpoints are included.

For compound inequalities that use 'or', you need a union symbol ∪. {x | x < 1 or x > 5} becomes (-∞, 1) ∪ (5, ∞).

When the set is empty (no numbers satisfy the condition), write ∅ or { }. For example, {x | x > 2 and x < 1} has no solution because no number is both greater than 2 and less than 1.

Converting from Interval Notation

From Interval to Set-Builder

To convert interval notation back to set-builder, read the left endpoint, then the right endpoint. A bracket means the endpoint is included (use ≤ or ≥ in the condition). A parenthesis means the endpoint is excluded (use < or >). For unbounded intervals, the parenthesis at ∞ or -∞ becomes a strict inequality pointing away from the infinity.

Example: [-1, 3) becomes {x | -1 ≤ x < 3}.

Example: (∞, 5] becomes {x | x ≤ 5}. The parenthesis at -∞ is implicit because the interval is unbounded on the left; you do not write a condition for -∞.

For unions, (-∞, 0) ∪ (2, ∞) becomes {x | x < 0 or x > 2}.

When Set-Builder Is Needed (Integers, Excluded Points)

Discrete Sets and Exclusions

Interval notation only works for continuous sets of real numbers. When you need to describe a set of integers, or a set that excludes individual points, you must use set-builder notation or roster notation.

Example: {x ∈ ℤ | x > 2} describes the set of all integers greater than 2. You cannot write this in interval notation because integers are not continuous.

Example: {x | x ≠ 3} excludes the single point 3. In interval notation, this becomes (-∞, 3) ∪ (3, ∞). The set-builder form is more compact.

Example: {x | x > 0 and x ≠ 1} becomes (0, 1) ∪ (1, ∞) in interval notation. The set-builder form highlights the excluded point directly.

Roster Notation

Listing Elements Directly

Roster notation lists the elements of a set inside curly braces, separated by commas. For example, {1, 2, 3, 4} is the set containing the numbers 1, 2, 3, and 4. Roster notation is used for finite sets or for sets where you can list all elements. It cannot describe infinite sets unless you use an ellipsis, like {1, 2, 3, ...} for the set of positive integers.

Roster notation is not the same as set-builder notation. Set-builder gives a rule; roster lists the members. Use roster when the set is small enough to list, and set-builder when it is large or infinite but defined by a condition.

Example: The set of even numbers between 1 and 9: roster is {2, 4, 6, 8}; set-builder is {x | x is an even integer and 1 < x < 9}.

Conversion Table: Set-Builder to Interval and Back

Set-Builder NotationInterval Notation
{x | x > 5}(5, ∞)
{x | x ≤ -2}(-∞, -2]
{x | -1 < x < 4}(-1, 4)
{x | 0 ≤ x ≤ 7}[0, 7]
{x | x < -3 or x ≥ 2}(-∞, -3) ∪ [2, ∞)
{x | x ≠ 0}(-∞, 0) ∪ (0, ∞)
{x | x > 2 and x < 2}∅

This table covers the most common single-interval and compound cases. Use it as a quick reference when converting between notations.

Worked Examples

Five Conversion Patterns

Example 1: Convert {x | -4 ≤ x ≤ 1} to interval notation. The smallest number is -4, the largest is 1. Both endpoints are included (≤). Interval: [-4, 1].

Example 2: Convert (2, 7] to set-builder notation. Left parenthesis means 2 is not included (<). Right bracket means 7 is included (≤). Set-builder: {x | 2 < x ≤ 7}.

Example 3: Convert {x | x < 0 or x > 10} to interval notation. This is two separate intervals. The left part: (-∞, 0). The right part: (10, ∞). Union: (-∞, 0) ∪ (10, ∞).

Example 4: Convert (-∞, 3) ∪ (3, ∞) to set-builder notation. This is all real numbers except 3. Set-builder: {x | x ≠ 3}.

Example 5: Convert (5, 8) to set-builder notation. Both parentheses mean both endpoints are excluded. Set-builder: {x | 5 < x < 8}.

These examples cover the most common conversion patterns. Practice with different inequalities to build speed.

Common Errors and How to Avoid Them

Five Mistakes to Watch For

The most frequent error is using a bracket with infinity, like [a, ∞]. Infinity is not a number, so you can never include it with a bracket. Always use a parenthesis: (a, ∞).

The second most common error is writing intervals in the wrong order, like (5, 2) when the condition is x > 2 and x < 5. Always write the left endpoint first (smaller number), then a comma, then the right endpoint (larger number).

The third error is forgetting the union symbol. (-∞, 1)(3, ∞) is not valid; you need (-∞, 1) ∪ (3, ∞).

The fourth error is confusing parentheses and brackets. [a, b] includes both endpoints; (a, b) excludes both. If the condition is a < x < b, use parentheses. If it is a ≤ x ≤ b, use brackets.

The fifth error is writing an empty set as [ ] or ( ). The correct notation is ∅ or { }.

Common Questions

How do I convert {x | x > 2} to interval notation?

Write (2, ∞). The parenthesis at 2 means 2 is not included. Infinity always uses a parenthesis.

How do I convert (-∞, 5] to set-builder notation?

Write {x | x ≤ 5}. The bracket at 5 means 5 is included; the parenthesis at -∞ means no lower bound.

What does the union symbol ∪ mean in interval notation?

It means 'or'. A number belongs to one interval OR the other. For example, (-∞, 1) ∪ (3, ∞) means x < 1 or x > 3.

Can I use interval notation for a set of integers?

No. Interval notation only works for continuous sets of real numbers. Use set-builder or roster notation for integers.

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

Write (-∞, 2) ∪ (2, ∞). This excludes the point 2 by splitting the real line into two intervals.

What does the empty set look like in interval notation?

The empty set is written as ∅ or { }. There is no interval representation because there are no numbers to include.

When should I use set-builder notation instead of interval notation?

Use set-builder when you need to describe a discrete set (like integers), exclude individual points, or write a condition that is not a simple inequality.