The positive integers, the pairs of positive integers and the rational numbers can all be put into one numbered list. Can the real numbers between and be listed too? This page presents Cantor’s diagonal argument, which takes any proposed list, uses its own digits to build a number between and that the list misses, and so shows that no list can contain them all. It also explains why the new number is built from the digits and only.
Key terms
Cantor’s diagonal argument
Definition Cantor’s diagonal argument proves that the real numbers strictly between and cannot all be placed in one numbered list. Suppose someone offers a list of numbers in this interval, any list at all, and claims that it is complete. Write each row as a decimal expansion
so that is the th digit after the point in row , and write a decimal that stops, such as , with endless zeros. The digits form the diagonal. Build a new number by the rule
Then differs from row in the th digit, for every . Because uses only the digits and , no other decimal expansion names the same number, so a different digit means a different number, and for every . Also , so lies strictly between and . The list misses a number of the interval, which contradicts the claim that it is complete. Since the list was arbitrary, no list contains all the real numbers between and , and this set is uncountable. Georg Cantor published the argument in 1891.
In plain words Whatever list you are handed, read off its diagonal and write a number that disagrees with the first row in the first digit, with the second row in the second digit, and so on forever. That number lies between and but sits in no row, so the list was not complete after all.
Example Suppose the list begins with these four rows, with the diagonal digits in bold.
The diagonal digits become , so , and its later digits come from later rows in the same way. The number differs from in the first digit, from in the second, from in the third and from in the fourth. If someone suggests that is row one million, there is no need to look at the other digits of that row. The millionth digit of was chosen to differ from the millionth digit of row one million, so is not that row either.
Decimal expansion
Definition A decimal expansion , with each digit one of , names the real number
the number that the truncations , , and so on approach. Every real number from to has at least one decimal expansion of this form. Two different expansions can name the same number in only one way. They agree before some place, and at that place one has a digit followed by endless 9s while the other has the digit followed by endless 0s, as in . So an expansion that ends neither in endless 0s nor in endless 9s is the only expansion of its number.
In plain words A decimal expansion is an endless string of digits after the point. Most numbers have just one, but a positive number that can be written with finitely many digits, such as , also has a second one that ends in endless 9s.
Example The expansion is the geometric series , in which each term is a tenth of the one before, so its sum is
Doubling every digit gives . A number whose digits are all or has each digit at least and at most , so , and such a number lies strictly between and . It has no second expansion, because its expansion ends neither in endless 0s nor in endless 9s. By contrast , the same kind of pair as in Why 0.999… Equals 1.
Proof by contradiction
Definition A proof by contradiction proves a statement by assuming that it is false and deducing from that assumption, by valid steps, something impossible, such as a statement together with its opposite. Valid steps from a true assumption never lead to something false, so the assumption must be false, and the statement is true. In Cantor’s argument the assumption is that some list contains every real number between and . The contradiction is the number , which lies between and , so it should be in the list, and yet differs from every row. Nothing about the list was used except that it is a numbered list of such numbers, so the contradiction rules out every possible list, including lists that no formula or computer could produce, and not only the lists someone has tried.
In plain words To show that something cannot happen, suppose that it does and follow the consequences until they contradict each other. The diagonal argument can also be read directly, as a recipe that takes any list and produces a number the list misses.
Example There is no largest positive integer. Suppose were the largest one. Then is also a positive integer and , which contradicts the choice of , so no largest positive integer exists. The same pattern shows that there is no smallest positive rational number, since half of a positive rational number is a smaller one.
Uncountable set
Definition A set is uncountable when it is not countable, that is, when it is infinite and there is no one-to-one correspondence between it and the positive integers. Equivalently, the set is not empty and every endless list made of its elements misses at least one of them. Every subset of a countable set, meaning every set made of some of its elements, is countable, so any set that contains an uncountable set is uncountable as well. The diagonal argument shows that the set of real numbers between and is uncountable, so the set of all real numbers is uncountable too.
In plain words An uncountable set is too large to be numbered, even with all the positive integers, so infinite sets do not all have the same size. The claim is about the ideal set of all real numbers in the interval, not about the finitely many points or pixels that any drawing of it shows.
Example The rational numbers between and form a countable set, as the diagonal enumeration of fractions shows. If the irrational numbers between and were countable too, with lists of the irrational ones and of the rational ones, then
would list every real number between and , which the diagonal argument rules out. So the irrational numbers between and form an uncountable set, while the rational numbers there form a countable one. Every interval of positive length between and contains numbers of both kinds, so the difference between the two sets is one of size, not of position on the line.
Check yourself
- A list begins with the following five rows. Find the first five digits of the diagonal number , and name a place where differs from .
Show the answer
The diagonal digits are the first digit of , the second of and so on, which gives . The rule turns into and every other digit into , so the new digits are and
The rule guarantees a difference from in the fourth digit, where has and has . Here the two numbers happen to differ in the third digit as well, but the fourth place is the one the construction controls for every possible row .
- Change the rule so that the new digit is when the diagonal digit is , and otherwise. Apply it to the list whose first row is and whose row , for , is , so the list continues , , , and so on. What number does the changed rule build, and is it missing from the list? What does the rule with the digits and build?
Show the answer
The number equals , so it has exactly digits after the point, and its th digit is . The diagonal is therefore , and the changed rule gives the digits , which build
This is the first row. The new expansion differs from every row in the diagonal place, including from in the first digit, and yet the number it names is in the list, because and are two expansions of one number. The digit test is only valid when the new expansion is the only expansion of its number.
The rule with the digits and gives , so it builds . This expansion ends neither in endless 0s nor in endless 9s, so it is the only one this number has, and it does not stop. Every row of the list is a decimal that stops, so really is missing.
- Someone repairs the list from the first question by putting at the top and moving every other row down one place. Find the first six digits of the new diagonal number, and explain why no repair of this kind can succeed.
Show the answer
The new rows are , so the new diagonal takes the first digit of , the second digit of , the third of , the fourth of , the fifth of and the sixth of . These are , and the rule gives
This number is missing from the repaired list for the same reason as before, and it differs from already in the first digit. Any repair, whether it adds one number, finitely many or a whole numbered list of them, produces another numbered list, and the diagonal argument applies to every numbered list. So each repair is answered by a new missing number, and the real numbers between and stay uncountable.