Pick two numbers on the number line, close together. Say 0.314 and 0.315. Is there a fraction in between them?
Obviously yes — 0.3145 is 6290/20000, a perfectly good fraction. Now pick two even closer numbers, like 0.31415 and 0.31416. A fraction between? Still yes. Try 0.31415926 and 0.31415927. Fraction between? Still yes.
No matter how close you pick, you can always fit a fraction in the gap. That is the core content of density of the rationals on the real line. This article is about seeing density: what happens visually as you zoom into the number line over and over.
The key move: zooming doesn't help
Start with the interval [0, 1] and mark all fractions with denominator up to, say, 20. There are dozens of them, and they look like a thick sprinkling on the line.
Now zoom in on any tiny sub-interval — say, [0.3, 0.31]. A naïve guess: the fractions were packed at the [0, 1] scale, so they should thin out when you zoom in, right? You zoomed 100\times, so the fractions should be 100\times more sparse?
Wrong. When you zoom in on any sub-interval, the fractions that fit inside it are the same kind of dense sprinkling. Allow larger denominators and you get as many fractions in [0.3, 0.31] as you had in [0, 1]. Zoom again into [0.314, 0.315] — same story.
The visual signature of density is this: no matter how narrow the window, there are still infinitely many fractions inside, and they continue to look thickly packed.
Drag the zoom slider below to see this happen live. The viewing window is centred on \pi = 3.14159\dots. At each zoom level, black tick marks show rational numbers at the current precision.
The zoom reveals two things at once:
- The rationals stay thick. No matter how far in you zoom, there are always rational ticks visible. The density never dies.
- But \pi is never a tick. The rationals crowd around \pi but never land on it.
Those two observations together are what density without completeness looks like. Density means "rationals everywhere." Completeness (which only the full reals have) means "no gaps left." The rationals are dense but not complete — they crowd around irrationals without ever filling the hole at them.
Why density is a theorem, not an observation
Take any two rationals a < b, however close. Their average
is strictly between them (a < m < b) and is itself rational (the average of two fractions is a fraction). Why m is rational: if a = p/q and b = r/s, then m = (ps + rq)/(2qs), which is a quotient of two integers and therefore rational.
So between any two rationals there is a third rational. Between those two, there is a fourth. Between those two, a fifth. The construction never terminates. That is the proof of density.
More strongly: between any two real numbers a < b (not just rationals), there is a rational number. To find one, expand a in decimal as a = 0.a_1 a_2 a_3 \dots and b = 0.b_1 b_2 b_3 \dots and look for the first decimal place where they differ. Round off at that precision and adjust — you will land on a fraction strictly between them. Density applies to every gap on the real line, not just the gaps between rationals.
Density is not "most numbers are rational"
Here is the part that trips everyone. The rationals are dense. You can zoom anywhere and always find rationals. So it feels like the rationals are most of the number line. They are not.
In a precise sense that you can think of as "measuring the total length," the rationals take up zero length on the real line. The irrationals take up all of it. That is compatible with density: you can have infinitely many rational points in any interval and still have the rationals contribute zero length, because each rational is an infinitely thin point and their total "thickness" never adds up to anything.
Analogy. Imagine a ruler with a red dot painted on every rational position. The red dots are dense — you can never find a stretch of ruler without some. But if you melted all the red dots together, you would not get a visible splash of paint. You would get nothing, because each dot has zero thickness.
That is why zooming into the rationals never stops revealing more rationals — density — but also why, if you had to pick a real number uniformly at random in [0, 1], you would land on an irrational with probability 1. The rationals take up none of the room, even though they are everywhere.
Find a rational strictly between $\pi$ and $\pi + 10^{-6}$
You need a fraction p/q with
Strategy. Choose any decimal approximation of \pi that fits. \pi \approx 3.141\,592\,653\,5. Add a tiny rational bump, small enough that \pi + 10^{-6} hasn't been overshot. For instance,
Check.
- Lower bound: 3.141593 > 3.141592653\dots, so p/q > \pi. ✓
- Upper bound: \pi + 10^{-6} = 3.141\,593\,653\dots > 3.141\,593. ✓
So 3141593/1000000 is rational and sits strictly in that tiny window. The construction works for any window around any real — which is exactly what density says.
The zoom never ends, the rationals stay thick, and the irrationals still fill all the room. That is the picture of density.
This satellite sits inside Number Systems.