Number

The fraction Lambert built for the tangent

The first proof that π is not a fraction, from 1761, does not look at π at all. It writes the tangent as an endless continued fraction, shows that the fraction's value at any rational point other than zero cannot be rational — because its tails are trapped between nothing and one — and then notes that tan(π/4) = 1.

Worth reading first: An integral that cannot be a whole number · A fraction that never closes.

An integral that cannot be a whole number proved that π is not a fraction by Niven’s argument of 1947: a polynomial supplies a whole number, its smallness squeezes that number below one, and there is no whole number there. It noted in passing that the historical proof was quite different, and left it undrawn.

The historical proof is Johann Heinrich Lambert’s, presented to the Berlin Academy in 1761 and published in 1768. It never mentions π until its last line. What it proves is a statement about the tangent function — if xx is a rational number other than zero, then tanx\tan x is irrational — and the conclusion about π follows at once, because tan(π/4)=1\tan(\pi/4) = 1, which is rational, so π/4\pi/4 cannot be.

The whole weight falls on the tangent, and Lambert’s tool for it was a continued fraction.

The tangent built from a continued fraction. The curve tan x on (−1.55, 1.55) with 4 of Lambert's convergents: a straight line, then rational curves that bend ever closer to the tangent and follow it towards its poles.
Fig. 1 The tangent, dotted, and Lambert’s continued fraction x/(1x2/(3x2/(5)))x/(1 - x^2/(3 - x^2/(5 - \cdots))) stopped after one, two, three and five levels. The first stop is the line y=xy = x; the second is 3x/(3x2)3x/(3 - x^2), already bending towards the poles; by five levels the stopped fraction and the tangent cannot be told apart on the drawn range.

The tangent as a continued fraction

Lambert showed that

tanx=x1x23x25x27\tan x = \cfrac{x}{1 - \cfrac{x^2}{3 - \cfrac{x^2}{5 - \cfrac{x^2}{7 - \cdots}}}}

with the odd numbers marching down the left and x2x^2 in every numerator after the first. The figure draws what stopping the fraction at a given depth produces. Stopped after one level it is just xx, the tangent’s first approximation near zero. Stopped after two it is x/(1x2/3)=3x/(3x2)x/(1 - x^2/3) = 3x/(3 - x^2), which already has poles near ±3\pm\sqrt3 and follows the tangent’s upward sweep. Each further level is a ratio of polynomials that agrees with the tangent to higher order, and five levels are indistinguishable from it until the pole at π/2\pi/2.

Where the fraction comes from is a piece of calculus about ratios of series. Sine and cosine are power series, their ratio is the tangent, and dividing one series by another and inverting the remainder, over and over, generates exactly this pattern — each step produces the next odd number and another x2x^2. Lambert found it that way, by hand, and it is a special case of what Gauss later developed into a general theory of continued fractions for ratios of hypergeometric series. For the proof what matters is the shape of the result, not its derivation: whole numbers down the left, x2x^2 across the top.

Where the odd numbers come from

The derivation is short enough to follow in outline, and it shows why the pattern is so regular.

Write the sine and cosine as power series and pull out their common structure. Both are special cases of one family of series,

Fn(x)=1x22(2n+3)11!+x44(2n+3)(2n+5)12!,F_n(x) = 1 - \frac{x^2}{2(2n+3)} \cdot \frac{1}{1!} + \frac{x^4}{4(2n+3)(2n+5)} \cdot \frac{1}{2!} - \cdots,

indexed by nn, in which each term carries one more odd number in its denominator than the last. The member with n=1n = -1 is cosx\cos x and the member with n=0n = 0 is (sinx)/x(\sin x)/x — both can be checked by writing out the first few terms — so the tangent is xx times the ratio of those two members. The whole family is what Gauss would later call a hypergeometric series, one of the most thoroughly studied objects in analysis, and the family has one crucial property: any three consecutive members are linked by a three-term relation in which the coefficient is an odd number and x2x^2 appears once. Dividing that relation by the middle member expresses each ratio Fn/Fn+1F_n/F_{n+1} as an odd number minus x2x^2 times the next ratio.

Applied over and over, starting from the tangent, the relation peels off one odd number and one x2x^2 at each step. That is exactly the fraction: 11, then 33, then 55, each separated from the next by x2x^2. The regularity is not a lucky pattern noticed in the first few terms; it is the three-term relation working identically at every level, and that uniformity is what makes the tails behave the same way all the way down.

