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


  1. Anonymous says:

    I know that the proof establishes that n is an element of the positive integers, but I think it is insufficient to say that (m+1)/n is a rational number because m and n are elements of just the integers.

    I think it’s important that n is explicitly an element of the positive integers because then n is non-zero, otherwise, without the context of the full proof, we have that if m is an integer and n = 0, (m+1)/n is rational.

    • Anonymous says:

      Theorem I.30. tells that n is a postive integer i.e., n>0. so by trichotomy law n is not equal to 0. Hence, division by zero error will not occur.

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