Concept · Domain 01 — Foundations & Logic

Set

A collection of distinct objects considered as a single entity — the foundational concept from which all modern mathematics is built.

Entry properties for Set
TypeConcept
Domain01 — Foundations & Logic
MSC202003-XX (Mathematical logic and foundations); 03Exx (Set theory)
Also known asmathematical set, collection, family (in some contexts), class (informal; see note)
StatusActive — foundational, stable definition
ConfidenceHigh — see provenance
Last reviewed
JSONfoundations-logic/set/index.json
Markdownfoundations-logic/set/index.md

Definition

A set is a well-defined collection of distinct objects, considered as a single entity. The objects belonging to a set are called its elements (or members). A set is characterised entirely by its elements: two sets are equal if and only if they have exactly the same elements. Any object — a number, a function, another set, a letter, a physical thing — can be an element of a set. The concept of set, formulated with mathematical precision by Georg Cantor in papers beginning in 1874 and culminating in his 1883 Grundlagen einer allgemeinen Mannigfaltigkeitslehre (Foundations of a General Theory of Manifolds), became the universal language in which virtually all of modern mathematics is expressed, formalised axiomatically in the Zermelo-Fraenkel system (ZFC) in the early 20th century.

Notation note: Elements are typically listed in braces: {1, 2, 3}. The symbol means "is an element of" (aA reads "a is in A"). The empty set — the set with no elements — is written or {}.

Curious — No background needed

Every number you have ever written down, every shape you have ever drawn, every equation you have ever solved — mathematicians proved in the 1870s that all of it can be built from just one idea: a collection.

A set is just a bunch of things, grouped together and thought of as a single thing. The set of your family members. The set of prime numbers less than 10: {2, 3, 5, 7}. The set of all even integers. The set containing only the colour blue and the number 47. Sets can contain anything — numbers, words, other sets, and even nothing at all (the empty set, written ∅, is a perfectly valid set that happens to contain no elements).

The person who realised this ordinary idea could be the foundation of all mathematics was Georg Cantor, a German mathematician working in the 1870s. His contemporaries thought he was eccentric. The leading mathematician of his day, Leopold Kronecker, called him a "corrupter of youth" and blocked him from professorships at prestigious universities. Cantor suffered a mental breakdown partly from this professional isolation.

He was also right about something astonishing: some infinities are bigger than others. The set of all even numbers is infinite. The set of all natural numbers is also infinite. But the set of all real numbers (every decimal, every fraction, every irrational number) is a larger kind of infinite. Cantor proved this — by showing that you can never list all the real numbers in a sequence, no matter how clever your listing is. He called this diagonal argument, and it is one of the most elegant proofs in mathematics.

Today, sets are the universal language of mathematics. When a mathematician defines a function, they define it as a special kind of set. When they define a number system, they define it as a set with certain rules. When they define geometric shapes, they define them as sets of points. The entire logical structure of mathematics — every theorem, every definition — lives inside set theory.

Cantor was eventually rehabilitated. By the end of his life, David Hilbert — who became the most influential mathematician of the early 20th century — declared: "No one shall expel us from the paradise that Cantor has created for us."

Exploring — Practical detail

Notation and membership

A set is typically named with a capital letter. Elements are listed in braces or described by a property. The two standard ways to define a set:

  • Roster notation: A = {1, 2, 3, 4, 5} — list the elements explicitly.
  • Set-builder notation: B = {x : x is a natural number and x < 6} — describe the rule that elements must satisfy. This is written with a colon or vertical bar meaning "such that."

Membership is written aA ("a is an element of A") and aA ("a is not an element of A"). Order does not matter: {1, 2, 3} = {3, 1, 2}. Repetition does not matter: {1, 1, 2} = {1, 2}. A set is defined entirely by what it contains.

Key operations

Four fundamental operations on sets produce new sets from old ones:

  • Union (AB): the set of elements that are in A or B (or both). If A = {1, 2} and B = {2, 3}, then A ∪ B = {1, 2, 3}.
  • Intersection (AB): the set of elements in both A and B. A ∩ B = {2}.
  • Difference (A \ B): elements in A but not B. A \ B = {1}.
  • Power set (𝒫(A)): the set of all subsets of A. For A = {1, 2}, the power set is {∅, {1}, {2}, {1,2}} — a set with 4 elements, or 2² elements in general for a set with 2 elements.

Subsets

Set A is a subset of B (written AB) if every element of A is also an element of B. The empty set ∅ is a subset of every set. Every set is a subset of itself. If A ⊆ B and B ⊆ A, then A = B — this is the standard proof technique for showing two sets are equal.