There is a further dividend. The convergents of the fraction are the best rational-function approximations to the tangent of their degree — they are what are now called Padé approximants — and they behave far better than the tangent’s Taylor series. The Taylor series converges only for x<π/2|x| < \pi/2, stopped by the poles, exactly as a denominator reaches past the radius of any series whose function has a singularity. The continued fraction has no such limit: it converges for every xx at which the tangent is finite, on both sides of every pole, because a ratio of polynomials can have poles of its own and place them where the tangent’s are.

Tails trapped between nothing and one

Now put x=p/qx = p/q, a fraction. Multiplying through by suitable powers of qq turns every numerator into p2p^2 and every left-hand entry into a whole multiple of qq. Define the tail after level nn as

rn=p2(2n+1)qrn+1,r_n = \frac{p^2}{(2n + 1)q - r_{n+1}},

the part of the fraction from level nn downwards. The whole fraction is built from the tails, and the tails are built from each other.

The tails of the fraction for tan(1). Bars for the first 14 tails of Lambert's continued fraction at x = 1/1, with the band between 0 and 1 shaded; from level 1 every tail sits inside the band.
Fig. 2 The tails of Lambert’s fraction for tan1\tan 1, each computed exactly from forty levels further down. Every one lies strictly between 00 and 11 — shaded band — and they shrink steadily, since each tail divides 11 by an odd number less something small.

The key fact is that from some level on, every tail lies strictly between 00 and 11. Once (2n+1)q(2n + 1)q is larger than p2+1p^2 + 1, a tail below 11 at level n+1n + 1 forces the denominator at level nn to exceed p2p^2, so the tail at level nn is below 11 too — and positive, because the denominator is positive. The tails far down are tiny, so the property holds deep in the fraction and propagates upwards to the threshold level. At x=1x = 1 the threshold is the very first level, and the figure shows all fourteen tails inside the band.

For larger xx the early tails can be large, and the argument simply starts further down.

The tails of the fraction for tan(3). Bars for the first 14 tails of Lambert's continued fraction at x = 3/1, with the band between 0 and 1 shaded; from level 5 every tail sits inside the band.
Fig. 3 The tails for tan3\tan 3. The first few are large — the first is over twenty, printed above its clipped bar — because 99 is bigger than the early odd numbers. From level five, where 2n+12n + 1 passes 9+19 + 1, every tail is inside the band between 00 and 11, and the argument applies from there down.

Why trapped tails mean irrational

Suppose tan(p/q)\tan(p/q) were a fraction. Then the tail at the threshold level would be a fraction too — each tail is a rational function of the one above it with whole-number coefficients, so rationality passes down the fraction — and so would every tail below it. Write each tail in lowest terms, rn=an/bnr_n = a_n/b_n. The recursion rn=p2/((2n+1)qrn+1)r_n = p^2/((2n + 1)q - r_{n+1}) rearranges to

rn+1=(2n+1)qp2bnan,r_{n+1} = (2n + 1)q - \frac{p^2 b_n}{a_n},

so the denominator bn+1b_{n+1} divides ana_n. And an<bna_n < b_n, because rn<1r_n < 1. So bn+1an<bnb_{n+1} \le a_n < b_n: the denominators of the tails form a strictly decreasing sequence of positive whole numbers, one for every level of an infinite fraction. That is impossible. There is no infinite descending staircase of positive integers, and the assumption that tan(p/q)\tan(p/q) was rational has produced one.

Notice what the argument never needed: any knowledge of the value tan(p/q)\tan(p/q) itself. It uses only the shape of the fraction — whole numbers, a fixed numerator, denominators that eventually outgrow it — and the descent does the rest. That is why the same page of reasoning covers every non-zero rational at once, rather than one number at a time. This is the same move as the square that cannot shrink, where a supposed fraction for 2\sqrt2 was folded into a smaller one without end. Here each tail hands a smaller denominator to the next. The engine is the trap between 00 and 11: a tail in that band cannot be a whole number, so its numerator must be smaller than its denominator, and that inequality is what makes the denominators fall. Legendre tidied the argument in 1794 into a general lemma — a continued fraction with whole numbers whose denominators eventually outweigh their numerators by more than one converges to an irrational — and used it to prove that π2\pi^2 is irrational too, which Lambert’s statement does not give directly.

The same fact, seen as approximation

The descent can be recast as a statement about how fast the fraction’s convergents close in, and in that form it connects to the rest of this subject.

