Number Theory

What Pi Is and How We Know It Is Irrational

Learn what π measures, how it was pinned down, and follow a complete short proof that no fraction can ever equal it.

Key takeaways

  • Pi is the ratio of circumference to diameter, and the ratio is the same for every circle in flat (Euclidean) geometry.
  • Fractions such as 22/7 and 355/113 are close approximations, and neither equals π.
  • Johann Heinrich Lambert gave the first proof of irrationality in the 1760s, using a continued fraction for the tangent function.
  • Ivan Niven's 1947 proof assumes π = a/b and builds a whole number that must lie strictly between 0 and 1.
  • Pi is also transcendental, proved by Ferdinand von Lindemann in 1882, which makes squaring the circle impossible.

Pi, written π, is the circumference of any circle divided by its diameter, about 3.14159. It is irrational, which means no fraction of two whole numbers equals it exactly. Its decimal expansion therefore never ends and never falls into a repeating cycle.

No amount of computing digits could establish that, because a fraction can have a repeating block longer than any list of digits you have checked. We know it from proof. Below you will see what π is, how people estimated it, and one complete argument that settles the question using first-year calculus.

One ratio for every circle

Wrap a string around a can, straighten it, and compare it with the can's width. You will get a little more than three widths. Try a dinner plate or a bicycle wheel and the result is the same, within the error of your measuring.

The reason is scaling. All circles are the same shape, so enlarging a circle multiplies its circumference and its diameter by the same factor, and the ratio does not change.

The same number governs area: a circle of radius r encloses πr². It also gives the volume of a sphere, (4/3)πr³. On a curved surface such as a globe, the ratio of a circle's circumference to its diameter (measured along the surface) is smaller than π and depends on the circle's size.

Squeezing π between polygons

Archimedes, in the third century BCE, trapped the circle between regular polygons. A polygon inside the circle has a shorter perimeter than the circle, and one drawn around it has a longer perimeter.

With a circle of diameter 1, an inscribed regular hexagon has perimeter exactly 3. So π > 3. Archimedes doubled the number of sides repeatedly until he reached 96, and concluded that 223/71 < π < 22/7.

Approximation Decimal value Error compared with π
3 3.000000 about 0.14
223/71 3.140845 about 0.00075 (too small)
22/7 3.142857 about 0.0013 (too large)
355/113 3.1415929 about 0.0000003 (too large)

The fraction 355/113 was known to the Chinese mathematician Zu Chongzhi in the fifth century. Its remarkable accuracy for such small numbers is explained by continued fractions. Later methods replaced polygons with infinite series, a story told in the history of π in ancient and medieval mathematics.

What irrational means, and why digits cannot show it

A rational number is one that can be written as a/b with whole numbers a and b, where b ≠ 0. Every rational number has a decimal that either terminates or eventually repeats, and the reverse is also true.

So to prove π irrational you must rule out every fraction at once, including fractions with denominators of a trillion digits. Computers have produced trillions of digits of π, with totals that keep rising, and these show no repetition. That is consistent with irrationality but proves nothing about it.

The standard tool is contradiction: assume π is a fraction and show that something impossible follows. The method is the same one used in other proofs by contradiction.

Lambert's route through the tangent

Johann Heinrich Lambert found that the tangent function can be written as an endless nested fraction:

tan x = x / (1 − x² / (3 − x² / (5 − x² / (7 − ...))))

By analyzing this expression, he showed that if x is a nonzero rational number, then tan x is irrational. Now note that tan(π/4) = 1, which is rational. So π/4 cannot be rational, and therefore π is not rational either.

The idea is elegant, but making the convergence argument airtight takes some care. A later proof is easier to check line by line.

Niven's proof, step by step

Assume that π = a/b, where a and b are positive whole numbers. Pick a positive whole number n, to be chosen large later, and define

f(x) = xⁿ (a − bx)ⁿ / n!

Step 1: symmetry. Replacing x with π − x = a/b − x swaps the two factors (apart from powers of b that cancel), so f(π − x) = f(x).

Step 2: whole-number derivatives. Multiplied out, f is 1/n! times a polynomial with integer coefficients, using only powers from xⁿ to x²ⁿ. The j-th derivative at 0 is zero when j < n or j > 2n. When j is between n and 2n, it equals j!/n! times an integer, which is an integer. By the symmetry, every derivative at π is also an integer, possibly with the sign changed.

Step 3: a helper function. Alternate the even-order derivatives:

