Home  18.013A  Chapter 1  Section 1.2 


Is $\mathbb{Q}$ countable?
Solution:
Each rational number $r$ in $\mathbb{Q}$ is a numerator in $\mathbb{Z}$ divided by a denominator in $\mathbb{N}$ . It is characterized then by the pair $(a,b)$ such that $r=\frac{a}{b}$ . If we look at all pairs $(a,b)$ for $a$ in $\mathbb{Z}$ and $b$ in $\mathbb{N}$ , we will actually get every $r$ over and over again, as $\frac{a}{b},\frac{2a}{2b},\frac{3a}{3b},\dots $
Therefore if we can list all the pairs $(a,b)$ for $a$ in $\mathbb{Z}$ and $b$ in $\mathbb{N}$ we can get a list of the elements of $\mathbb{Q}$ by throwing away duplicates on this list.
Imagine then that we have a vertical column for each $b$ in $\mathbb{N}$ and that column consists of a list of the elements of $\mathbb{Z}$ (as in Exercise 1.1). We can list the resulting pairs by going up every diagonal as in the illustration below. This will give a list of every pair $(a,b)$ for $a$ in $\mathbb{Z}$ and $b$ in $\mathbb{N}$ .
You run through the elements of $\mathbb{N}$ much faster than you do the elements of $\mathbb{Q}$ but again nobody cares about this fact.
To be explicit, we order the elements $n$ of our array in increasing order of $a+b$ and for fixed $a+b$ in increasing order of $i$ .
Thus the first few ratios in this order are
The first of these has $a+b=2$ then there are two with $a+b=3$ , three with $a+b=4$ , and so on.
The ratio $\frac{a}{b}$ will then appear as the ratio in the position $\frac{(a+b1)(a+b2)}{2}+a$ on the list.
You can enter any ratio below and see where it occurs on the list and vice versa.
