Is \mathbb {N} \times \mathbb {N} countable?
The elements of \mathbb {N} \times \mathbb {N} are ordered pairs of two natural numbers, for example, (3,5). We can imagine them in a 2D grid: \begin {array}{cccc}
\vdots & & & ⋰ \\
(2,0) & (2,1) & (2,2) & \\
(1,0) & (1,1) & (1,2) & \\
(0,0) & (0,1) & (0,2) & \dots
\end {array}
At first it seems like the answer should be no. Each row of the 2D grid is the same size as a complete copy of \mathbb {N}; and we have infinitely many rows! How could infinitely many copies of \mathbb {N} be the same size as \mathbb {N}?
And indeed, if we try listing the elements by row or column it definitely doesn’t work. “First, list all the elements in row 0; then, list all the elements in row 1; then row 2; and so on”—we will spend an infinitely long time just listing elements of the form (0,n) and never even get around to pairs starting with anything other than 0.
However, surprisingly, \mathbb {N} \times \mathbb {N} is countable! Again, we can show this by listing the pairs in a clever order that guarantees we will reach any specific pair in a finite amount of time. The key idea is to list them by diagonals, that is, we list the pairs (x,y) in order of the sum x+y. First we list all the pairs with sum 0 (there’s only one, (0,0)), then all the pairs with sum 1 (there are two of them, (1,0) and (0,1)), then the pairs with sum 2, and so on. We end up with a list that looks like this: \begin {array}{ccccccccc}
\mathbb {N}: & 0 & 1 & 2 & 3 & 4 & 5 & 6 & \dots \\
& \updownarrow & \updownarrow & \updownarrow & \updownarrow
& \updownarrow & \updownarrow & \updownarrow & \\
\mathbb {N} \times \mathbb {N}: & (0,0) & (1,0) & (0,1) & (2,0) & (1,1) & (0,2) & (3,0) & \dots
\end {array}