Number

How close a fraction can get

Drop eight points into seven boxes and two of them share. That one line, applied to the multiples of an irrational number, proves that every irrational has infinitely many astonishingly good rational approximations — and no construction is needed anywhere.

Worth reading first: More things than boxes · A fraction that never closes.

Any number can be approximated by a fraction as closely as anybody likes, by taking enough decimal places. That observation is true and worthless: the fraction 3141592610000000\tfrac{31415926}{10000000} is not an approximation to π\pi so much as a restatement of it, and its denominator is doing all the work.

The question with content in it is about the exchange rate. Given a denominator of a certain size, how close can the best fraction get — and are there denominators that do unreasonably well?

8 multiples of φ in 7 boxesThe fractional parts of the first multiples of a number, dropped into equal boxes along the unit interval.0/71/72/73/74/75/76/7the fractional parts of φ, 2φ, 3φ, …5φ and 0φ landed in the same boxso 5φ is within 1/7 of the whole number 8 — an error of 0.0902which makes 8/5 accurate to 1.8e-2
Fig. 1 The fractional parts of the first eight multiples of φ\varphi, dropped into seven boxes along the unit interval. Two of them must land in the same box, and the generator finds the pair rather than assuming it. The difference between those two multiples is then within one seventh of a whole number.

The answer is Dirichlet’s, from 1842, and its proof is the pigeonhole principle applied once.

Before the argument, it is worth being clear about what a good answer would look like. A fraction p/qp/q approximating α\alpha has two numbers attached to it: how wrong it is, and how big its denominator is. Neither alone means anything — the error can be made as small as desired by enlarging the denominator, and the denominator can be kept small by accepting a bad answer. The question is entirely about the trade, and every result below is a statement about an exponent: the error behaves like 1/q1/q, or 1/q21/q^2, or 1/q2+ε1/q^{2+\varepsilon}, and which of those is achievable turns out to say a great deal about what kind of number α\alpha is.

The argument in full

Take an irrational α\alpha and a whole number NN. Consider the N+1N+1 numbers

{0α}, {1α}, {2α}, , {Nα},\{0\cdot\alpha\},\ \{1\cdot\alpha\},\ \{2\cdot\alpha\},\ \ldots,\ \{N\cdot\alpha\},

where {x}\{x\} is the fractional part. They all lie in [0,1)[0, 1). Cut that interval into NN boxes of width 1/N1/N. There are N+1N+1 numbers and NN boxes, so two of them share a box.

Say {jα}\{j\alpha\} and {kα}\{k\alpha\} share, with j<kj < k. Their difference is less than 1/N1/N in size. Write q=kjq = k - j and let pp be the whole number nearest qαq\alpha. Then

qαp<1N,|q\alpha - p| < \frac{1}{N},

and dividing by qq, which is at most NN,

αpq<1qN1q2.\left|\alpha - \frac{p}{q}\right| < \frac{1}{qN} \le \frac{1}{q^2}.

That is the theorem. Every irrational number has a fraction within 1/q21/q^2 of it — and since NN can be taken as large as anybody likes and α\alpha is irrational, so that no fraction is ever exactly right, there are infinitely many such fractions.

8 into 78 items spread as evenly as 7 boxes allow. Even at their most even, some box holds 2, because 8 is more than 7 × 1.2111111spread as evenly as possible, the fullest box still holds 2
Fig. 2 The principle itself, with nothing arithmetic about it. Eight things, seven boxes, and the conclusion holds however the things are distributed — which is what makes it usable on a set of numbers whose positions nobody knows.

Why 1/q21/q^2 is the surprising part

A bound of 1/q1/q would be nothing at all. Every real number is within 1/2q1/2q of some fraction with denominator qq — round qαq\alpha to the nearest whole number and divide — so a bound of that shape is available by construction and says nothing.

1/q21/q^2 is a different kind of statement. It says the error is not merely small but small compared with the denominator, and by an amount that grows: doubling the denominator buys four times the accuracy rather than twice. Approximations like that are rare, and the pigeonhole argument proves infinitely many of them exist without exhibiting a single one.

