Set Theory Fundamentals

⚡ Key Takeaways

Set theory is the mathematical study of collections of objects. A set is any well-defined collection of distinct things; from this single idea, all of modern mathematics — numbers, functions, relations, infinity — can be constructed. Founded by Georg Cantor in the 1870s, it is the universal language underlying virtually every branch of mathematics.

💡 The Core Insight

A set is determined entirely by its members — nothing else. Two sets are equal precisely when they contain exactly the same elements (the Axiom of Extensionality). Order does not matter, and repetition does not matter: {1,2,3}\{1,2,3\}, {3,2,1}\{3,2,1\}, and {1,1,2,3}\{1,1,2,3\} are all the same set. This stripped-down notion of "collection" is so general that it can model nearly any mathematical object.

Formal Statement

DefinitionSet, Element, and Membership

A set is a well-defined collection of distinct objects. If an object xx is a member of a set AA, we write:

1
x∈A\quad x \in A

Derivation hint: This is primitive notation — ∈\in is read "is an element of" and is not defined in terms of anything simpler; it is the fundamental relation of set theory. If xx is not a member of AA, we write x∉Ax \notin A. The symbols mean:

  • xx — an object (which may itself be a set)
  • AA — a set
  • ∈\in — the membership relation
DefinitionSet-Builder and Roster Notation

Sets are written in two main ways. Roster (list) notation lists members between braces:

2
A={2,4,6,8}\quad A = \{2, 4, 6, 8\}

Derivation hint: The braces { }\{\,\} denote "the set whose elements are exactly these"; order and repetition are irrelevant by extensionality.

Set-builder notation specifies a defining property P(x)P(x):

3
B={ x∣P(x) }\quad B = \{\, x \mid P(x)\,\}

Derivation hint: Read "∣\mid" as "such that"; BB is the set of all xx for which the statement P(x)P(x) is true. E.g. {x∣x is even and 0<x<10}={2,4,6,8}\{x \mid x \text{ is even and } 0 < x < 10\} = \{2,4,6,8\}.

DefinitionThe Empty Set

The empty set, written ∅\varnothing or {}\{\}, is the unique set with no elements:

4
∅={ x∣x≠x }\quad \varnothing = \{\, x \mid x \neq x\,\}

Derivation hint: Since nothing satisfies x≠xx \neq x, this collection has no members. Uniqueness follows from extensionality — any two empty sets contain "exactly the same elements" (namely none).

DefinitionSubset and Equality

A set AA is a subset of BB (written A⊆BA \subseteq B) if every element of AA is also in BB:

5
A⊆B  ⟺  (∀x)(x∈A  ⟹  x∈B)\quad A \subseteq B \iff (\forall x)(x \in A \implies x \in B)

Derivation hint: ∀\forall means "for all"; the arrow means "implies." This says membership in AA guarantees membership in BB. Two sets are equal exactly when each is a subset of the other:

6
A=B  ⟺  (A⊆B ∧ B⊆A)\quad A = B \iff (A \subseteq B \,\wedge\, B \subseteq A)

Derivation hint: This is the Axiom of Extensionality in operational form — sets with mutual containment have identical members. ∧\wedge means "and." A proper subset (A⊊BA \subsetneq B) means A⊆BA \subseteq B but A≠BA \neq B.

DefinitionSet Operations

For sets AA and BB inside a universal set UU:

7
A∪B={ x∣x∈A ∨ x∈B }\quad A \cup B = \{\, x \mid x \in A \,\vee\, x \in B\,\}

Derivation hint: The <strong>union</strong> collects everything in either set; ∨\vee means "or" (inclusive).

8
A∩B={ x∣x∈A ∧ x∈B }\quad A \cap B = \{\, x \mid x \in A \,\wedge\, x \in B\,\}

Derivation hint: The <strong>intersection</strong> collects only what is in both sets simultaneously.

9
A∖B={ x∣x∈A ∧ x∉B }\quad A \setminus B = \{\, x \mid x \in A \,\wedge\, x \notin B\,\}

