Home » Blog » The rationals are dense in the reals.

The rationals are dense in the reals.

Prove that the rational numbers are dense in the reals. I.e., if x, y \in \mathbb{R} with x < y, then there exists an r \in \mathbb{Q} such that x < r < y. It follows that there are then infinitely many such.


Proof. Since x < y, we know (y-x)> 0. Therefore, there exists an n \in \mathbb{Z}^+ such that

    \[ n(y-x) > 1 \quad \implies \quad ny > nx+1. \]

We also know (I.3.12, Exercise #4) that there exists m \in \mathbb{Z} such that m \leq nx < m+1. Putting these together we have,

    \begin{align*}  nx < m+1 \leq nx+1 < ny &\implies \ nx < m+1 < ny \\ &\implies \ x < \frac{m+1}{n} < y. \end{align*}

Since m,n \in \mathbb{Z} we have \frac{m+1}{n} \in \mathbb{Q}. Hence, letting r = \frac{m+1}{n} we have found r \in \mathbb{Q} such that

    \[ x < r < y. \]

This then guarantees infinitely many such rationals since we can just replace y by r (and note that \mathbb{Q} \subseteq \mathbb{R}) and apply the theorem again to find r_1 \in \mathbb{Q} such that x < r_1 < r. Repeating this process we obtain infinitely many such rationals. \qquad \blacksquare

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):