A set is a collection, but there are two quite different ways to describe the same collection. You can list every element between curly braces — the roster form. Or you can state a rule that says which elements are in and which are out — the set-builder form. Both are correct, both are standard, and the one you should use depends on the shape of the set in front of you.
Two addresses for the same set
Take the set of positive even integers less than 10. In roster form, it is compact and unmistakable:
You can read off the elements by eye. No rule to decode, just a list.
In set-builder form, the same set is written by specifying a property the elements satisfy:
The vertical bar \mid is read "such that" — some books use a colon : instead, but the meaning is the same. The expression on the left of the bar names a typical element (x), and the expression on the right gives the rule (x is a positive even integer less than 10). The two forms describe the same set — the same four numbers — in different words.
When roster form wins
Roster form is unbeatable when:
- The set is small enough to list every element.
- The elements have no obvious common rule — just a specific, miscellaneous collection.
Examples:
- V = \{a, e, i, o, u\} — the vowels in English. The "rule" is just "these five letters," and a list is cleaner than any wordy description.
- C = \{\text{red}, \text{green}, \text{blue}\} — the primary colours of additive light.
- P = \{2, 3, 5, 7\} — primes less than 10. You could write this in set-builder form, but the roster version is faster to read.
For any finite set with fewer than a dozen elements and no obvious pattern, roster form is the right choice. The reader can see the contents at a glance and there is no rule to interpret.
When set-builder form wins
Set-builder form is the right tool when:
- The set is infinite — you cannot list all the elements, but you can state the rule that defines them.
- The set is too large to list comfortably, even if finite.
- The elements are defined by a property, and the property is the natural description.
Examples:
- \{\, x \in \mathbb{R} \mid x > 0 \,\} — the positive real numbers. Infinite. You literally cannot list them. The rule is clean and tells you everything.
- \{\, x \in \mathbb{Z} \mid x^2 < 100 \,\} — the integers whose square is less than 100. This is the finite set \{-9, -8, -7, \dots, 8, 9\}, but the rule "x^2 < 100" is shorter than the full list of 19 numbers.
- \{\, x \in \mathbb{R} \mid x^2 = 2 \,\} — a two-element set that is best described by its defining property (the solutions of a quadratic) rather than by writing \{\sqrt{2}, -\sqrt{2}\} which hides the origin of those numbers.
The general rule: if the elements are defined by a condition, set-builder form preserves that condition in the notation. If the elements are just a specific list, roster form is better.
The fudged roster: dot-dot-dot
There is a third notation, which is really just a roster form with ellipses: \{2, 4, 6, 8, \dots\}, \mathbb{N} = \{1, 2, 3, 4, \dots\}, \{-2, -1, 0, 1, 2, \dots\}. The "\dots" means "continue the pattern." It is a convenient shorthand, but it is only clear when the pattern is obvious.
- \{2, 4, 6, 8, \dots\} — clear. Positive even numbers.
- \{1, 2, 4, 8, 16, \dots\} — clear. Powers of 2.
- \{1, 2, 3, 5, 7, \dots\} — ambiguous. Primes? Fibonacci-ish? Something else?
When the pattern is not universally obvious, use set-builder form and state the rule explicitly. \{\, x \mid x = 2^n, n \geq 0 \,\} removes all doubt about what "the pattern" is.
Translating between the two
Given one form, producing the other is a mechanical skill worth practising.
From set-builder to roster. Start with the rule. Find all elements that satisfy it. Write them between curly braces. If the rule is over a bounded or small domain, you will get a finite list; if the rule is over an infinite domain, you will have to use "\dots" or keep the set in set-builder form.
Example: \{\, x \in \mathbb{Z} \mid -3 \leq x \leq 3 \,\}. The rule picks integers from -3 to 3 inclusive. Roster: \{-3, -2, -1, 0, 1, 2, 3\}.
Example: \{\, x \in \mathbb{N} \mid x^2 < 20 \,\}. Integers whose square is less than 20: 1, 2, 3, 4 (since 5^2 = 25 is already too big, and \mathbb{N} starts at 1). Roster: \{1, 2, 3, 4\}.
From roster to set-builder. Harder, because the question "what rule defines these elements?" is open-ended. Spot the pattern, state it cleanly.
Example: \{3, 6, 9, 12, 15\}. These are the positive multiples of 3 up to 15. Set-builder: \{\, x \in \mathbb{N} \mid x = 3k, 1 \leq k \leq 5 \,\}, or more briefly, \{\, 3k \mid k \in \{1, 2, 3, 4, 5\} \,\}.
Example: \{a, b, c, d, e\} — the first five letters of the English alphabet. Set-builder: \{\, x \mid x \text{ is one of the first five letters of the alphabet} \,\}. In this case the roster is so much cleaner that converting to set-builder is pointless.
The reflex
Pick the form that makes the set easiest to read. Finite and miscellaneous → roster. Infinite or rule-defined → set-builder. And keep the two forms interchangeable in your head: every problem can be translated back and forth, and often the insight you need is available in one form but invisible in the other.
Related: Sets — Introduction · The Box Model of a Set · Set-Builder Notation Translator · Cardinality Meter