Derivation hint: The <strong>difference</strong> ("relative complement") keeps elements of AA that are absent from BB.

10
Ac=U∖A={ x∈U∣x∉A }\quad A^{c} = U \setminus A = \{\, x \in U \mid x \notin A\,\}

Derivation hint: The <strong>complement</strong> is everything in the universe UU that lies outside AA.

TheoremPower Set and Its Size

The power set P(A)\mathcal{P}(A) is the set of all subsets of AA. If AA has nn elements (is finite of cardinality nn), then:

11
∣P(A)∣=2n\quad |\mathcal{P}(A)| = 2^{n}

Derivation hint: Each subset is formed by deciding, independently, "in or out" for each of the nn elements — giving 2×2×⋯×2=2n2 \times 2 \times \cdots \times 2 = 2^n choices.

TheoremCantor's Theorem

For any set AA (finite or infinite), its power set is strictly larger:

12
∣A∣<∣P(A)∣\quad |A| < |\mathcal{P}(A)|

Derivation hint: There can be no surjection from AA onto P(A)\mathcal{P}(A); the proof builds a "diagonal" subset that no element of AA can be mapped to. This shows infinities come in different sizes.

Why It Holds / Derivation

ProofDe Morgan's Laws

We prove the first De Morgan law, (A∪B)c=Ac∩Bc(A \cup B)^c = A^c \cap B^c, by showing mutual subset inclusion (equation [6]).

Step 1. Take any x∈(A∪B)cx \in (A \cup B)^c. By definition of complement [10], x∉A∪Bx \notin A \cup B.

Step 2. By definition of union [7], x∉A∪Bx \notin A \cup B means it is false that (x∈Ax \in A or x∈Bx \in B). By logic, this is equivalent to (x∉Ax \notin A and x∉Bx \notin B).

Step 3. Thus x∈Acx \in A^c and x∈Bcx \in B^c, so by definition of intersection [8], x∈Ac∩Bcx \in A^c \cap B^c. This proves (A∪B)c⊆Ac∩Bc(A\cup B)^c \subseteq A^c \cap B^c.

Step 4. Now take any y∈Ac∩Bcy \in A^c \cap B^c. Then y∉Ay \notin A and y∉By \notin B, so yy is in neither set, hence y∉A∪By \notin A \cup B, hence y∈(A∪B)cy \in (A \cup B)^c. This proves the reverse inclusion.

Step 5. Both inclusions hold, so by [6] the sets are equal. ■\blacksquare

∎
ProofCantor's Theorem by Diagonalization

We show no function f:A→P(A)f: A \to \mathcal{P}(A) can be surjective (hit every subset).

Step 1. Suppose, for contradiction, that ff is a surjection. For each x∈Ax \in A, f(x)f(x) is a subset of AA.

Step 2. Define the "diagonal" set:

D={ x∈A∣x∉f(x) }.\quad D = \{\, x \in A \mid x \notin f(x)\,\}.

This DD is a subset of AA, so D∈P(A)D \in \mathcal{P}(A).

Step 3. Since ff is assumed surjective, there exists some d∈Ad \in A with f(d)=Df(d) = D.

Step 4. Ask: is d∈Dd \in D? By the definition of DD, d∈D  ⟺  d∉f(d)=Dd \in D \iff d \notin f(d) = D. So d∈Dd \in D if and only if d∉Dd \notin D — a contradiction.

Step 5. The assumption fails: no surjection exists. Hence ∣A∣<∣P(A)∣|A| < |\mathcal{P}(A)|. ■\blacksquare

∎
mathematician · Georg Cantor | 1845–1918

Georg Cantor, a German mathematician born in St. Petersburg, single-handedly created set theory in the 1870s–1880s. He proved that the rational numbers are countable but the real numbers are not, establishing that infinity comes in different sizes. His introduction of cardinal and ordinal numbers and the "diagonal argument" revolutionized mathematics. His ideas met fierce resistance — Leopold Kronecker called them dangerous — and Cantor suffered repeated depressive episodes. Today his work is foundational to nearly all of modern mathematics.

