On this page
π is not a fraction, yet 22/7 is close enough for school sums and 355/113 is close enough for almost anything you will build. How close can a fraction with denominator q get to π, and why are some fractions far better than their size suggests?
What does Dirichlet's approximation theorem say?
Dirichlet's approximation theorem: for any real number α and any whole number N ≥ 1, there are integers p and q with 1 ≤ q ≤ N and |qα − p| < 1/N (Wikipedia: Dirichlet's approximation theorem).
Divide by q and use q ≤ N, and you get the form people quote: for every irrational α, the inequality |α − p/q| < 1/q² has infinitely many solutions in integers p and q (same source).
Why is that surprising? Fractions with denominator q sit 1/q apart, so the nearest can be as far as 1/(2q) away. Dirichlet says that infinitely often the error shrinks like 1/q² instead.
How does the pigeonhole proof of Dirichlet's theorem work?
The theorem is a consequence of the pigeonhole principle: put more pigeons than boxes and some box holds two (Wikipedia). Here is the argument in four steps.
Take the N + 1 numbers 0, α, 2α, …, Nα and keep only the fractional part of each (the part after the decimal point).
Cut the interval from 0 to 1 into N boxes, each of width 1/N.
N + 1 numbers in N boxes means two of them, say from jα and kα with j < k, land in the same box, so their fractional parts differ by less than 1/N.
Then q = k − j satisfies: qα is within 1/N of a whole number p. That is exactly |qα − p| < 1/N with 1 ≤ q ≤ N.
Let us run it on π with N = 10, as in the diagram above. The fractional parts of π and 8π are 0.1416 and 0.1327, both in the box from 0.1 to 0.2. So q = 8 − 1 = 7, and 7π = 21.991 is within 0.009 of 22. The proof has found 22/7 by itself, and indeed |π − 22/7| ≈ 0.0013, well under 1/7² ≈ 0.0204.
Why are 22/7 and 355/113 so good for π?
The simple continued fraction of π begins 3; 7, 15, 1, 292, 1, 1, … (OEIS A001203). Cutting it off after each term gives the convergents 3, 22/7, 333/106 and 355/113.
Score a fraction p/q by q² × |α − p/q|: Dirichlet guarantees infinitely many scores below 1, and smaller is better. With π = 3.14159265…:
22/7 = 3.142857…, error about 0.00126, score about 0.062.
333/106 = 3.141509…, error about 0.000083, score about 0.93.
355/113 = 3.1415929…, error about 0.00000027, score about 0.0034.
The reason 355/113 scores so well is the next term, 292: an unusually large term means the convergent just before it is especially close to the true value (Wikipedia: Milü). The same page says 355/113 is the best rational approximation of π with a denominator of four digits or fewer, accurate to six decimal places.
The Chinese mathematician Zu Chongzhi (429–501) gave 355/113, and the History of the Sui dynasty records his precise value as 355 to 113 and his approximate value as 22 to 7 (MacTutor: Zu Chongzhi).
Are continued fraction convergents the best rational approximations?
Yes, in a precise sense: p/q is a convergent of x exactly when |qx − p| is smaller than for any other fraction whose denominator is at most q (Wikipedia: Simple continued fraction). One catch: the fraction with the smallest gap |x − p/q| under a denominator limit can instead be a semiconvergent, built between two convergents (same source). For π with denominators up to 100 it is 311/99, which beats 22/7. We show how continued fractions work in what a continued fraction is, with the golden ratio, √2 and π, and the neighbouring-fractions picture is in Farey sequences, mediants and Ford circles.
Why is the golden ratio so hard to approximate with fractions?
The golden ratio φ = (1 + √5)/2 has the continued fraction 1; 1, 1, 1, … with every term equal to 1, so it never gets a lucky large term like π's 292. Its convergents are ratios of Fibonacci numbers, and their scores settle instead of dropping: about 0.446 for 13/8, 0.448 for 21/13 and 0.447 for 55/34. The limit is 1/√5 ≈ 0.447. Hurwitz's theorem says every irrational has infinitely many fractions with |α − p/q| < 1/(√5 q²), and the constant √5 is the best possible: replace it by anything larger and, for the golden ratio, only finitely many fractions qualify (Wikipedia: Hurwitz's theorem)). So φ is one of the most difficult numbers to approximate with fractions (Wikipedia: Simple continued fraction).
If the pigeonhole step or the convergent recursion still feels slippery, the Fermi Concept Library gives each mathematics concept its own lesson and its place in the map.
For π turning up somewhere stranger, read why two sliding blocks and a wall count the digits of π.