Cardinality

The cardinality of a set is the number of elements it contains, written |A|. For finite sets, this is just a count: |{a, b, c}| = 3. For infinite sets, cardinality becomes subtle — Cantor showed that different infinite sets can have different cardinalities. The cardinality of the natural numbers ℕ = {0, 1, 2, 3, …} is called ℵ₀ (aleph-null), the smallest infinite cardinal. The cardinality of the real numbers ℝ is strictly larger, written 2^ℵ₀ or 𝔠 (the cardinality of the continuum).

Combinatorial applications

Set theory is not merely abstract. The operations above have direct combinatorial applications. The inclusion-exclusion principle — |A ∪ B| = |A| + |B| − |A ∩ B| — counts the elements of a union by avoiding double-counting the intersection. Extended to three or more sets, it solves counting problems in probability, number theory, and combinatorics throughout mathematics.

The Indian context

While formal set theory is a 19th-century European development, collection-based reasoning has ancient precedents. Pingala's Chandaḥśāstra (c. 3rd–2nd century BCE, India) contains systematic enumeration of prosodic patterns that amounts to combinatorial reasoning over finite collections — a different tradition from Cantor's, but an independent recognition that grouping objects and counting arrangements is a mathematical discipline. This lineage is noted in the Indian Mathematical Tradition domain.

Deep Dive — Formal and citable

Naive set theory and Russell's Paradox

Cantor's original set theory (now called naive set theory) defined a set as any collection of objects defined by a property. Formally: for any property P, the collection {x : P(x)} is a set. This is Cantor's Comprehension Principle (also called the Axiom of Unrestricted Comprehension). In 1903, Bertrand Russell showed this principle leads to contradiction. Consider the set R = {x : x ∉ x} — the set of all sets that do not contain themselves. Ask: is R ∈ R? If yes, then by definition R ∉ R. If no, then by definition R ∈ R. This is Russell's Paradox. It proved that naive set theory is inconsistent, forcing the axiomatic approach.

ZFC — the standard axiom system

The resolution was to restrict what sets can be formed. The Zermelo-Fraenkel axioms with the Axiom of Choice (ZFC), developed by Ernst Zermelo (1908) and refined by Abraham Fraenkel (1922), provide nine axioms that govern which collections are legitimate sets. The axioms include Extensionality (sets are equal iff they have the same elements), Pairing (for any two sets, a set containing them both exists), Union, Power Set, Infinity (an infinite set exists), Separation (subsets can be formed from a set by a property), Replacement (images of sets under functions are sets), Regularity (no set contains itself), and the Axiom of Choice. The standard reference is Thomas Jech's Set Theory (Springer, 3rd Millennium Edition, 2003).

Formal definition (ZFC)

In ZFC, everything is a set. There are no "urelements" (non-set objects). The natural numbers are constructed as sets: 0 = ∅, 1 = {∅}, 2 = {∅, {∅}}, 3 = {∅, {∅}, {∅, {∅}}}, and so on (the von Neumann ordinals). A function from set A to set B is defined as a set of ordered pairs (itself defined as sets) satisfying the function property. Ordered pair (a, b) is defined as {{a}, {a, b}} (the Kuratowski encoding). Every mathematical object used in modern mathematics — numbers, functions, relations, structures — can be encoded as a set.

Cantor's theorem

For any set A, the power set 𝒫(A) has strictly greater cardinality than A: |𝒫(A)| > |A|. This holds for infinite sets as well as finite ones. The proof uses a diagonal argument: suppose f : A → 𝒫(A) is any function. Define D = {x ∈ A : x ∉ f(x)}. Then D ∈ 𝒫(A). Suppose f(y) = D for some y ∈ A. Then y ∈ D iff y ∉ f(y) = D — a contradiction. So no surjection from A to 𝒫(A) exists, and |𝒫(A)| > |A|. This immediately shows there is no largest cardinal, yielding an infinite hierarchy of infinities: ℵ₀ < 2^ℵ₀ < 2^(2^ℵ₀) < …

Why the diagonal argument works

The diagonal argument's power comes from self-reference. It constructs a set D that is specifically designed to differ from every set in the range of f — it includes x if f(x) does not include x, and excludes x if f(x) includes x. D is a set that disagrees with every output of f at exactly the element x that maps to it. So D cannot be in the range of f. Since this works for any f, no function can surject A onto 𝒫(A).

The same diagonal argument proves Gödel's incompleteness theorems and the halting problem — showing that the power of self-reference recurs throughout foundations of mathematics and theoretical computer science.

