MethodMath
Ask
Join
HomeTopicsAskAlerts
Profile

© 2026 MethodMath. Built for mathematical knowledge sharing.

AboutContactGuidelinesPrivacyTermsCookies
Chloe Villeneuve
Chloe Villeneuve
Apr 5, 2026

How to prove that the set of rational numbers is countable?

In my Real Analysis class, we proved that Q\mathbb{Q}Q is countable by constructing a bijection with N\mathbb{N}N. The standard proof uses the diagonal array argument:

11121314⋯21222324⋯31323334⋯41424344⋯⋮⋮⋮⋮⋱\begin{matrix} \frac{1}{1} & \frac{1}{2} & \frac{1}{3} & \frac{1}{4} & \cdots \\\frac{2}{1} & \frac{2}{2} & \frac{2}{3} & \frac{2}{4} & \cdots \\\frac{3}{1} & \frac{3}{2} & \frac{3}{3} & \frac{3}{4} & \cdots \\\frac{4}{1} & \frac{4}{2} & \frac{4}{3} & \frac{4}{4} & \cdots \\\vdots & \vdots & \vdots & \vdots & \ddots \end{matrix}11​12​13​14​⋮​21​22​23​24​⋮​31​32​33​34​⋮​41​42​43​44​⋮​⋯⋯⋯⋯⋱​

Then we traverse along diagonals and skip duplicates. But I'm confused: doesn't Cantor's diagonal argument also show that R\mathbb{R}R is uncountable? Why does the same diagonal argument work for countability of Q\mathbb{Q}Q but uncountability of R\mathbb{R}R?

1 answers250 views

1 Answer

6
Robert Fischer
Apr 6, 2026
Accepted
These two diagonal arguments are **different** despite both involving a 2D array. **For $\mathbb{Q}$ (showing countability):** We arrange all positive rationals in an infinite grid where entry $(i,j) = i/j$. We then traverse the grid along **finite diagonals** (constant $i+j$) and list each new rational the first time we encounter it. This gives a **sequence** that hits every positive rational. Since a sequence is exactly a bijection with $\mathbb{N}$, this shows $\mathbb{Q}^+$ is countable. Extending to all of $\mathbb{Q}$ is then straightforward. The grid traversal works because each diagonal is finite, so every rational appears at a finite position. **For $\mathbb{R}$ (showing uncountability — Cantor's diagonal argument):** Assume $\mathbb{R}$ is countable, so we can list all real numbers in $[0,1]$ as $r_1, r_2, r_3, \ldots$. Write each in decimal form: \begin{align*} r_1 &= 0.d_{11}d_{12}d_{13}\ldots \\ r_2 &= 0.d_{21}d_{22}d_{23}\ldots \\ r_3 &= 0.d_{31}d_{32}d_{33}\ldots \\ &\vdots \end{align*} Construct a new number $x = 0.x_1x_2x_3\ldots$ where $x_i \ eq d_{ii}$ (e.g., $x_i = 5$ if $d_{ii} \ eq 5$, else $x_i = 6$). Then $x$ differs from every $r_i$ in the $i$-th decimal place, so $x$ is not in the list — a contradiction. Hence $\mathbb{R}$ is uncountable. The key difference: the $\mathbb{Q}$ grid uses **finite diagonals** and produces an enumeration. Cantor's diagonal proof uses the **diagonal of the enumeration itself** to construct a missing element. One shows existence of a listing; the other shows impossibility of a listing.
Still unsure? Join to comment or ask a follow-up.
Login or Register to post your answer

Suggested questions

Do I need Calculus 3 before learning Fourier series?

3494

Does 1+2+3+4+... really equal -1/12? Math explained

25.6k

is 0.999 repeating exactly equal to 1 or just approximately equal explain the proof

23.5k

Why does 0 factorial equal 1 instead of 0? Simple proof

31.4k

Does the Banach-Steinhaus theorem hold for non-complete normed spaces?

31.1k