Building Intuition

🧠 Intuition

Think of a set as a box with no order and no duplicates — only the question "is this thing in the box?" matters. A subset is a box whose contents are entirely contained in a bigger box. Union is dumping two boxes together (throwing away duplicates); intersection is keeping only what both boxes share. The power set is the box containing every possible smaller box you could form — and Cantor's theorem says this "box of boxes" is always strictly bigger than the original, even when the original is infinite. The empty set is the box with nothing in it — and crucially, the empty box is still a box, which is why ∅\varnothing is a perfectly good set.

Figure
Venn diagram of two sets showing union, intersection, and complement within a universal set U
U (universe) A B A∩B A∪B = both circles Aᶜ = outside A

Worked Examples

ExamplePower Set of a 3-Element Set

Given: A={a,b,c}A = \{a, b, c\}. Find P(A)\mathcal{P}(A) and verify equation [11].

Step 1. By [11], the number of subsets is 2n=23=82^n = 2^3 = 8.

Step 2. List all subsets by size:

  • Size 0: ∅\varnothing
  • Size 1: {a},{b},{c}\{a\}, \{b\}, \{c\}
  • Size 2: {a,b},{a,c},{b,c}\{a,b\}, \{a,c\}, \{b,c\}
  • Size 3: {a,b,c}\{a,b,c\}

Step 3. Count: 1+3+3+1=81 + 3 + 3 + 1 = 8. ✓ (These are the binomial coefficients (30),(31),(32),(33)\binom{3}{0},\binom{3}{1},\binom{3}{2},\binom{3}{3}.)

  P(A)={ ∅,{a},{b},{c},{a,b},{a,c},{b,c},{a,b,c} },∣P(A)∣=8  \boxed{\;\mathcal{P}(A) = \big\{\,\varnothing,\{a\},\{b\},\{c\},\{a,b\},\{a,c\},\{b,c\},\{a,b,c\}\,\big\},\quad |\mathcal{P}(A)| = 8\;}
ExampleSet Operations with Numbers

Given: Universe U={1,2,3,4,5,6,7,8,9,10}U = \{1,2,3,4,5,6,7,8,9,10\}, A={1,2,3,4,5}A = \{1,2,3,4,5\}, B={4,5,6,7}B = \{4,5,6,7\}.

Step 1. Union [7]: combine all elements (no repeats):

A∪B={1,2,3,4,5,6,7}.A \cup B = \{1,2,3,4,5,6,7\}.

Step 2. Intersection [8]: keep shared elements:

A∩B={4,5}.A \cap B = \{4,5\}.

Step 3. Difference [9]: AA minus what is in BB:

A∖B={1,2,3}.A \setminus B = \{1,2,3\}.

Step 4. Complement [10]: UU minus AA:

Ac={6,7,8,9,10}.A^c = \{6,7,8,9,10\}.

Step 5. Verify De Morgan [proof above]: (A∪B)c={8,9,10}(A \cup B)^c = \{8,9,10\}. Also Ac∩Bc={6,7,8,9,10}∩{1,2,3,8,9,10}={8,9,10}A^c \cap B^c = \{6,7,8,9,10\} \cap \{1,2,3,8,9,10\} = \{8,9,10\}. ✓

  A∪B={1,...,7}, A∩B={4,5}, A∖B={1,2,3}, Ac={6,...,10}  \boxed{\;A\cup B=\{1,...,7\},\ A\cap B=\{4,5\},\ A\setminus B=\{1,2,3\},\ A^c=\{6,...,10\}\;}

Common Misconceptions

⚠️ Element vs. Subset

