History of Math

Cantor’s Diagonal Argument

Cantor listed infinitely many binary sequences. By flipping the diagonal bits, he built a new sequence that differs from every listed row, proving the list cannot be complete.

6 minLevel 2/3The interactive stage stays ad-free.
Rows listed8Diagonal00111101Candidate—DifferencesNot built yet
12345678r101001011r210110100r300101101r411010010r501101001r610010110r700011100r811100011Press “Flip the diagonal” to build a sequence that cannot be in the list.
diagonal bits new sequence differs from row n

new[n] ≠ row n[n] at every position n. So the new sequence differs from every listed row.

Cantor’s argument does not rely on this particular list. Any claimed complete list of infinite binary sequences has a diagonal, and flipping it produces a sequence outside that list. The real numbers can be encoded as binary sequences, so they are uncountable.

The amber cells are the diagonal. Flipping them turns 0 into 1 and 1 into 0, producing a new sequence. Green dots mark the positions where it differs from the corresponding row. Add it to the list and the same construction still finds a missing sequence.

What you are seeing

1

Suppose every infinite binary sequence could be listed in rows.

2

Read the diagonal: row 1, column 1; row 2, column 2; and so on. Flip each diagonal bit.

3

The new sequence differs from row n at position n, for every n. So it is missing from the list — contradiction.

Why it matters

This argument proved that the real numbers are uncountable. It founded set theory and changed how mathematics understands infinity.

Complexity & details

For an n×n finite approximation, the construction is O(n). The full argument is a proof, not a finite algorithm.

Frequently asked questions

Does this prove all infinities are different?+

No. It proves the reals are uncountable, while the naturals are countable. Cantor’s theorem extends the idea to power sets.

Why can’t we just add the new sequence to the list?+

You can add it to a finite list, but the argument repeats: any proposed complete list has a missing diagonal sequence. The contradiction is structural.