Introduce to Set

Basis
Last updated: Tags: Set Theory

Sets are the foundation on which almost all of modern mathematics is built. Functions, sequences, probability spaces, even the natural numbers themselves — all of these are ultimately defined in terms of sets. Before you can read or write serious mathematics, you need to be fluent with sets.

What is a set?

A set is an unordered collection of distinct objects. The objects it contains are called its elements (or members).

The most direct way to describe a set is to list its elements inside curly braces:

A={1,  2,  3}A = \{1,\; 2,\; 3\}

Two things to keep in mind:

  • Order doesn’t matter. {1,2,3}\{1, 2, 3\} and {3,1,2}\{3, 1, 2\} are the same set.
  • Repetition is ignored. {1,1,2,3}\{1, 1, 2, 3\} is the same set as {1,2,3}\{1, 2, 3\}.

Membership

The symbol ∈\in means “is an element of.” Its negation ∉\notin means “is not an element of.”

2∈{1,2,3}5∉{1,2,3}2 \in \{1, 2, 3\} \qquad 5 \notin \{1, 2, 3\}

Standard number sets

Certain sets of numbers appear so often that they have reserved symbols:

SymbolNameElements
N\mathbb{N}Natural numbers0,1,2,3,…0, 1, 2, 3, \dots
Z\mathbb{Z}Integers…,−2,−1,0,1,2,…\dots, -2, -1, 0, 1, 2, \dots
Q\mathbb{Q}Rational numbers12,  −34,  7,  …\tfrac{1}{2},\; -\tfrac{3}{4},\; 7,\; \dots
R\mathbb{R}Real numbersπ,  2,  −1.5,  …\pi,\; \sqrt{2},\; -1.5,\; \dots
C\mathbb{C}Complex numbers1+2i,  −i,  …1 + 2i,\; -i,\; \dots

Convention: Whether 0∈N0 \in \mathbb{N} varies by author. In this series, 00 is a natural number.

Set-builder notation

Listing elements works for small sets, but most interesting sets are too large — or infinite — to list explicitly. Set-builder notation lets you describe a set by a property its elements must satisfy:

{x∈R∣x>0}\{x \in \mathbb{R} \mid x > 0\}

Read this as: “the set of all xx in R\mathbb{R} such that x>0x > 0” — the positive reals. The vertical bar ∣\mid stands for “such that.” You will also see a colon used in its place: {x∈R:x>0}\{x \in \mathbb{R} : x > 0\}.

More generally:

{x∈S∣P(x)}\{x \in S \mid P(x)\}

denotes the subset of SS consisting of all elements for which the predicate PP holds.

The empty set

The empty set ∅\emptyset (also written {}\{\}) is the unique set that contains no elements. For every object xx, you have x∉∅x \notin \emptyset.

The empty set plays the same structural role in set theory that 00 plays in arithmetic.

Subsets

A set AA is a subset of BB, written A⊆BA \subseteq B, when every element of AA is also an element of BB:

A⊆B  ≔  ∀x,x∈A  ⇒  x∈BA \subseteq B \;\coloneqq\; \forall x,\quad x \in A \;\Rightarrow\; x \in B

If A⊆BA \subseteq B but A≠BA \neq B, then AA is a proper subset of BB, written A⊊BA \subsetneq B.

A few facts worth memorizing:

  • ∅⊆A\emptyset \subseteq A for every set AA.
  • A⊆AA \subseteq A for every set AA.
  • N⊊Z⊊Q⊊R⊊C\mathbb{N} \subsetneq \mathbb{Z} \subsetneq \mathbb{Q} \subsetneq \mathbb{R} \subsetneq \mathbb{C}.

Set equality

Two sets are equal when they contain exactly the same elements. The standard way to prove A=BA = B is to show mutual containment:

A=B    ⟺    A⊆B   and   B⊆AA = B \;\iff\; A \subseteq B \;\text{ and }\; B \subseteq A

This means sets are fully determined by their elements alone — it does not matter how you wrote down the set.

Core set operations

Given sets AA and BB, you can form new sets using the following operations.

Union

The union A∪BA \cup B collects every element that belongs to AA, to BB, or to both:

A∪B  ≔  {x∣x∈A or x∈B}A \cup B \;\coloneqq\; \{x \mid x \in A \text{ or } x \in B\}

Intersection

The intersection A∩BA \cap B keeps only elements that belong to both AA and BB:

A∩B  ≔  {x∣x∈A and x∈B}A \cap B \;\coloneqq\; \{x \mid x \in A \text{ and } x \in B\}

When A∩B=∅A \cap B = \emptyset, the sets are called disjoint.

Set difference

The difference A∖BA \setminus B (read: ”AA minus BB”) contains elements of AA that are not in BB:

A∖B  ≔  {x∣x∈A and x∉B}A \setminus B \;\coloneqq\; \{x \mid x \in A \text{ and } x \notin B\}

Complement

When all sets under discussion sit inside a fixed universal set UU, the complement of AA is everything in UU that is not in AA:

Ac  ≔  U∖A  =  {x∈U∣x∉A}A^c \;\coloneqq\; U \setminus A \;=\; \{x \in U \mid x \notin A\}

Cardinality

The cardinality of a finite set AA, written ∣A∣|A|, is the number of elements it contains:

∣{a,b,c}∣=3,∣∅∣=0|\{a, b, c\}| = 3, \qquad |\emptyset| = 0

For infinite sets — like N\mathbb{N} or R\mathbb{R} — cardinality still makes sense, but requires more care. You will encounter the full theory of infinite cardinality in later checkpoints.

Summary

  • A set is an unordered collection of distinct objects; write it as {a,b,c}\{a, b, c\} or with set-builder notation {x∈S∣P(x)}\{x \in S \mid P(x)\}.
  • x∈Ax \in A means xx belongs to AA; x∉Ax \notin A means it does not.
  • The empty set ∅\emptyset has no elements and is a subset of every set.
  • A⊆BA \subseteq B iff every element of AA is in BB; A=BA = B iff A⊆BA \subseteq B and B⊆AB \subseteq A.
  • Core operations: union (A∪BA \cup B), intersection (A∩BA \cap B), difference (A∖BA \setminus B), complement (AcA^c).
  • The cardinality ∣A∣|A| counts how many elements a set has.