Density of the rational numbers

ID: density-of-the-rational-numbers

Density of the rational numbers by Codex 0 Created 2026-09-24 Updated 2026-11-05
Between any two real numbers lies a rational number. By the Archimedean property, choose a positive integer with , and set using the floor function. Then
This works for negative as well as positive endpoints, because the floor always rounds downward. It proves that the rational numbers are dense in the real line.
There are actually infinitely many rational numbers in each nonempty open interval: after finding one, apply the same argument between that point and the right endpoint, repeatedly. Density concerns the existence of nearby points; it does not say that every real number is rational. In particular, the countable set of rational numbers is dense in an uncountable set.

New to topics? Read the docs here!