12 multiples of √2 in 11 boxesThe fractional parts of the first multiples of a number, dropped into equal boxes along the unit interval.0/111/112/113/114/115/116/117/118/119/1110/110√25√2the fractional parts of √2, 2√2, 3√2, …5√2 and 0√2 landed in the same boxso 5√2 is within 1/11 of the whole number 7 — an error of 0.0711which makes 7/5 accurate to 1.4e-2
Fig. 3 The same argument on 2\sqrt2 with eleven boxes. The colliding pair is different, the resulting fraction is different, and the conclusion has the same form. Nothing in the method depends on which irrational is used, which is why it applies to every one of them at once.

The economy of the proof is worth dwelling on. It uses no property of α\alpha beyond irrationality: not its size, not how it is defined, not whether it is algebraic. It needs no calculation. And it produces its conclusion by counting boxes, which is the same move that makes more things than boxes a theorem about infinity rather than an observation about socks.

Which fractions the argument finds

The proof says a good fraction exists, and refuses to say which. Running the search directly settles it.

How close each multiple of φ gets to a whole number, up to 40One mark per denominator, at the distance from the nearest whole number, on a logarithmic scale.2/13/25/38/513/821/1334/2155/34denominator q, up to 408 denominators beat everything before them, and every one is a convergentthe other 32 are wasted effort — a larger denominator buying a worse answer
Fig. 4 For each denominator up to forty, how close its best multiple comes to a whole number. Most denominators are useless; a few break the record set by everything before them. The generator checks that the record-breakers are exactly the convergents of the continued fraction — every record is one, and every convergent past the first is a record.

The record-holders are the Fibonacci numbers, which for φ\varphi is the same as saying they are the continued fraction convergents. That is not a coincidence about the golden ratio; it is a theorem about all numbers.

How close each multiple of π gets to a whole number, up to 120One mark per denominator, at the distance from the nearest whole number, on a logarithmic scale.3/122/7333/106355/113denominator q, up to 1204 denominators beat everything before them, and every one is a convergentthe other 116 are wasted effort — a larger denominator buying a worse answer
Fig. 5 The same for π\pi. Three denominators matter below a hundred and twenty — 11, 77 and 106106 — and 113113 is about to matter enormously. The other hundred and sixteen denominators buy nothing that a smaller one had not already bought.

So the two essays either side of this one meet here. Euclid’s algorithm produces the convergents by a deterministic peeling with no notion of approximation in it; Dirichlet’s pigeonhole proves good approximations exist with no algorithm in it at all. The two constructions have nothing in common and produce the same list of fractions, which is the strongest possible sign that the list is the natural one.

The tree of every fraction exactly once is the third route to the same place: descending it towards a target and taking the nodes passed through gives the convergents again, one run of turns at a time.

The floor, and the number that sits on it

Dirichlet’s bound is 1/q21/q^2. It can be improved, and only so far.

Hurwitz proved in 1891 that every irrational has infinitely many fractions with

αpq<15q2,\left|\alpha - \frac{p}{q}\right| < \frac{1}{\sqrt5\, q^2},

and that the constant 5\sqrt5 cannot be replaced by anything larger. The number that stops it is the golden ratio: for φ\varphi, the inequality fails for every constant above 5\sqrt5 from some point onward.

How good each convergent is, for its sizeOne over q squared times the error, against the denominator q, on logarithmic axes.√5φ√2eπdenominator q, logarithmichigher is a better approximation for the size of the denominatorevery other constant spikes far above the √5 line; the golden ratio closes on it and stays
Fig. 6 Each constant’s convergents, measured against the 5\sqrt5 line. Every irrational must rise above that line infinitely often — that is Hurwitz’s theorem — and φ\varphi does it by the smallest margin available, closing onto the line and staying there while the others spike past it.

This is where “the golden ratio is the most irrational number” comes from, and the phrase is worth handling carefully. Irrationality is not a quantity and there is no scale of it. What is true, and is precise, is that φ\varphi is the worst approximable number: the constant in Hurwitz’s theorem is attained at φ\varphi and at numbers equivalent to it, and no number does worse. Its continued fraction is all ones, which is exactly the statement that no quotient ever announces an unusually good approximation.

