Continued Fractions
A continued fraction expresses a number as an iterated sequence of nested fractions . Its key result: every real number has a continued fraction expansion that is finite iff the number is rational, and the truncations (convergents) are the best possible rational approximations. Applies to number theory, Diophantine approximation, Pell's equation, and the analysis of irrationality. Studied systematically by Euler, Lagrange, and Gauss in the 18th century, with roots in the Euclidean algorithm of antiquity.
Any real number splits uniquely into its integer part and a fractional remainder . The trick is to invert the remainder — replacing a small number in by its reciprocal in — and repeat. This is precisely the Euclidean algorithm in disguise, and it terminates exactly when is rational. The list of integer parts you peel off at each stage is the continued fraction expansion.
Formal Statement
A simple (regular) continued fraction is an expression
Derivation hint: This is the nested form; each is obtained by peeling off integer parts and inverting remainders. where and are the partial quotients. We abbreviate this as . The expansion is finite if it terminates: .
The -th convergent is the value obtained by truncating after :
Derivation hint: Evaluate the finite continued fraction from the innermost level outward. The numerators and denominators satisfy the fundamental recurrence
Derivation hint: Replace in by the formal variable; induction on the structure of the nesting gives the linear recurrence. with initial conditions .
For the convergents of any simple continued fraction:
(a) The determinant identity holds:
Derivation hint: Induct using the recurrence [3]; the cross-terms telescope and the sign alternates.
(b) Consecutive convergents differ by
Derivation hint: Divide [4] by .
(c) Even convergents increase to , odd convergents decrease to , and
Derivation hint: lies between consecutive convergents; the gap [5] bounds the error, and .
A simple continued fraction is eventually periodic if and only if is a quadratic irrational (a root of with , , and non-square discriminant). It is purely periodic iff and its conjugate satisfies (a reduced quadratic irrational).
If is a convergent of , then for every rational with and :
Derivation hint: Solve , for integers using [4]; sign analysis shows the convergent error is strictly smaller. Convergents are thus the best rational approximations of the second kind — no rational with a smaller or equal denominator approximates more closely (after weighting by the denominator).
Why It Holds / Derivation
We construct the expansion of a real and prove the rational/irrational dichotomy.
Step 1 — Peel the integer part. Set and . Then with the remainder .
Step 2 — Invert and repeat. If , stop. Otherwise define and . Continuing, and .
Step 3 — Rational case terminates. If in lowest terms, the algorithm reproduces the Euclidean algorithm: writing , the partial quotients are exactly the quotients in successive divisions. Since remainders form a strictly decreasing sequence of nonnegative integers, the process halts after finitely many steps. Hence rationals have finite expansions.
Step 4 — Irrational case is infinite. If is irrational, no remainder is ever zero (a zero remainder would express as a finite continued fraction, which is rational by [2]–[3]). So the expansion is infinite.
Step 5 — Convergence. From [5], the partial sums of form an alternating series with terms (the grow at least like Fibonacci numbers, so exponentially). Therefore converges to a limit, and that limit is by the nesting construction.
∎Suppose as real numbers. Taking floors of both sides (using that all later force the tail to lie in ) gives . Subtracting and inverting reduces to , and induction yields for all . The only ambiguity is the finite-case convention , removed by requiring the last partial quotient to exceed .
∎Euler was the first to develop continued fractions into a systematic theory. In his 1737 paper De fractionibus continuis dissertatio, he proved that has the elegant expansion , establishing 's irrationality. He discovered the recurrence relations for convergents, connected continued fractions to infinite series and products, and laid groundwork that Lagrange would complete with the periodicity theorem. Euler's notation and computational facility turned a curiosity into a pillar of analytic number theory.
Building Intuition
Think of a real number as a point on a number line. The integer part tells you which integer interval it sits in. The leftover fraction is small, so its reciprocal is large — and the size of that reciprocal tells you how close is to the integer : a huge means is barely above . Each partial quotient is a "zoom-in" step. Large partial quotients signal that a particular convergent is an exceptionally good approximation (the next one barely improves on it) — this is exactly why has the famous approximation : the means is astonishingly accurate. Conversely, all-'s (the golden ratio) means every approximation is as bad as continued fractions allow — no convergent is ever especially good.
Worked Examples
Given: Find the continued fraction of via the Euclidean algorithm.
Step 1: , so , remainder . Step 2: , so , remainder . Step 3: , so , remainder . Step 4: , so , remainder — stop. Thus .
Check convergents using [3] with :
- ✓
Verify [4]: . ✓
Given: Find the continued fraction of and a rational approximation accurate to .
Step 1: , so ; remainder , reciprocal . Step 2: , so ; remainder again — the process repeats. Therefore , purely periodic (consistent with Lagrange's theorem, since is a quadratic irrational).
Convergents via [3]:
- while
Error bound from [6]: . Here , , so error . ✓
Common Misconceptions
Continued fraction convergents are NOT the same as decimal truncations. Truncating to gives a worse approximation than the convergent , which uses a smaller denominator yet is accurate to six decimal places. Best-approximation (Theorem [7]) is a property of convergents, not of decimal rounding. Also beware: the partial quotients are integers (for ), but the convergents are not the partial quotients — students frequently conflate the two sequences.
The fraction is a convergent of (), and is too. But approximates reasonably well, yet it is not a convergent. The precise statement (the converse direction) is: if , then must be a convergent. So merely "decent" approximations can be non-convergents, but anything beating the threshold is forced to be one. This shows the best-approximation property is sharp, not vacuous.
Connections
Continued fractions weave together several areas. The expansion algorithm is the Euclidean Algorithm applied to real numbers, so convergents inherit Bézout-type identities (the determinant relation [4] is exactly a Bézout coefficient). They give the complete solution to Pell's Equation : the fundamental solution comes from the convergents of at the end of its period. They are the principal tool in Diophantine Approximation, underlying Hurwitz's Theorem (every irrational has infinitely many with , with optimal precisely because of the golden ratio). Via the Gauss Map they connect to Ergodic Theory and the Gauss–Kuzmin distribution, which describes the statistical frequency of partial quotients.
Real-World Applications
Historical Development
Subtleties & Limits
The continued fraction of has no known pattern. Despite following a clean rule, the expansion of appears statistically random, and it is an open question whether its partial quotients are bounded or follow the Gauss–Kuzmin distribution. More broadly, it is unknown whether (or any specific algebraic irrational of degree , like ) has bounded partial quotients. Khinchin's theorem shows that for almost every real number the geometric mean of the partial quotients converges to Khinchin's constant — yet no explicit "natural" constant has been proven to obey this, and verifying it for or remains out of reach. The deep mystery is that cubic and higher algebraic irrationals have no known periodicity or pattern, in stark contrast to the perfectly periodic quadratic case.
See Also
Euclidean Algorithm · Pell's Equation · Diophantine Approximation · Quadratic Irrationals · Golden Ratio · Gauss Map and Ergodic Theory · Hurwitz's Theorem · Stern–Brocot Tree · Khinchin's Constant