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:

E = \{2, 4, 6, 8\}.

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:

E = \{\, x \mid x \text{ is a positive even integer less than } 10 \,\}.

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.

Roster and set-builder forms shown as two side-by-side boxes for the same set Two rectangular panels side by side. The left panel is labelled roster form and contains the expression curly brace two four six eight close brace. The right panel is labelled set-builder form and contains the expression curly brace x such that x is a positive even integer less than ten close brace. A horizontal double-arrow between them is labelled same set. Below both panels a single circle with the label E contains the numbers two, four, six, eight, emphasising that both notations refer to the same underlying set. roster form {2, 4, 6, 8} set-builder form {x | x is even, 0 < x < 10} same set E = {2, 4, 6, 8}
The same set $E$, written two ways. On the left, the *roster form* lists all four elements. On the right, the *set-builder form* describes them by a property. Both notations pick out the same four-element set — they are just different addresses for the same collection.

When roster form wins

Roster form is unbeatable when:

Examples:

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:

Examples:

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.

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