Set-Builder and Roster Notation
Quick Reference
| Field | Value |
|---|---|
| Textbook | Rosen, Discrete Mathematics and Its Applications, 8th edition |
| Chapter | 2 (Basic Structures: Sets, Functions, Sequences, Sums, and Matrices) |
| Section | 2.1 Sets |
| Subsection | 2.1.1 Introduction; 2.1.2 The Concept of a Set |
| Pages | 121-124 |
| Course | MATH301 (Discrete Mathematics), Week 0 review |
This is a pre-course review node. The formal week-3 development of sets builds directly on the two notations established here. A professor pulling this up before lecture has the exact section, subsection, and page range; a student studying for a quiz has the same anchor.
Try This First
Before any symbols, write down a collection you already carry in your head.
Take the days of the week. List them inside a pair of braces, separated by commas:
$$\{\text{Monday}, \text{Tuesday}, \text{Wednesday}, \text{Thursday}, \text{Friday}, \text{Saturday}, \text{Sunday}\}$$
Now answer three quick questions about what you just wrote, then check yourself.
Check your three answers
- Does it matter that you wrote Monday first? No. The same seven days in any order name the same collection. A set has no built-in order.
- What if you accidentally wrote Friday twice? It changes nothing. A set holds distinct objects, so a repeated listing names the same set.
- Could you describe this same collection without listing all seven? Yes. You could write “the set of all days in a week.” That short description is the seed of set-builder notation.
You have already used both notations in this lesson. Listing the seven days is the roster method. Describing them by a shared property is set-builder notation. The rest of this page makes both precise.
What a Set Is, in Plain Words
A set is a way of grouping objects so that you can talk about the whole group at once. The objects in the group are its elements. A set answers exactly one question about any object in the universe: is this object in, or is it out. It does not record how many times the object was mentioned, and it does not record an order. Those two facts (no order, no repetition) are what make a set different from a list.
There are two standard ways to pin down which objects are in. You can name them one by one, or you can state the rule they all satisfy. The first way is roster notation. The second way is set-builder notation. They describe the same kind of object from two directions.
Prerequisite Hub
Nothing in the tree comes before this skill. It assumes only that a reader can recognize objects like numbers and letters.
Builds on
There are no in-course prerequisites for this node. It is a week-0 review anchor that everything else leans on.
Unlocks (each link is a later node that uses this notation directly)
| Skill | Why it needs this node |
|---|---|
dm-propositional-logic |
A property $P(x)$ inside set-builder notation is a proposition about $x$; the truth of that proposition decides membership. |
dm-predicates-and-quantifiers |
Set-builder notation is a predicate $P(x)$ wrapped in braces; “such that $P(x)$” is the truth condition on that predicate. |
dm-sets |
The formal week-3 set theory (subset, equality, power set) is written in both notations introduced here. |
Cross-course prerequisites
None. This node has no dependency on another course.
graph LR
subgraph ThisSkill["This Skill"]
C["Set-Builder and<br/>Roster Notation"]
end
subgraph Unlocks
D["Propositional<br/>Logic"]
E["Predicates and<br/>Quantifiers"]
F["Sets<br/>(formal, Week 3)"]
end
C --> D
C --> E
C --> F
style C fill:#d1fae5,stroke:#a565f0,stroke-width:3px
click C "set-builder-and-roster-notation.html"
click D "../ch1-sec1/propositional-logic.html"
click E "../ch1-sec4/predicates-and-quantifiers.html"
click F "../ch2-sec1/sets.html"
Official Definitions
The definitions below are quoted from the textbook. Read the property each one fixes, not just the words.
Set, element, member. A set is an unordered collection of distinct objects, called elements or members of the set. A set is said to contain its elements. We write $a$ is an element of $A$ ($a \in A$) to denote that $a$ is an element of the set $A$; the notation $a \notin A$ denotes that $a$ is not an element of the set $A$.
Cite: Rosen 8e, Section 2.1, p.121 (verbatim definition box).
Two words in that definition carry the whole idea. Unordered means there is no first element and no last element. Distinct means each element appears once; a set cannot hold two copies of the same object.
Roster method. One way to describe a set is to list all its members between braces, for example the notation $\{a, b, c, d\}$ represents the set with the four elements $a$, $b$, $c$, and $d$. This way of describing a set is known as the roster method.
Cite: Rosen 8e, Section 2.1, p.121.
Set-builder notation. Another way to describe a set is to use set-builder notation: a set is characterized by stating the property or properties that its members must have, written as the set of all $x$ such that $x$ has the property $P(x)$.
Cite: Rosen 8e, Section 2.1, p.122 (set-builder notation discussion).
In symbols, set-builder notation has the shape
$$\{\, x \mid P(x) \,\}$$
read aloud as “the set of all $x$ such that $P(x)$ is true.” The vertical bar $\mid$ reads as “such that.” Some texts write a colon instead of a bar, as in $\{\, x : P(x) \,\}$; the meaning is identical.
There are no theorems or lemmas attached to this node. It establishes notation that later theorems are written in.
Two Representations, Side by Side
Every set in this section can be written both ways. Reading across a row is the core skill: given one notation, produce the other.
| Roster notation | Set-builder notation | In words |
|---|---|---|
| $\{1, 2, 3, 4, 5\}$ | $\{\, x \mid x \text{ is a whole number and } 1 \le x \le 5 \,\}$ | the whole numbers from 1 to 5 |
| $\{2, 4, 6, 8, \dots\}$ | $\{\, x \mid x \text{ is a positive even integer} \,\}$ | the positive even integers |
| $\{a, e, i, o, u\}$ | $\{\, x \mid x \text{ is a vowel in the English alphabet} \,\}$ | the English vowels |
| $\{0\}$ | $\{\, x \mid x \text{ is an integer and } x^2 = 0 \,\}$ | the integer whose square is zero |
When a set is small and concrete, roster notation is fastest. When a set is large, infinite, or defined by a rule, set-builder notation is the only practical choice. Try translating each row in both directions before reading on.
Worked Examples
Each example states a goal, predicts the shape of the answer, then carries out the translation, then compares.
Example 1: Roster to set-builder
Goal. Rewrite $\{3, 6, 9, 12, 15\}$ in set-builder notation.
Predict. Every listed number is a multiple of 3, and they stop at 15. The property should mention “multiple of 3” together with an upper bound. The answer should be one set, not a list.
Translate. Each element is $3$ times a positive integer, and the largest is $15 = 3 \cdot 5$. A faithful property is “$x$ is a positive multiple of 3 and $x \le 15$.” So
$$\{3, 6, 9, 12, 15\} = \{\, x \mid x \text{ is a positive integer divisible by } 3 \text{ and } x \le 15 \,\}.$$
Compare. Test the boundary cases. Is $3$ in the right-hand set? It is a positive multiple of 3 and $3 \le 15$, so yes. Is $18$ in it? It is a positive multiple of 3, but $18 \le 15$ is false, so it is out. The two descriptions admit exactly the same five numbers. The prediction held.
Example 2: Set-builder to roster
Goal. List the elements of $\{\, x \mid x \text{ is an integer and } x^2 = 9 \,\}$.
Predict. The property is an equation. An equation of degree two has at most two integer solutions, so the roster should be small, with at most two elements.
Translate. Solve $x^2 = 9$ over the integers. The solutions are $x = 3$ and $x = -3$. Both are integers, so both satisfy the property. Therefore
$$\{\, x \mid x \text{ is an integer and } x^2 = 9 \,\} = \{-3, 3\}.$$
Compare. Check each candidate. $(-3)^2 = 9$, true. $3^2 = 9$, true. No other integer squares to 9. The roster has exactly the two predicted elements.
Example 3: Order and repetition do not change a set
Goal. Decide whether $\{1, 2, 3\}$, $\{3, 2, 1\}$, and $\{1, 1, 2, 3\}$ name the same set.
Predict. The definition says a set is unordered and holds distinct objects. The prediction is that all three name one and the same set.
Translate. Reordering the elements changes nothing, so $\{1, 2, 3\} = \{3, 2, 1\}$. Listing $1$ twice adds no new element, because a set holds distinct objects, so $\{1, 1, 2, 3\} = \{1, 2, 3\}$. The membership question (is $1$ in, is $2$ in, is $3$ in, is anything else in) gets the same answer for all three.
Compare. All three descriptions contain exactly $1$, $2$, and $3$, and nothing else. They are the same set. The prediction held.
Example 4: An empty result
Goal. Write $\{\, x \mid x \text{ is a positive integer and } x < 1 \,\}$ in roster form.
Predict. The smallest positive integer is $1$, and the property demands a positive integer strictly below $1$. The prediction is that nothing qualifies, so the roster should be empty.
Translate. A positive integer satisfies $x \ge 1$. The property also demands $x < 1$. No integer satisfies $x \ge 1$ and $x < 1$ at once, so the set has no elements:
$$\{\, x \mid x \text{ is a positive integer and } x < 1 \,\} = \{\,\} = \varnothing.$$
Compare. A set-builder description can be perfectly well formed and still describe the empty set $\varnothing$. The property simply turns out true for no object. The prediction held.
Common Misconceptions
the order or repetition of listed elements changes the set. A reader new to sets sometimes treats $\{1, 2, 3\}$ and $\{3, 2, 1\}$ as different, or counts $\{1, 1, 2\}$ as having three elements. The definition fixes this directly: a set is an unordered collection of distinct objects. Reordering the roster names the same set, and a repeated entry adds nothing. The test for two sets being equal is whether they have exactly the same members, never the order they were written or how many times each was typed. A small check settles every case: is each object in, or out.
the bar in $\{x \mid P(x)\}$ is an equation to solve. The bar reads “such that,” not “equals.” The expression $\{\, x \mid x > 5 \,\}$ does not ask you to solve for one value of $x$; it collects every object for which the property $x > 5$ is true. Set-builder notation is a filter over a universe of candidates, keeping the ones that pass the property and discarding the rest. When the property happens to be an equation, as in Example 2, you do solve the equation, but only to find which objects pass the filter, and the result is still a set, not a single number.
Practice Problems
Let $A = \{2, 4, 6, 8\}$. Decide whether each statement is true: (a) $4 \in A$, (b) $5 \in A$, (c) $8 \notin A$.
Write the set $\{5, 10, 15, 20, 25\}$ in set-builder notation.
List the elements of $\{\, x \mid x \text{ is an integer and } -2 \le x \le 3 \,\}$.
A classmate claims that $\{\, x \mid x \text{ is an integer and } x^2 = 4 \,\}$ equals $\{2\}$. Is the claim correct? If not, give the correct roster.
For each set, give the roster if it is finite, the empty set if it has no elements, or an explanation with leading terms if it is infinite.
(a) $\{\, x \mid x \text{ is an integer and } x^2 = -1 \,\}$
(b) $\{\, x \mid x \text{ is a positive even integer} \,\}$
Mastery Checklist
Novice (Level 1-2):
Competent (Level 3-4):
Proficient (Level 5):
Mental Model
Picture a property as a gate and the objects of the universe as a crowd walking toward it. The gate asks one yes-or-no question: does this object have the property $P(x)$. Objects that answer yes pass through and join the set. Objects that answer no are turned away. Set-builder notation is the gate written down. Roster notation is the photograph of everyone who made it through, taken after the gate is closed. When the crowd is small, the photograph is easy. When the crowd never stops arriving, only the gate can be written down in full.
Connections
Looking ahead:
- Propositional logic gives the language for the property $P(x)$ that a set-builder description filters on.
- Predicates and quantifiers treats $P(x)$ as a predicate and “such that” as its truth condition.
- Sets develops subset, equality, and the power set, all written in the two notations established here.
Real-world connections:
- A database query that returns “every record where the balance is over 1000” is set-builder notation in another costume: a property filters a universe of records.
- A spam filter sorts every incoming message into the set that passes a rule and the set that does not, exactly the gate model above.
Resources
- Textbook (primary): Rosen, Discrete Mathematics and Its Applications, 8th edition, Section 2.1 Sets, roster and set-builder notation, pages 121-124. This is the source of every definition on this page.
- Open companion: Levin, Discrete Mathematics: An Open Introduction, the Sets chapter, free online treatment of set-builder notation: https://discrete.openmathbooks.org/dmoi3/sec_intro-sets.html
- Next node in the tree: Sets (
dm-sets), the formal week-3 development this review feeds.
| Previous | Up | Next |
|---|---|---|
| (Week 0 start) | Skills Index | Propositional Logic |
Last updated: 2026-06-16