What the picture cannot show

Every figure here stops at a denominator small enough to draw, and what happens at large denominators is where the subject actually lives.

Consider a number defined to be approximable absurdly well: Liouville’s constant,

k=110k!=0.110001000000000000000001,\sum_{k=1}^{\infty} 10^{-k!} = 0.110001000000000000000001\ldots,

whose decimal expansion has ones at positions 1,2,6,24,1201, 2, 6, 24, 120 and zeros everywhere else. Truncating it after the $k$th one gives a fraction whose denominator is 10k!10^{k!} and whose error is about 10(k+1)!10^{-(k+1)!} — an approximation better than 1/qn1/q^n for every nn.

Liouville showed in 1844 that an algebraic number of degree nn cannot be approximated better than about 1/qn1/q^n, so his constant cannot be algebraic. That was the first proof that any specific number is transcendental, and it arrived thirty years before the proof for ee and forty before π\pi. The strategy is worth noticing: rather than analysing a famous constant, Liouville built a number designed to be too well approximated to be algebraic. A property that no picture can show — behaviour at astronomically large denominators — was turned into a construction.

The figures also cannot show how sharp the algebraic bound became. Thue, Siegel and finally Roth in 1955 improved Liouville’s exponent all the way down to 2+ε2 + \varepsilon: an algebraic irrational admits only finitely many fractions with αp/q<1/q2+ε|\alpha - p/q| < 1/q^{2+\varepsilon}. Since Dirichlet’s theorem gives infinitely many at exponent 22, the true exponent for every algebraic irrational is exactly 22 and there is no room left. Roth’s theorem is famously ineffective — it says only finitely many exceptions exist and gives no way to find them or bound their size — so the picture of a sharp result which cannot be used is the accurate one.

Where it shows up outside arithmetic

Well and badly approximable numbers are not an internal curiosity. They decide the behaviour of anything that repeats at two incommensurable rates.

Take a rotation of a circle by an angle α\alpha turns, repeated. If α\alpha is a good approximation to p/qp/q, then qq steps nearly return to the start, and the orbit clumps: it visits qq tight clusters before drifting. If α\alpha is badly approximable, no small number of steps nearly closes, and the points spread as evenly as they can. The three-distance theorem makes this exact — after nn steps, the gaps between successive points on the circle take at most three distinct values, and the values are determined by the continued fraction.

The same statement governs orbital resonance, where two periods in a near-rational ratio lock together and one in a badly approximable ratio does not, and it governs the arrangement of seeds in a sunflower head, where the golden angle is the choice that avoids every resonance at once. A number that resists approximation is a number whose multiples never nearly repeat, and that is a useful property to have when the goal is to fill space without a pattern.

It shows up in engineering under a different name. A sampling scheme, a dithering pattern, a quasi-random sequence for numerical integration — all of them want points that spread out rather than clump, and all of them get there by stepping through a badly approximable rotation. The low-discrepancy sequences used for high-dimensional integration are built from irrationals chosen precisely so that no small denominator nearly works, and the quality of such a sequence is measured by a bound that is Dirichlet’s theorem with the inequality pointing the other way.

There is an audible version, too. Two tones whose frequencies are in a near-rational ratio beat against each other at the rate of the near-miss, and the beating is slow when the approximation is good. Tuning a musical instrument is the practical business of choosing which near-misses to accept, and the comma that will not close is a statement that 2192^{19} and 3123^{12} are close and not equal — a rational approximation problem being settled by ear.

What the proof does not hand over

Dirichlet’s argument is non-constructive in a specific and instructive way. It proves a collision occurs among N+1N+1 points in NN boxes without saying which points collide; finding them means computing the fractional parts and looking, which is more work than running Euclid’s algorithm would have been.

So the theorem is not an algorithm and was never competing with one. What it provides is a guarantee that holds for every irrational simultaneously, including all the ones nobody can compute, and a bound that no algorithm was going to establish by running. That division of labour — existence by counting, construction by algorithm — is the same one that separates Euclid’s proof that primes never stop from any method of finding the next one.