The Continuum Hypothesis

Cantor asked whether there is a set with cardinality strictly between ℵ₀ and 2^ℵ₀ — that is, whether there is an infinity between the natural numbers and the real numbers. This is the Continuum Hypothesis (CH). Kurt Gödel showed in 1940 that CH is consistent with ZFC (it cannot be disproved from ZFC). Paul Cohen showed in 1963 that its negation is also consistent (CH cannot be proved from ZFC either). CH is therefore independent of ZFC — neither provable nor disprovable within the standard axiom system. This is one of the most profound results in foundations of mathematics; see Cohen, P.J., "The independence of the continuum hypothesis," Proceedings of the National Academy of Sciences, 50(6), 1143–1148, 1963.


Relationships

Prerequisite for this entry

  • Proof — Understanding what constitutes a valid mathematical proof is necessary before the formal theory of sets can be developed rigorously.

What this entry enables (consequences)

  • ZFC Axioms — The Zermelo-Fraenkel axioms with Choice are the formal axiomatic system built to govern which set-like collections are legitimate sets, resolving the paradoxes of naive set theory.
  • Function — In modern mathematics, a function is formally defined as a special kind of set (a set of ordered pairs satisfying the function property), making Set the prerequisite for the rigorous definition of Function.
  • Natural Number — The natural numbers are constructed from the empty set via the von Neumann ordinal construction inside ZFC: 0 = ∅, 1 = {∅}, 2 = {∅, {∅}}, …
  • Group — A group is a set equipped with a binary operation satisfying four axioms; the set-theoretic framework is the language in which the group axioms are stated.
  • Zero — In the set-theoretic construction of arithmetic, zero is defined as the empty set ∅, making Set the logical foundation for the number zero itself.

Historical lineage

  • Combinatorics (Pingala, c. 3rd–2nd century BCE) — Pingala's Chandaḥśāstra contained the earliest systematic enumeration of combinatorial arrangements — collection-based reasoning that is a distant but real precursor to the formalisation of collections as mathematical objects.
  • Gödel's Incompleteness Theorems — Gödel's theorems, proved within set-theoretic formal systems, showed that any sufficiently powerful axiomatic system (including ZFC) contains true statements it cannot prove — a deep structural result made possible by the set-theoretic foundations Cantor created.

Related entries

  • ZFC Axioms — The axiomatic system that governs which collections are legitimate sets in modern mathematics.
  • Zero — The empty set (zero elements) is the set-theoretic construction from which the number zero is derived in ZFC.

Canonical sources

  • Tier 1 Georg Cantor. "Grundlagen einer allgemeinen Mannigfaltigkeitslehre" (Foundations of a General Theory of Manifolds). Mathematische Annalen, vol. 21, pp. 545–591. 1883.
    The foundational paper establishing set theory as a mathematical discipline. The primary source for the formal concept of set and Cantor's theory of infinite cardinalities.
  • Tier 1 Ernst Zermelo. "Untersuchungen über die Grundlagen der Mengenlehre I" (Investigations on the Foundations of Set Theory I). Mathematische Annalen, vol. 65, pp. 261–281. 1908.
    The paper establishing the first axiom system for set theory, resolving the paradoxes of naive set theory. Primary source for ZFC axiomatics.
  • Tier 1 Thomas Jech. Set Theory, 3rd Millennium Edition. Springer, 2003. ISBN 978-3-540-44085-7.
    The standard comprehensive treatment of axiomatic set theory. Covers ZFC, large cardinals, forcing, and independence results. Used for all Deep Dive claims about ZFC structure.
  • Tier 3 Paul R. Halmos. Naive Set Theory. D. Van Nostrand Company, 1960. (Reprinted Springer, 1974.)
    The standard graduate-level introduction to informal set theory. Widely cited for pedagogy and intuition. Not a primary source for claims requiring Tier 1 authority.

Provenance

Author
The Codex (Let Us Do It For U), Mumbai
Reviewer
Not yet reviewed by external expert — see build status
Entry created
Last reviewed
— Session 1 initial build
Review due
Confidence
High — Definition sourced from Cantor's original 1883 Mathematische Annalen paper (Tier 1) and Jech's Set Theory (Tier 1). The formal definition of a set is a stable, settled result in foundations of mathematics with no substantive competing definitions.
Build status
Complete (Session 1 proof-of-concept)
Cite this entry as
"Set", Mathematics Codex, https://thecodex.expert/mathematics/foundations-logic/set/, last updated .