Countability and Cardinal Numbers
Learning objectives
- Define countable and uncountable via bijections with
- Construct explicit bijections and
- Apply Cantor's diagonal argument to show is uncountable
- State Cantor's theorem () and its consequences for cardinal arithmetic
There is more than one size of infinity. This single, counterintuitive fact, established by Cantor in 1874, is the gateway to all of modern set theory. The integers and the rationals are countable; despite being densely packed in the real line, they can be listed in a single infinite sequence. The reals are not countable: no enumeration can hit them all. The gap between these two infinities is the source of an entire mathematical universe, and its precise quantification (the continuum hypothesis) is famously independent of the standard axioms.
Bijections measure size
Two sets and have the same cardinality, written , when there exists a bijection (one-to-one correspondence) . For finite sets this matches the everyday notion of size. For infinite sets it is the definition: two infinite sets are "the same size" iff their elements can be paired off perfectly.
A set is countable if , i.e. there exists an injection , equivalently, is finite or there is a bijection (one can list its elements as ). Otherwise is uncountable.
The widget above lets you explore explicit bijections between standard sets. Try : list as , this is the bijection for . Then try the Cantor pairing : enumerate the lattice diagonals . The formula gives an explicit invertible coding.
The rationals are countable
Even though is dense in (every interval contains rationals), there are no more rationals than natural numbers. Proof sketch: arrange positive rationals in a 2D grid with along rows and along columns. Traverse the grid diagonally, skipping fractions that are not in lowest terms: . This is a bijection between and . Combine with the zero and negatives by interleaving: . Hence , the smallest infinite cardinal.
The reals are uncountable: Cantor's diagonal argument
Suppose for contradiction that the reals in can be listed as . Write each in decimal: . Define a new number by choosing each to differ from (and to avoid the digits and to dodge the ambiguity ). Then differs from every at the -th decimal place, so is not in the list. Contradiction. Hence is uncountable.
The cardinality of is denoted (the "cardinality of the continuum"). Whether there is a cardinal strictly between and is the continuum hypothesis, which Godel and Cohen proved is independent of ZFC.
Cantor's theorem: there is no largest cardinal
For any set , the power set has strictly larger cardinality than . Proof: suppose is any function. Define . Then no satisfies : if then by definition (contradiction); if then (contradiction). So is not surjective, hence not a bijection. There are infinitely many infinite cardinals: .
- Computer science (computable functions): The set of Turing machines is countable (each one is a finite description), but the set of all functions is uncountable (in bijection with ). Therefore most functions are uncomputable, this is the foundational reason there is no universal algorithm.
- Number theory (algebraic vs transcendental): The algebraic numbers form a countable set (each is a root of a polynomial with rational coefficients, and there are countably many such polynomials). Since is uncountable, most reals are transcendental. Cantor used this counting argument to prove transcendentals exist before Hermite's explicit proof for in 1873.
- Measure theory: Countable sets in have Lebesgue measure zero, so has measure zero. "Almost every real is irrational" is a precise probabilistic statement coming directly out of countability.
- Statistical mechanics: The state space of a finite-dimensional quantum system is countable when truncated to a basis, but the continuous Hilbert space of operators on an infinite-dimensional separable Hilbert space has cardinality . The gap matters for entropy and microstate counting.
Pause and think: Use the cardinality widget to find a bijection between and . (Hint: the map is one explicit example. There are uncountably many.) Why does this prove ?
Try it
- Use the cardinality widget to verify the bijection. List the first ten values of the inverse map and check no integer is missed.
- Apply the diagonal argument to the list . Construct a real number not in the list.
- Predict first: is the set of finite subsets of countable or uncountable? (Hint: a finite subset of can be encoded as a finite binary string, and the set of finite binary strings is countable.)
- True or false: the set of all sequences of zeros and ones (functions ) is countable. (Hint: this set is in bijection with .)
A trap to watch for
"Countable" does NOT mean "you can finish counting it." A countable set may be infinite, the integers are countable, but the counting process never ends. The technical definition is: there exists an injection into , equivalently a listing as . Some authors use "countable" to mean "denumerable / countably infinite" only (excluding finite sets); others use it to include finite. Velleman and Garrity use the inclusive convention, finite sets are countable too, which is the more common modern usage. Always check the convention before drawing conclusions about "the smallest uncountable set."
What you now know
You can distinguish countable and uncountable sets via bijections with , prove is countable and is not, and recognize that cardinal arithmetic produces an infinite ladder of larger and larger infinities via the power-set operation. The next section confronts the paradoxes that lurked in 19th-century "naive" set theory, where unrestricted set comprehension led to outright contradictions.
Mark section complete →
References
- Garrity, T. (2002). All the Mathematics You Missed: But Need to Know for Graduate School. Cambridge University Press, §10.1-10.2.
- Halmos, P. R. (1960). Naive Set Theory. Springer, §22-24 (Cardinal Numbers).
- Enderton, H. B. (1977). Elements of Set Theory. Academic Press, ch. 6.
- Hrbacek, K., Jech, T. (1999). Introduction to Set Theory (3rd ed.). CRC Press, ch. 4.
- Cantor, G. (1874). "Uber eine Eigenschaft des Inbegriffes aller reellen algebraischen Zahlen." Crelle's Journal, 77, 258-262 (original diagonal-argument paper).