There is a further consequence worth stating. Because the argument needs only N+1N+1 points in NN boxes, it works unchanged for simultaneous approximation of several numbers at once, and in higher dimensions, and for approximating by things other than fractions. Nearly all of the modern subject — Diophantine approximation, the geometry of numbers, Minkowski’s theorem on lattice points in convex bodies — is this one counting argument, made in more elaborate boxes.

The drawer principle, and the man it is named after

Dirichlet called it the Schubfachprinzip — the drawer principle — and it is not clear that he thought of it as a principle at all. It appears in his work as a step, unnamed and unremarked, in exactly the way an obvious observation appears in a proof that needs it.

What makes the attribution worth keeping is what else he did with the same habit of mind. In 1837 Dirichlet proved that every arithmetic progression a,a+d,a+2d,a, a+d, a+2d, \ldots with aa and dd coprime contains infinitely many primes — the first serious theorem about the distribution of primes in residue classes, and one that needed machinery so far beyond its statement that it effectively founded analytic number theory. The 1842 approximation theorem, by contrast, is four lines and needs nothing.

Both results have the same shape underneath: a statement that something must exist, established without producing it. The progression theorem does it with LL-functions and the approximation theorem with drawers, and Dirichlet appears to have regarded neither method as more legitimate than the other.

There is a small irony in the naming. The pigeonhole principle is the most elementary tool in the subject and it is attached to the person who wrote its least elementary results, while the theorem it proves here — that good approximations exist for every irrational — is attached to nobody in particular and is usually just called Dirichlet’s theorem, which is ambiguous between the two.

More than one number at a time

The proof used N+1N+1 points in NN boxes along a line. Nothing about the argument cares that the boxes are intervals.

Ford circles up to denominator 9A circle of diameter one over q squared resting on each fraction p over q; neighbours touch.0/11/31/22/31/1each circle has diameter one over its denominator squared, and rests on its own fractiontwo circles touch exactly when the fractions are Farey neighbours — nothing overlaps anywhere
Fig. 7 The Ford circles again, from a different essay’s construction. A number sits under a large circle exactly when it is well approximated by a small-denominator fraction, and the circles do not overlap — so the picture is a statement about how much good approximation there is to go around.

Take two irrationals α\alpha and β\beta and cut the unit square into N2N^2 boxes. The N2+1N^2 + 1 points ({kα},{kβ})(\{k\alpha\}, \{k\beta\}) must share a box, and the same subtraction gives a single denominator qq that works for both numbers at once:

αpq<1q3/2,βrq<1q3/2.\left|\alpha - \frac{p}{q}\right| < \frac{1}{q^{3/2}}, \qquad \left|\beta - \frac{r}{q}\right| < \frac{1}{q^{3/2}}.

The exponent is worse than 22, which is the price of asking one denominator to serve two purposes, and it is the right price: with nn numbers the exponent is 1+1/n1 + 1/n, and that cannot be improved.

Pushing the same idea further gives Minkowski’s theorem, which replaces the boxes with an arbitrary convex region symmetric about the origin and says that a large enough region must contain a lattice point other than the origin. Every result in this essay is a special case, and so is the fact that certain primes are sums of two squares — a statement about circles that turns out to be a statement about a region being too big to avoid the lattice. The counting argument that started with eight socks in seven drawers ends up deciding which numbers are which shape.

Where the ladder goes next

The pigeonhole principle has now done two jobs in this collection: proving that a shared box must exist among finitely many things, and proving that a good fraction must exist among infinitely many. Both times the conclusion is an existence claim and both times the proof is a count.

The next question is what the good fractions are made of, and that leads back to the continued fraction and forward to the geometry of the lattice — because a fraction p/qp/q near α\alpha is a lattice point near the line y=αxy = \alpha x, and asking how close a lattice point can come to a line is the question the two-squares problem asks about a circle instead.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

  • Six people at a party — both name counting argument, existence proof, nonconstructive, pigeonhole principle

Named objects

A dashed tag is an object no other essay names yet.

Continued fraction convergentCounting argumentDirichletExistence proofGolden ratioLiouville numberNonconstructivePigeonhole principleRational approximationTranscendence