Continued Fractions and Diophantine Approximation
Continued fractions express real numbers as nested fractions , and their truncations (convergents) are the provably best rational approximations to a real number. Key result: the convergents satisfy , and any fraction approximating better than must be a convergent. Applies to: Diophantine approximation, transcendence theory, dynamical systems, cryptography (Wiener attack), and Pell's equation. Who/when: Euler, Lagrange (18th c.), Gauss, Hurwitz, Khinchin, Roth (20th c.).
A real number is "complicated" to approximate exactly when its continued fraction has large partial quotients, and "simple" (badly approximable) when they stay bounded. The Euclidean algorithm run on the pair generates the partial quotients; its remainders generate the convergents. Truncating the expansion gives rationals that hug more tightly than any rational of comparable or smaller denominator — the convergents are the unique best approximations of the second kind. All of classical Diophantine approximation (Dirichlet, Hurwitz, Liouville, Roth) is a quantitative study of the growth of the denominators relative to the size of the error.
Formal Statement
For , define the continued fraction algorithm by and, while ,
Derivation hint: split each into its integer part and fractional part , then invert the fractional part to expose the next integer. The resulting sequence yields
Derivation hint: unwind [1] recursively: , , etc. The expansion terminates iff . For irrational it is infinite and unique.
The -th convergent is the rational , computed by the fundamental recurrence:
with initial conditions . Derivation hint: matrix form — the product has columns and ; induction on the last factor gives [3]. The convergents satisfy the determinant identity
Derivation hint: the matrix above has determinant ; equate this to . and consequently
Derivation hint: divide [4] by .
For irrational with convergents ,
Derivation hint: write where ; then , subtract , use [4], and bound . Moreover the convergents straddle : even-indexed ones increase to from below, odd-indexed ones decrease to from above.
If (in lowest terms, ) satisfies for some , then . Equivalently, the convergents are exactly the best rational approximations of the second kind: no fraction with denominator approximates better in the sense of minimizing . In particular, if
then is a convergent of . Derivation hint: suppose satisfies [7] but is not a convergent; locate with , express in the basis via [4], and derive a contradiction on sizes.
For every irrational , infinitely many rationals satisfy
The constant is best possible: for the golden ratio , any larger constant admits only finitely many solutions to . Derivation hint: among any three consecutive convergents at least one beats , shown by the identity relating ratios; for optimality use that for the golden ratio so the constant saturates at .
Why It Holds
Step 1. Suppose is in lowest terms with , and assume for contradiction is not a convergent. Choose so that (possible since the strictly increase for ).
Step 2. By the best-approximation theorem, . Multiply the hypothesis by : .
Step 3. Consider the integer . Since (else is a convergent), , so . Write
Derivation hint: add and subtract ; the left equality is just clearing denominators.
Step 4. Bound the right side using the triangle inequality, the hypothesis, and [6]:
Derivation hint: by [6], and .
Step 5. Since , we get , and careful comparison (multiplying through by and using ) forces , a contradiction once the strict inequalities are tracked. Hence must be a convergent.
∎Step 1. Use the tail representation: writing (the complete quotient), the algorithm gives exactly
Derivation hint: apply [3] with the real value in place of an integer ; this is the same matrix recurrence evaluated at a real partial quotient.
Step 2. Subtract and clear denominators:
Derivation hint: combine [11] over common denominator , simplify the numerator using the determinant identity [4].
Step 3. Since , the denominator exceeds (in fact ), giving the upper bound . The lower bound follows since implies the denominator .
∎Khinchin transformed continued fractions from a computational curiosity into a branch of metric number theory — the study of properties holding for almost all reals in the Lebesgue sense. His 1935 monograph Continued Fractions proved that for almost every the geometric mean of the partial quotients converges to a universal constant , independent of , and established the ergodicity of the Gauss map with respect to the Gauss measure . His work bridged probability theory (he proved the law of the iterated logarithm) and arithmetic, showing the continued fraction algorithm is a measure-preserving dynamical system. The Gauss–Kuzmin–Wirsing operator governing the convergence rate is named partly for his program.
Building Intuition
Picture the Stern–Brocot tree or the Farey sequence: rationals organized by denominator. To approximate , you descend the tree, at each node turning left (toward smaller) or right (toward larger). The partial quotients count how many consecutive turns in the same direction you make before forces you to switch. A large means sits very near a "shelf" — a low-denominator rational that approximates it well, so you can stay close for a long time before refining. This is why has the famous approximation: the partial quotient is enormous, so (the convergent just before that big jump) is spectacularly accurate. Conversely, has the smallest possible partial quotients everywhere, so it is the hardest number to approximate — the convergents improve as slowly as the theory permits. Geometrically (the Klein/Lagrange picture), the convergents are the lattice points closest to the line in , alternating above and below; the partial quotients record how the line cuts successive cells of the integer lattice.
```svg
```
Worked Examples
Given: .
Step 1 — run the algorithm. ; . Then , . The process now repeats: (purely periodic tail — this is a quadratic irrational, by Lagrange's theorem).
Step 2 — build convergents via [3]. With :
| 0 | 1 | 1 | 1 | |
| 1 | 2 | 3 | 2 | |
| 2 | 2 | 7 | 5 | |
| 3 | 2 | 17 | 12 | |
| 4 | 2 | 41 | 29 |
Step 3 — check error bound [6]. For : , while . Indeed the error is below the bound.
(Note: here solve Pell's equation , e.g. .)
Given: .
Step 1 — first few convergents.
- (error )
- (error )
- (error )
Step 2 — explain the jump. The next partial quotient is (very large). By [6], with and . So the error is below — an error one would naively expect only from a five-digit denominator, achieved with a three-digit one.
Step 3 — verify the best-approximation strength. Compare . Since the actual error , equation [7] confirms must be a convergent — consistent.
Common Misconceptions
Convergents are not the only good approximations, but they bracket them. Between consecutive convergents lie the intermediate (semi-)convergents for . These can be best approximations of the first kind (minimizing ) without being convergents. Do not assume every excellent rational approximation appears in the convergent list — only the best approximations of the second kind (minimizing ) are exactly the convergents.
The bound [7] is sufficient but not necessary. A fraction can be a convergent yet fail — e.g. when the next partial quotient is , a convergent may only achieve , not . Equation [7] guarantees "convergent good" in reverse direction only: good convergent.
One might guess that purely periodic continued fractions correspond exactly to "simple" numbers. But consider — its partial quotients are bounded (), so it is badly approximable (bounded partial quotients avoids approximation better than ). Yet has unbounded partial quotients (the terms grow), so is not badly approximable despite being a "natural" constant — it admits infinitely many approximations far better than allows. The lesson: approximability is governed by partial quotient growth, not by how "famous" or "algebraic-looking" the number is.
Connections
Continued fractions sit at a crossroads of analysis, algebra, and dynamics. Lagrange's theorem ties them to Quadratic Irrationals: has an eventually periodic continued fraction iff is a quadratic irrational, linking the theory to Pell's Equation and the units of real quadratic fields. The Gauss map realizes the shift on partial quotients as a chaotic ergodic dynamical system, placing continued fractions inside Symbolic Dynamics. The approximation hierarchy generalizes through Diophantine Approximation to Liouville's theorem (algebraic numbers of degree resist approximation beyond exponent ) and its deep refinement, the Thue–Siegel–Roth Theorem (algebraic irrationals have approximation exponent exactly ). The metric theory connects to Hausdorff Dimension via the dimensions of sets with prescribed partial-quotient growth, and to Continued Fraction Transformation / transfer operators. Finally, the modular group acting on the hyperbolic plane geometrizes the whole subject: convergents are cusps of geodesics, tying continued fractions to Hyperbolic Geometry and Modular Forms.
Real-World Applications
Historical Development
Subtleties & Limits
Deep questions remain about the partial quotients of specific natural constants. It is unknown whether the partial quotients of , wait—'s pattern is known, but for , (Euler–Mascheroni), , and almost all algebraic numbers of degree , it is conjectured but unproven that the partial quotients are unbounded (i.e. these numbers are not badly approximable). The Zaremba conjecture asks whether for some absolute bound , every integer is the denominator of a fraction whose continued fraction has all partial quotients — proven only for density-one sets of (Bourgain–Kontorovich, 2014). The Littlewood conjecture on simultaneous approximation, for all , is intimately connected to continued fractions of and remains open despite the Einstein–Katok–Lindenstrauss measure-rigidity progress showing the exceptional set has Hausdorff dimension zero. Finally, whether Khinchin's constant is itself "normal" or even irrational is unknown — a striking gap, since governs almost every number yet resists analysis as an individual constant.
See Also
Diophantine Approximation · Quadratic Irrationals · Gauss–Kuzmin Distribution · Khinchin's Constant · Pell's Equation · Thue–Siegel–Roth Theorem · Farey Sequence · Stern–Brocot Tree · Modular Group · Liouville Numbers