Convergents that close in too fast. Points for convergents 2 to 9 of tan 1: the denominator times the error, on a logarithmic scale, falling steadily past the floors 1/10, 1/1,000 and 1/100,000 that any fraction a/b with those denominators would impose.
Fig. 4 The convergents of tan1\tan 13/23/2, 14/914/9, 95/6195/61, 841/540841/540, … — and for each, its denominator qq times its distance from tan1\tan 1, on a logarithmic scale. The product falls by a factor of ten or more at every step. A fraction a/ba/b would forbid it from falling below 1/b1/b; the dashed lines are that floor for b=10b = 10, 1,0001{,}000 and 100,000100{,}000, and the points pass all three.

If tan1\tan 1 were a fraction a/ba/b, then every other fraction p/qp/q would be at least 1/(bq)1/(bq) away from it, because a/bp/q=(aqbp)/(bq)a/b - p/q = (aq - bp)/(bq) and the numerator is a non-zero whole number. So qq times the error could never fall below 1/b1/b. The convergents of Lambert’s fraction make that product fall without limit — past every candidate denominator — so no bb can work.

This is the criterion the fraction that never closes used for ordinary continued fractions, and it is worth seeing why it is not the stronger criterion that a number approached too fast used for transcendence. The convergents of tan1\tan 1 beat 1/q21/q^2 by a growing factor, but only by a growing factor — the error behaves like 1/q2+ε1/q^{2 + \varepsilon} with ε\varepsilon shrinking towards nothing — so they prove irrationality and say nothing about whether tan1\tan 1 is algebraic. It is not, as it happens, but that took Lindemann’s theorem of 1882.

Not every endless fraction is irrational

It is worth seeing that the trap in the band is doing real work, because continued fractions of this generalised kind — with numerators other than 11 — can be infinite and still converge to a fraction.

Take the fraction with 22 in every numerator and 33 down the left:

x=232323.x = \cfrac{2}{3 - \cfrac{2}{3 - \cfrac{2}{3 - \cdots}}}.

It repeats, so its value satisfies x=2/(3x)x = 2/(3 - x), whose solutions are 11 and 22; the convergents 2/32/3, 6/76/7, 14/1514/15, … approach 11. An infinite fraction, and a rational value. What fails is the trap: the numerators never fall behind the denominators by more than one, so the tails do not shrink into the band, and nothing forces the descent.

For ordinary continued fractions, with every numerator equal to one, the question never arises — such a fraction is infinite exactly when its value is irrational, and the value of every finite one is a fraction. The generalised fractions that Lambert used are more flexible, which is why they can express the tangent at all, and the price of the flexibility is that irrationality has to be earned by a condition like the trapped tails. Lambert’s fraction earns it because its odd numbers grow and its numerator stays fixed at x2x^2: eventually the denominators leave the numerators far behind.

The twin with plus signs, and e

Change every minus sign in Lambert’s fraction to a plus and it becomes the hyperbolic tangent:

tanhx=x1+x23+x25+.\tanh x = \cfrac{x}{1 + \cfrac{x^2}{3 + \cfrac{x^2}{5 + \cdots}}}.

The hyperbolic twin, and e. The curve tanh x from −4 to 4 and 3 convergents of its continued fraction, which approach it; the same argument that makes tangents of rationals irrational makes every rational power of e irrational.
Fig. 5 The hyperbolic tangent, dotted, and the same continued fraction with plus signs stopped after one, two and three levels. The stopped fractions close in on it across the whole line. Because e2x=(1+tanhx)/(1tanhx)e^{2x} = (1 + \tanh x)/(1 - \tanh x), a rational value of ere^r would give a rational tanh(r/2)\tanh(r/2), which the same argument rules out.

The trapped-tails argument works as well with plus signs — the tails are now positive automatically and the threshold is where the odd numbers outgrow p2p^2 — so tanh(p/q)\tanh(p/q) is irrational for every non-zero rational p/qp/q. And the exponential is a rational function of the hyperbolic tangent: e2x=(1+tanhx)/(1tanhx)e^{2x} = (1 + \tanh x)/(1 - \tanh x). If ere^r were rational for some non-zero rational rr, then so would be tanh(r/2)\tanh(r/2), which it is not. Every non-zero rational power of ee is irrationalee itself, e2e^2, e\sqrt e, e3/7e^{-3/7}.

That is considerably more than the tail argument for ee gives. Fourier’s proof shows ee is irrational by squeezing a tail of its series; it does not reach e2e^2 without extra work, and it does not reach e\sqrt e at all in any direct way. Lambert’s fraction does all of them at once, and it does π with the same stroke.

Why the continued fraction and not the series

It is worth asking why Lambert needed a continued fraction when Fourier managed with a series.