F(x) = f(x) − f''(x) + f''''(x) − ... + (−1)ⁿ (2n-th derivative of f)
F''(x) + F(x) = f(x)                      (the terms cancel in pairs)
d/dx [F'(x) sin x − F(x) cos x]
    = F''(x) sin x + F(x) sin x           (the cosine terms cancel)
    = f(x) sin x

Step 4: integrate from 0 to π. Since sin 0 = sin π = 0, cos 0 = 1 and cos π = −1, the integral of f(x) sin x from 0 to π equals F(π) + F(0). By step 2, this is a whole number.

Step 5: the squeeze. For x strictly between 0 and π, both f(x) and sin x are positive, so the integral is greater than 0. Also x < π and a − bx < a, so f(x) < (πa)ⁿ / n!. The integral is then less than π × (πa)ⁿ / n!.

Factorials eventually outgrow any fixed power, so this bound drops below 1 once n is large enough. We would have a whole number strictly between 0 and 1. None exists, so the assumption π = a/b is false.

The shape of Niven's argument
1 Assume a fraction Suppose π = a/b with positive whole numbers 2 Build f(x) A polynomial chosen to be symmetric on the interval from 0 to π 3 Integral is whole Integrating f(x) sin x gives an integer 4 Integral is tiny It is positive and below 1 when n is large 5 Contradiction So π is not a fraction Assume a fraction Suppose π = a/b with positive whole numbers 1 Build f(x) A polynomial chosen to be symmetric on the interval from 0 to π 2 Integral is whole Integrating f(x) sin x gives an integer 3 Integral is tiny It is positive and below 1 when n is large 4 Contradiction So π is not a fraction 5

Why the argument works

The proof can feel like a trick, so it helps to see the roles. The assumption π = a/b is used to build a polynomial that behaves nicely at both ends of the interval. That makes the integral an integer.

The n! in the denominator does two jobs. It is small enough to leave the derivatives as whole numbers, yet large enough to crush the size of the integral. Without the assumption of a fraction, the derivatives at π would not be integers, and no contradiction would arise.

The fact about π that enters is that it is the first positive place where sine returns to zero. That is how the circle ratio gets into a statement about whole numbers.

Beyond irrational

Some irrational numbers are fairly tame. The square root of 2 solves x² − 2 = 0, and you can read several proofs of that in why √2 is irrational.

Pi solves no such equation. It is transcendental: no nonzero polynomial with integer coefficients has π as a root. Lindemann's 1882 proof built on Hermite's earlier method for e.

One consequence ends an ancient puzzle. With an unmarked straightedge and compass, you can only construct lengths that satisfy certain polynomial equations. Squaring a circle of radius 1 would require constructing √π, which is impossible. See why squaring the circle is impossible.

Where π turns up away from circles

Once π enters mathematics through the circle, it keeps appearing where no circle is visible. Three examples show the range.

First, the sum 1 + 1/4 + 1/9 + 1/16 + ..., adding the reciprocals of all the squares, equals π²/6, about 1.6449. Euler found this in the eighteenth century.

Second, if you pick two large whole numbers at random, in the sense of choosing uniformly up to a bound and letting the bound grow, the probability that they share no common factor approaches 6/π², about 0.608.

Third, drop a needle onto a floor ruled with parallel lines spaced exactly one needle length apart. The probability that it crosses a line is 2/π, about 0.637. The experiment, described in Buffon's needle, converges far too slowly to be a practical way of computing digits.

In each case a circle or a periodic function is hiding in the method of proof. The needle can land at any angle, for instance, and averaging over angles brings π in.

Mistakes people commonly make

"π equals 22/7." It does not. The two differ from the third decimal place on. Use the fraction as an estimate and say so.

"π is infinite." The number is between 3.14 and 3.15. Only its decimal expansion goes on without end, and 1/3 has an endless expansion too.

"Never repeating means every pattern appears." The number 0.101001000100001..., with one more zero each time, never repeats, yet it contains no digit 2 at all.

"A circle with rational diameter has rational circumference." If the diameter is a nonzero rational number d, the circumference πd is irrational, because otherwise π would be a ratio of two rationals. You can have a rational circumference only if the diameter is irrational.

"Measurement could settle it." A physical measurement always carries some uncertainty, and within any margin of error there are both rational and irrational numbers. Irrationality is a property of the exact mathematical circle.

For practical work, few digits are needed. The value 3.14159 gives a circle's circumference to better than one part in a hundred thousand, usually finer than the diameter was measured in the first place.

What remains unknown

Irrationality says the digits never repeat. It does not say they look random. Mathematicians suspect that π is normal in base 10, meaning every block of digits of a given length turns up equally often in the long run. As of the mid-2020s this had not been proved. You cannot conclude from irrationality alone that your birthday appears somewhere in the digits, even though a search of the known digits will very likely find it.

It is also unknown whether π + e or π × e is irrational, although at least one of the two must be transcendental. For current status on questions like these, look to recent surveys or university sources, since open problems do get settled.

Written for 4Mathematics with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 59 articles in Number Theory →

Latest news on this topic