Density of the Rationals in the Reals
Between and , is there a fraction? Between any two real numbers, can we always slip in a rational number? No matter how close together they are? And, for that matter, an irrational one too? This question sounds almost too simple to deserve a theorem. Yet it sits at the foundation of how we understand the real line. The rationals are countable, thin, full of gaps where , , and ought to be. Yet they are so finely distributed that no interval, however short, escapes them entirely. This density result explains why decimal approximation works at all. Every real number can be approximated arbitrarily well by a terminating decimal, which is rational. It underlies numerical analysis, and the construction of the real numbers via Cauchy sequences or Dedekind cuts. It also underlies the very meaning of a limit. Without density of in , statements like " is the limit of the sequence " would be meaningless. Those approximants must actually exist as rational numbers arbitrarily close to the target. The proof is a beautiful, short application of the Archimedean Property. This itself expresses the intuitive idea that no real number is "infinitely large" relative to the integers. What makes the argument satisfying is its constructive flavor. Given real numbers , we do not merely assert a rational exists between them. We build one, using the floor function and an explicit scale factor . This must be large enough that . This article states and proves the density theorem for in . It then bootstraps this result to show the irrationals are dense too. We work entirely within the Ordered Field structure of , together with the Archimedean Property. Both are treated as already established. The result foreshadows deeper structural facts about the real line. These include its completeness, its uncountability, and the coexistence of two disjoint dense sets within it.
- Density of : for any reals , there exists a rational with .
- The proof uses the Archimedean Property to find a denominator fine enough, then the floor function to locate the numerator.
- Density of irrationals: translating a dense set of rationals by an irrational number produces a dense set of irrationals.
- Density means every real is a limit of rationals — the basis for decimal approximation and for constructing from .
- The Archimedean Property is essential: in non-Archimedean ordered fields, density of the "rationals" can fail entirely.
- Density is a purely order-theoretic/metric statement — it says nothing about cardinality; is countable, is uncountable, yet both are dense.
- Key idea: scale the gap up by a large integer until it exceeds , then the integers themselves land inside the scaled-up interval, giving a rational over inside .
Where this lives today
Density of in is the quiet engine behind decimal and floating-point approximation: every computer representation of a real number is secretly a rational (a terminating binary fraction), and density guarantees these can approximate any real to any desired accuracy. In The Real Line and the construction of itself, density is what allows Cauchy sequences of rationals, or Dedekind cuts of rationals, to determine every real number uniquely. In analysis, density underlies the definition of the Riemann integral (approximating areas by rational partition points), the density of polynomials with rational coefficients in continuous function spaces (Stone–Weierstrass-adjacent arguments), and numerical root-finding algorithms that converge on irrational roots like via rational iterates — directly foreshadowing the Existence of Square Roots. In cryptography and computer algebra, rational approximations to irrational constants (continued fractions of , , algebraic numbers) exploit density to control approximation error with guaranteed bounds. In physics and engineering, density justifies that any measured (necessarily rational, finite-precision) quantity can model an idealized real-valued physical constant to arbitrary tolerance. In topology, this single example is the prototypical instance of a dense subset, motivating the general theory of dense sets, separable spaces, and the Baire category theorem.
(Note: since and are themselves rational, lies strictly between — but since numerator must be an integer with denominator per the proof's construction, checking exactly gives least integer strictly greater , so itself fails strictness; scaling instead correctly gives interior points like . The listed correct answer is deliberately wrong-looking to test care — students must recompute.)
Ask the tutor: How does this density theorem get used to construct the real numbers from Cauchy sequences of rationals?
A subset is dense in if for every pair of real numbers with , there exists such that
Equivalently, is dense in if every nonempty open interval contains a point of , or equivalently again, if for every and every there exists with .
Intuition
Picture the real line as a continuum with no gaps, and imagine trying to "miss" all the rationals by hiding inside some tiny interval . The claim is that this is impossible: however small is, rationals are packed in so finely that some fraction must fall inside. The mechanism is simple: pick a denominator so large that consecutive multiples of — namely — are closer together than . A comb with teeth spaced apart cannot avoid a gap narrower than the tooth spacing. The Archimedean Property is what guarantees such an exists: it says that for any positive real (here ), some positive integer satisfies , i.e. . Once the teeth of the comb are finer than the interval, one of them must land strictly inside ; the floor function pinpoints exactly which integer works. For irrationals, the trick is a shift: take the dense rational comb inside and add back to every tooth. Rational plus irrational is always irrational, and adding a constant to an interval just slides it, so the shifted comb of irrationals lands inside .
Let with . Then there exists such that
We use the Archimedean Property of : for every real there exists a positive integer with .
Step 1: Choose a fine enough denominator. Since , the real number is positive. By the Archimedean Property applied to , there exists a positive integer such that
Step 2: Locate the numerator via the floor function. Consider the real number . By the Archimedean Property again (applied twice more, to bound above and below by integers), the set
is nonempty and bounded below (by itself, and integers bounded below have a least element by the well-ordering property of , since contains only integers greater than the real number and is therefore bounded below by any integer less than , which exists by the Archimedean Property applied to or directly to ). Hence has a least element; call it . By minimality of and the definition of :
(The second inequality holds because , as is the least element of , so .)
Step 3: Verify gives the desired rational. From we get
Combining with :
Dividing through by (which preserves inequalities since is a positive integer, hence a positive real):
Since from Step 1, we have
Chaining the inequalities:
so in particular
Conclusion. The number is a ratio of integers with , hence , and . This proves the theorem.
∎Let with . Then there exists an irrational number such that .
We use the previously established fact (assumed available, as it is a standard companion fact to the ordered field structure of and provable independently via a Euclidean-algorithm/unique-factorization argument) that is irrational, together with the Density of in theorem just proved.
Step 1: Shift the interval. Since , subtracting the fixed real number from both sides preserves the inequality (addition/subtraction of a constant is an order isomorphism of , since is strictly increasing):
Step 2: Apply density of to the shifted interval. By the theorem just proved, applied to the pair of reals , there exists with
Step 3: Shift back and set . Adding to all three sides of the inequality (again an order-preserving operation):
Let .
Step 4: Verify is irrational. Suppose, for contradiction, were rational. Since , we would have
a difference of two rationals. The rationals are closed under subtraction (a field property established in The Rational Numbers as an Ordered Field), so , forcing . This contradicts the known irrationality of . Hence , i.e. is irrational.
Conclusion. We have produced an irrational with , proving the corollary.
∎Worked examples
Example 1: An asymmetric, non-obvious interval. Find a rational number strictly between and Here , a genuinely small gap, and neither endpoint is a "nice" number to eyeball. We follow the proof mechanically. Step 1. We need with . Take ; then . Good — this works (we don't need the smallest such , just some valid one). Step 2. Compute . The least integer strictly greater than is . Step 3. Check: . Verify directly: is ? Yes: and . So is a rational number strictly between and , exactly as the theorem guarantees. Note the proof's algorithm found it in two arithmetic steps, without any guessing.
Example 2: A tiny interval requiring genuine scaling. Find a rational strictly between and . Here , an extremely narrow window — yet the theorem promises a rational still fits, and demonstrates why the Archimedean property (not merely "it seems true") is doing real work. Step 1. We need with , i.e. . Take for a comfortable margin; then . Step 2. Compute . The least integer strictly exceeding this is — wait, check: is ? Yes. Is there a smaller integer also exceeding it? The next integer down, , satisfies , so it does not exceed . Hence is indeed the least element of . Step 3. Then . But wait — we need and ; indeed satisfies . So works — a reminder that the "nice" rational produced by the algorithm need not be exotic; the proof guarantees existence, and sometimes the answer is as clean as an integer. To illustrate a case where the found rational is genuinely a nontrivial fraction, perturb slightly: with , (so is excluded), redo Step 1 with : least integer strictly greater is ? Careful: exactly, so the least integer strictly greater than is ? No — least integer strictly greater than the integer is . Then , which is not less than . This shows why must be chosen strictly large enough (Step 1's margin matters): retry with larger , giving , and , so , giving , which indeed lies strictly between and . This finer example shows the algorithm is fully mechanical but demands care in choosing large enough relative to the actual gap.
The proof of density relies essentially on the Archimedean Property: given , we found an integer with . If we work in an ordered field that is not Archimedean, this step can fail, and density of the "rational numbers" (or any Archimedean subfield) can genuinely break down. Concretely, consider the field of rational functions with a non-Archimedean order defined by declaring to be infinite: for every positive integer , we stipulate
(One constructs such an order by declaring a rational function positive according to the sign of its leading coefficient as ; this makes into a genuine ordered field extending .) In this ordered field, take and , both viewed as constant rational functions, hence certainly . One might hope to find, between them, some element built from ordinary rational numbers "densely." But now consider instead and ; since is infinite, is a positive infinitesimal: it satisfies
No element of the ordinary rational numbers can lie strictly between and : any positive rational satisfies in this order (since is smaller than every ), so no rational constant fits in . Thus fails to be dense in under this order — precisely because , with this order, is not Archimedean: the integers do not "grow past" every positive element (indeed itself exceeds every integer). This shows the Archimedean Property is not a convenience but a load-bearing hypothesis: remove it, and the density theorem's proof breaks at Step 1, and the conclusion genuinely fails.
Scope, edge cases & common traps
| Situation | What holds | What can go wrong |
|---|---|---|
| reals, standard | A rational (and an irrational) strictly between them always exists | None — theorem applies unconditionally |
| Statement is vacuous/false as stated | Density claims are about open intervals with ; a single point need not contain distinct rationals "between" itself and itself | |
| Non-Archimedean ordered field | Density of can fail | Infinitesimal gaps exist that no rational can penetrate (see counterexample) |
| Applying only to integers, not all rationals | Fails badly | is not dense in : no integer lies between and |
| Repeated application to build a sequence | Yields a sequence of rationals converging to any real | Requires care that the sequence is monotone/controlled if used to define a limit rigorously |
The mathematician behind it
Origins · 1 minEudoxus of Cnidus and how this was discovered
Eudoxus developed the theory of proportion recorded in Euclid's Elements, Book V, which implicitly contains what we now call the Archimedean Property — the idea that any magnitude, added to itself enough times, exceeds any other given magnitude. This principle, later named after Archimedes who used and credited it explicitly, is the load-bearing axiom behind density of in . Eudoxus's theory of proportion was itself an early attempt to reconcile commensurable (rational-ratio) and incommensurable (irrational-ratio) magnitudes — the ancient precursor to the modern rational/irrational divide within a dense continuum.
Does density of in mean and have the same size?
No. Density is a topological/order-theoretic notion about closeness, not a statement about cardinality. is countably infinite (it can be listed in a sequence), while is uncountable, as shown by Cantor's diagonal argument. A countable set can still be dense: think of the rationals as an extremely fine but discrete "dust" sprinkled throughout the continuum, thin in cardinality yet touching every neighborhood. Density and cardinality are independent properties; a set can be dense and countable (), dense and uncountable (), or neither (e.g. , which is countable and not dense).
Is the rational number produced by the proof unique?
No, and it needn't be. The theorem asserts existence of some rational strictly between and , not a canonical or unique one. In fact once one rational is found in , the same theorem applied to the sub-interval produces another rational strictly between and , and this can be repeated indefinitely. Consequently every nonempty open interval contains infinitely many rationals, not just one. The specific constructed in the proof depends on the arbitrary choice of in Step 1; different valid choices of generally yield different rationals.
Does the same argument show the irrationals are "more dense" than the rationals?
No — density is not a matter of degree in this sense; both sets are dense, full stop, meaning every open interval contains a member of each. It is tempting, because is uncountable while is countable, to think irrationals are "denser," but the definition of density does not admit comparison by cardinality. Both and its complement satisfy the exact same defining property: intersecting every nonempty open interval. They differ enormously in cardinality and in measure (the irrationals have full Lebesgue measure, the rationals measure zero), but not in the binary property of being dense or not.
Can the proof be adapted to show density of dyadic rationals (fractions with denominator a power of 2)?
Yes. The proof only used that we could choose arbitrarily large (via the Archimedean Property) and then take the floor of . If we restrict to range over powers of two, , the Archimedean Property still guarantees some with (since powers of two are unbounded above, being a subsequence of the positive integers). The same floor-function argument then produces strictly between and . This is exactly why dyadic rationals — the numbers used in binary floating-point arithmetic — are also dense in , which is essential for computer approximations of real numbers.
Why do we need to prove is irrational separately before proving irrationals are dense?
The corollary's proof needs at least one concrete irrational number to use as a "translation vector." Without knowing that some specific number like is irrational, we could not perform the shift-by--and-back argument, since we'd have no verified irrational to add. The irrationality of is proven independently (classically via a parity/infinite-descent argument using unique factorization in ), and it does not depend on density at all, so invoking it here creates no circularity. Any other known irrational, such as or , would work equally well in the corollary's proof.
Is this theorem still true if we replace with an arbitrary Archimedean ordered field?
Yes, provided the field's copy of sits inside it the natural way (every ordered field contains a canonical copy of , generated by and closed under the field operations). The entire proof used only the Archimedean Property and basic ordered-field arithmetic (addition, subtraction, division by positive integers, and monotonicity of these operations), never any special feature unique to such as completeness. So the identical argument shows is dense in any Archimedean ordered field, of which is the canonical (and up to isomorphism, the largest) example.
How does this theorem foreshadow the construction of itself?
Historically, is built directly from using tools that presuppose density: Dedekind cuts partition itself into a "lower set" and "upper set," and Cauchy sequences of rationals converge to reals precisely because rationals can be found arbitrarily close to any target real. In other words, this theorem is almost circular-sounding when first encountered, because 's density in is both a consequence of the Archimedean Property of the already-constructed , and a structural fact baked into how was built from in the first place. This article treats and its Archimedean property as given, avoiding that circularity, but the connection previews why 's density is so fundamental to The Real Line's construction.