The series for ee has terms 1/k!1/k! that shrink so fast that multiplying by q!q! clears every denominator up to qq and leaves a tail below 1/q1/q — the squeeze fits. The series for π\pi have no such property: every classical series for it converges slowly and its partial sums have denominators that no factorial clears. The continued fraction for the tangent is a different kind of expansion, whose convergents are fractions with small denominators that nonetheless approach the target very fast. It is exactly the property a squeeze needs, delivered in a form the series cannot give.

Niven’s proof two centuries later found a way to get the same effect from an integral, by building a polynomial whose integral against the sine is a whole number and very small. The two proofs are the same idea — a whole number trapped between nothing and one — carried by different vehicles, and Lambert’s vehicle has the advantage of proving a whole family of statements at once.

What Lambert believed and could not prove

Lambert did not stop at irrationality. In the same memoir he conjectured that π is not the root of any polynomial with rational coefficients — that it is transcendental — and he saw exactly why it mattered: squaring the circle with straightedge and compass would require constructing π\sqrt\pi, and only certain algebraic numbers can be constructed, so a transcendental π would settle the ancient problem in the negative.

He could not prove it, and nobody could for more than a century. The obstacle is the one the approximation figure makes visible: Lambert’s convergents approach tan1\tan 1 only a little faster than 1/q21/q^2, which is enough to rule out a rational value and nowhere near enough to rule out an algebraic one. Transcendence needed a different idea — not how fast a single number can be approached, but how the values of the exponential function at several algebraic points can be related — and Lindemann supplied it in 1882, building on Hermite’s proof of 1873 that ee is transcendental.

So Lambert’s memoir stands at the start of both stories. It settled irrationality with a method that is still taught, and it posed transcendence as the question that the method could not reach, correctly identifying what its answer would mean for geometry.

What the pictures cannot show

Convergence of the fraction. The figures stop the fraction at finite depth and show the stopped versions approaching the tangent; that the infinite fraction equals tanx\tan x exactly, for every xx where the tangent is finite, is a theorem about the ratio of two power series, and no finite drawing establishes it.

The tails of the infinite fraction. Each tail was computed from forty levels further down, which fixes it to far more digits than the drawing shows but is still a finite computation. The claim that the tails of the infinite fraction lie in the band follows from the inductive argument above, run downwards from arbitrarily deep; the figure is a picture of what that argument guarantees, not a substitute for it.

π itself. Nothing drawn involves π\pi. The proof reaches it only through tan(π/4)=1\tan(\pi/4) = 1, a fact about the circle that sits entirely outside the figures, and that is the point: the irrationality of π is a consequence of a statement about all non-zero rational points, of which π/4\pi/4 is not one.

Still open: sums and products of the famous constants

Lambert’s method, Niven’s and their descendants settle the irrationality of π\pi, of every non-zero rational power of ee, of π2\pi^2, and, through Lindemann and later Baker, the transcendence of many related numbers. For the simplest combinations of ee and π\pi they say nothing. Whether e+πe + \pi is irrational is not known. Whether eπe\pi is irrational is not known — though at least one of the two must be, since if both were rational then ee and π\pi would be roots of a quadratic with rational coefficients, contradicting their transcendence. Whether eee^e, ππ\pi^\pi or πe\pi^e is irrational is not known. And the Euler–Mascheroni constant, which the harmonic series defines as the gap between its partial sums and the logarithm, is not known to be irrational at all.

The next step on this path is the other continued fraction quoted here without proof: ee’s own simple continued fraction, [2;1,2,1,1,4,1,1,6,][2; 1, 2, 1, 1, 4, 1, 1, 6, \dots], whose pattern is itself a proof of something — and whose proof by three integrals is a short piece of integration by parts.

A statement about every fraction, cashed at one

Lambert did not prove that π is irrational by studying π. He proved that the tangent of every non-zero fraction is irrational, using a continued fraction whose tails are trapped between nothing and one and a descent that makes trapped tails impossible for a rational value — and then observed that one particular angle has a tangent of exactly one.

The same fraction with its signs changed gives the hyperbolic tangent, and with it the irrationality of every rational power of ee. Two of the most famous irrationalities in mathematics fall to one continued fraction and one descent, found in the 1760s, a century before anybody could say what either number was not.

What links here

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

Reads more easily once this is understood

Essays that name this one as worth reading first.

Shares its objects with

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

Named objects

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

Continued fractionsConvergenceDescentDiophantine approximatione, the numberIrrationalityPiProof by contradictionRational approximation