The two most confused relations are membership (∈\in) and subset (⊆\subseteq). For A={1,2,{3}}A = \{1, 2, \{3\}\}:

  • 1∈A1 \in A ✓ (1 is an element)
  • 1⊆A1 \subseteq A ✗ (1 is not even a set; this is meaningless/false)
  • {1}⊆A\{1\} \subseteq A ✓ (the set containing 1 is a subset)
  • {1}∈A\{1\} \in A ✗ (the set {1}\{1\} is not listed as an element)
  • {3}∈A\{3\} \in A ✓ (the set {3}\{3\} is a listed element)

Also note: ∅⊆A\varnothing \subseteq A for every set (vacuously true), but ∅∈A\varnothing \in A only if ∅\varnothing is explicitly an element.

CounterexampleNaïve Comprehension Fails — Russell's Paradox

One might think any property P(x)P(x) defines a set {x∣P(x)}\{x \mid P(x)\}. This is false. Consider:

R={ x∣x∉x }("the set of all sets that are not members of themselves").R = \{\, x \mid x \notin x\,\} \quad\text{("the set of all sets that are not members of themselves").}

Ask: is R∈RR \in R? If R∈RR \in R, then by its defining property R∉RR \notin R. If R∉RR \notin R, then it satisfies the property, so R∈RR \in R. Both cases contradict — so RR cannot exist as a set. This 1901 paradox showed naïve set theory is inconsistent, forcing the development of axiomatic set theory (ZFC), which restricts which collections count as sets.

Connections

connection

Set theory is the connective tissue of mathematics. Functions and Relations are defined as sets of ordered pairs. The number systems of Natural Numbers are constructed set-theoretically (e.g., 0=∅0 = \varnothing, 1={∅}1 = \{\varnothing\}, 2={∅,{∅}}2 = \{\varnothing, \{\varnothing\}\}). Mathematical Logic supplies the symbols ∀,∃,∧,∨\forall, \exists, \wedge, \vee that set-builder notation relies on. Cardinality and Infinity extends counting to infinite sets via Cantor's theorem [12]. And Probability Theory defines events as subsets of a sample space, with union and intersection encoding "or" and "and."

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1874 — Georg Cantor publishes his first paper proving the algebraic numbers are countable and the reals are not, launching set theory.
- 1878 — Cantor formulates the Continuum Hypothesis: there is no infinity strictly between ∣N∣|\mathbb{N}| and ∣R∣|\mathbb{R}|.
- 1883 — Cantor introduces transfinite ordinal and cardinal numbers.
- 1891 — Cantor publishes the diagonal argument, the cleanest proof of ∣A∣<∣P(A)∣|A| < |\mathcal{P}(A)| (equation [12]).
- 1901 — Bertrand Russell discovers Russell's Paradox, exposing the inconsistency of naïve comprehension.
- 1908 — Ernst Zermelo proposes the first axiomatization of set theory to avoid paradoxes.
- 1922 — Abraham Fraenkel and Thoralf Skolem refine it into Zermelo–Fraenkel set theory (ZF); adding the Axiom of Choice gives ZFC, the modern standard.
- 1931 — Kurt Gödel's incompleteness theorems show no axiom system (including ZFC) can prove its own consistency.
- 1963 — Paul Cohen invents forcing and proves the Continuum Hypothesis is independent of ZFC — it can be neither proved nor disproved.

Subtleties & Limits

open-problem

The Continuum Hypothesis (CH) asks whether any infinite set of real numbers must be either countable (size ∣N∣|\mathbb{N}|) or as large as all reals (size ∣R∣|\mathbb{R}|) — with nothing in between. Gödel (1940) showed CH cannot be disproved from ZFC; Cohen (1963) showed it cannot be proved either. CH is therefore independent of the standard axioms: it is genuinely undecidable within them. This raises a deep philosophical question — is CH "really" true or false, or is mathematical truth itself relative to a chosen axiom system? Mathematicians still debate whether new, well-motivated axioms (e.g., large-cardinal axioms) should be adopted to settle it.

See Also

Cardinality and Infinity · Functions and Relations · Mathematical Logic · Axiomatic Set Theory (ZFC) · Boolean Algebra · Probability Theory · Russell's Paradox