Recommended resources
The freely available resources this lesson will direct you to.
Hello! Welcome back to our exploration of the foundations of mathematics.
In our last lesson, we examined the Axiom of Choice, a principle that guarantees our ability to make selections from infinite collections of sets. This raised fundamental questions about what can be said to exist in the mathematical universe, even when we can't explicitly construct it. Today, we continue our journey into the strange world of the infinite by tackling the question of "size".
We've seen that some infinite sets, like the even numbers, can be put into a one-to-one correspondence with the entire set of natural numbers, meaning they have the same "size" or cardinality. This might lead one to suspect that all infinite sets are the same size. Today, you will learn the tool that demolished this intuition: Georg Cantor's diagonal argument. Your learning outcome is to construct Cantor's diagonal argument to prove the uncountability of the real numbers. This is one of the most elegant and profound proofs in mathematics, with deep implications for logic and philosophy.
1. Countable and Uncountable Infinities
Before we can prove that some infinities are "bigger" than others, we need to be precise about what "size" means for infinite sets. As a math student, you'll be familiar with the idea of using functions to compare sets. The core concept, formalized by Cantor, is that two sets have the same cardinality if there exists a bijection (a one-to-one and onto mapping) between them.
A set is called countable if it is either finite or has the same cardinality as the set of natural numbers, . A set that has the same cardinality as is called denumerably infinite. Essentially, a set is countable if you can "list" all its elements in a sequence, even if that sequence is infinite (e.g., ). It might be surprising, but the set of integers () and the set of rational numbers () are both countable.
A set that is not countable is called uncountable. An uncountable set is an infinite set whose elements cannot be listed in a sequence. It represents a "larger" size of infinity.
To solidify these foundational concepts, let's turn to a formal text.
Mathematical Foundations of Computing
The following excerpts from 'Mathematical Foundations of Computing' provide a rigorous introduction to the concept of cardinality and the challenge of comparing infinite sets. This will formalize the intuitions we've just discussed.
Please read the sections titled 'What is Cardinality?' and 'A Formal Definition of Cardinality'. You can find these starting on page 21 and ending on page 28. Focus on how cardinality is defined through pairing elements (bijections) and the counter-intuitive results that arise for infinite sets, such as |Even| = |ℕ|.
2. Constructing the Diagonal Argument
Now, we'll turn to the central question: Is the set of real numbers, , countable? Cantor's diagonal argument shows that it is not. To make the proof as clean as possible, we'll focus on the set of real numbers in the interval . If we can show that this subset of is uncountable, then the larger set must also be uncountable.
The proof is a classic reductio ad absurdum (proof by contradiction):
- Assume for the sake of argument that the set of real numbers in is countable.
- If it's countable, we can list all of its elements in a sequence: .
- We will then use this list to construct a new real number that is in but is guaranteed not to be on the list.
- This shows that our list was never complete to begin with, which contradicts our initial assumption.
- Therefore, the assumption must be false, and the set is uncountable.
The following short video provides a brilliant and clear execution of this proof. It uses a clever simplification to avoid a minor technicality with decimal representations (the fact that ).
S01.9 Proof That a Set of Real Numbers is Uncountable
This video from MIT OpenCourseWare presents a concise and rigorous version of Cantor's diagonal proof. Pay close attention to how the new number is constructed to differ from every number on the supposed complete list.
Watch the entire video (it's about 4 minutes long). The lecturer first restricts the set to real numbers with decimal expansions involving only '3's and '4's to avoid ambiguity. Then, he demonstrates the diagonal construction and the resulting contradiction.
The Argument Step-by-Step
Let's walk through the logic you just saw. We assume we can list all real numbers in . Let's visualize this list, writing out the decimal expansions:

Our list looks something like this:
Here, is the -th digit of the -th number on the list. The "diagonal" consists of the digits .
Now, we construct a new number, let's call it , according to a specific rule. For each digit on the diagonal, we'll choose the corresponding digit of to be different. A simple rule could be:
Let the -th digit of , let's call it , be defined as:
So, our new number is
By its construction, is a real number in . According to our initial assumption, it must appear somewhere on our "complete" list. Let's say it's the -th number, so .
But is this possible?
- By our rule, the 1st digit of () is different from the 1st digit of (). So .
- The 2nd digit of () is different from the 2nd digit of (). So .
- For any , the -th digit of () is, by construction, different from the -th digit of (). So .
This is a contradiction. Our new number cannot be equal to any number on the list. Therefore, the list was not complete. Since this procedure can be applied to any attempted list of the real numbers, no such list can ever be complete.
The set of real numbers in is uncountable.
Test your understanding!
Suppose you are given the following (incomplete) list of real numbers in .
Using the rule "if the diagonal digit is , the new digit is 5; if the diagonal digit is , the new digit is 1", construct the first five digits of the new real number that is guaranteed not to be on this list.
Show answer
Let's find the diagonal digits:
Now we apply the rule to construct the digits of :
So, the first five digits of our new number are . Notice that this number differs from in the 1st decimal place, in the 2nd, and so on, for at least these five entries.
3. Implications and Connections
Cantor's proof was revolutionary. It formally established that there are different "sizes" of infinity. The cardinality of the natural numbers, , is denoted (aleph-nought). The cardinality of the real numbers, , is denoted (the cardinality of the continuum). We have just proven that .
This discovery opened up a "paradise" of transfinite arithmetic, but it also posed deep philosophical questions that are central to your interests:
- What is the nature of these higher infinities? Do they exist as Platonic objects, or are they merely consequences of our axiomatic system?
- How many sizes of infinity are there? Cantor also proved that for any set , the cardinality of its power set is strictly greater than the cardinality of itself. This implies an infinite hierarchy of infinities: .
- The Continuum Hypothesis: Cantor conjectured that there is no set whose cardinality is strictly between and . This hypothesis, like the Axiom of Choice, was later proven to be independent of the standard axioms of ZFC set theory.
Furthermore, the method of diagonalization is a powerful proof technique that you will see again. It is the engine behind some of the most profound limitative results in logic and computer science, including Gödel's Incompleteness Theorems and Turing's proof of the unsolvability of the Halting Problem. In each case, a self-referential "diagonal" entity is constructed that cannot fit into an assumed complete system, thereby proving the system's incompleteness.
The video below briefly situates Cantor's argument in this broader context, which will be valuable as we move toward Gödel's theorems.
Diagonal Argument : Cantor, Turing, Tarski and Lawvere
This video, 'Diagonal Argument', frames Cantor's proof as the first of several major applications of this powerful idea.
You can watch the first minute (0:00-1:10) to see the explicit connection made between Cantor's argument and the work of Gödel and Turing. This helps frame today's lesson within the larger narrative of 20th-century logic.
Conclusion
In this lesson, we have used a powerful and elegant proof to uncover a fundamental truth about the structure of the mathematical universe.
Key Takeaways:
- A set is countable if its elements can be put into a one-to-one correspondence with the natural numbers. Otherwise, it is uncountable.
- Cantor's diagonal argument is a proof by contradiction showing that the set of real numbers is uncountable.
- The argument proceeds by assuming the reals can be listed, and then constructing a new real number (the "diagonal" number) that is guaranteed to differ from every number on the list, thus proving the list is incomplete.
- This proves that there are different sizes of infinity; specifically, the cardinality of the natural numbers is strictly less than the cardinality of the real numbers ().
Preview of the Next Lesson:
The diagonal argument works by showing a mismatch between a list (a syntactic object) and the set it purports to describe (a semantic object). To fully appreciate Gödel's work, which uses a similar trick, we must first become very clear about this distinction. In our next lesson, we will do just that, as we move to the next learning outcome: Explain the distinction between syntax and semantics in the context of formal systems.