Countable set · Exercise-COUNTABLE-SET-008

Step-by-step solved exercise: Cardinals

Is \(\displaystyle \mathbb{Q}\) countable?

Step by step with comments, a check and common mistakes.

Step-by-step solution

  1. Each rational is written as \(\displaystyle p/q\) with \(\displaystyle p\in\mathbb{Z}\) and \(\displaystyle q\ge 1\).

    \[\displaystyle \mathbb{Q}=\left\{\tfrac{p}{q}: p\in\mathbb{Z},\ q\ge 1\right\}\]
  2. The set of pairs \(\displaystyle (p,q)\) is countable, so we can enumerate them.

    \[\displaystyle \mathbb{Z}\times\mathbb{N}_{\ge 1} \text{ numerable}\]
  3. By traversing the pairs diagonally and skipping repeats, such as \(\displaystyle 2/4\) and \(\displaystyle 1/2\), we get a list of all rationals.

    \[\displaystyle \frac{2}{4}=\frac{1}{2}\]
  4. Therefore, \(\displaystyle \mathbb{Q}\) is countable even though it is dense in \(\displaystyle \mathbb{R}\).

Answer

Yes: \(\displaystyle \mathbb{Q}\) is countable even though it is dense in \(\displaystyle \mathbb{R}\).

🎯 Build my path to this exercise