Learn
Lesson · Sets, Relations, and Functions · Sets

Sets and Membership

A set is determined entirely by what belongs to it. Roster and set-builder notation, the empty set, and why order and repetition carry no information.

A = {1, 2, 3} roster notation A = {x ∈ ℤ : 0 < x < 4} set-builder notation A = B ⟺ ∀x (x ∈ A ↔ x ∈ B) extensionality {1, 2} = {2, 1} = {1, 1, 2} order and repetition mean nothing
One set, several descriptions

Core ideas

What this lesson establishes

Two sets are equal when they have the same members. Everything in this lesson follows from that single sentence.

1

A set is its members

{1, 2} and {2, 1, 1} are the same set. Notation differs; the object does not. This is called extensionality.

2

Membership is the primitive relation

x ∈ A is either true or false for every x. A collection where membership is uncertain is not a set in this sense.

3

The empty set is a set

∅ has no members, and there is only one such set. ∅ and {∅} are different: the second has one member, which happens to be empty.

The material

What a set is

Notation, equality, and the standard number sets.

Definition · Set and membership

A set is a collection of distinct objects, called its elements or members. We write x ∈ A when x is a member of A, and x ∉ A when it is not.

Two notations describe sets. Roster notation lists the members: A = {2, 3, 5, 7}. Set-builder notation states the property that characterises them: A = {x ∈ ℤ : x is prime and x < 10}. The colon is read "such that", and a vertical bar is used equally often.

Definition · Extensionality

A = B exactly when every member of A is a member of B and conversely — that is, ∀x (x ∈ A ↔ x ∈ B). A set carries no information beyond its membership.

Two consequences follow immediately, and both surprise people once. Order carries no information: {1, 2} = {2, 1}. Repetition carries none either: {1, 1, 2} = {1, 2}. If you need order, you need a sequence or a tuple, which “Cartesian Products and Tuples” supplies.

Definition · The empty set

∅ (also written {}) is the set with no members. There is exactly one: any two sets with no members satisfy extensionality vacuously.

The distinction between ∅ and {∅} is worth ten seconds. The first has zero members. The second has one member — the empty set. |∅| = 0 and |{∅}| = 1, and a box containing an empty box is not an empty box.

The standard sets

ℕ natural numbers {0, 1, 2, 3, …} (0 included here) ℤ integers {…, −2, −1, 0, 1, 2, …} ℚ rationals {a/b : a, b ∈ ℤ, b ≠ 0} ℝ real numbers ℂ complex numbers

Whether 0 ∈ ℕ is a convention, not a fact, and sources differ. This path includes it, and says so wherever it matters — a base case at n = 0 versus n = 1 is exactly the kind of detail Induction and Recursion cannot leave ambiguous.

Definition · Cardinality

For a finite set A, |A| is the number of members. |{1, 2, 3}| = 3 and |∅| = 0. “Cardinality and Countability” extends this to infinite sets, where it stops behaving the way the notation suggests.

Example · Set-builder can hide emptiness

{x ∈ ℝ : x² < 0} is ∅, written in a form that does not look empty. A set-builder description says which objects belong; it does not promise that any do.

Interactive

Set algebra

Two expressions, one membership

Set expressions over U = {1, …, 12}Click an element to move it between the sets
selected by Aselected by B

Method

Working with a set description

Decide membership one element at a time.

1

Read the set-builder condition as a predicate

{x ∈ ℤ : P(x)} is exactly the elements of ℤ satisfying P. The domain before the colon matters as much as the condition after it.

2

Test a few candidate elements

Substituting three or four values tells you whether you have read the condition correctly. It does not tell you the set.

3

Check whether the set is empty

A condition no element satisfies describes ∅. This is not an error, and it is easy to miss.

4

Convert between notations

Roster for small sets, set-builder for large or infinite ones. Being able to move between them is what makes a proof of equality writable.

Sets and membership

Score 0 / 0

Deciding membership

Let A = {x ∈ ℤ : x = 3k + 1 for some k ∈ ℤ}.

Is 7 ∈ A? 7 = 3(2) + 1 yes, with k = 2 Is 9 ∈ A? 9 = 3(3) + 0 no — 9 = 3k + 1 has no integer solution Is −2 ∈ A? −2 = 3(−1) + 1 yes, with k = −1 So A = {…, −5, −2, 1, 4, 7, 10, …} — the integers ≡ 1 (mod 3). Number Theory and Cryptography gives that description its own notation.

Note that −2 required a negative k. Set-builder conditions quantify over the domain stated, and forgetting that k may be negative is how half a set goes missing.

Common mistakes

1
Confusing ∈ with ⊆1 ∈ {1, 2} is true; 1 ⊆ {1, 2} is not even well formed, because 1 is not a set. “Subsets and Power Sets” makes the distinction sharp.
2
Reading {∅} as emptyIt has one element. This matters immediately in “Subsets and Power Sets”, where the power set of ∅ is {∅} — a set with one member.
3
Forgetting the domain in set-builder notation{x : x² = 2} is empty over ℚ and has two elements over ℝ. The part before the colon is half the definition.

Check your understanding

✓
Finish when you can convert between the two notations in both directions.

Given {2, 4, 6, 8, 10}, write a set-builder description; given {x ∈ ℤ : x² < 10}, write the roster. If the second gives you seven elements you have remembered the negatives.

Note: Naive set theory — "a set is any collection" — is inconsistent if pushed: the set of all sets that do not contain themselves cannot exist. Every set on this path is built from a stated domain, which is enough to stay clear of the problem.

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.