TwoPi
← Back
A visual representation of π appearing across mathematics

What is π, really?

Every student gets introduced to π\pi as the ratio of a circle’s circumference to its diameter. A clean definition. Easy to state, easy to memorize. But π\pi keeps showing up in places that have nothing to do with circles. That’s the part worth talking about.

The definition you were taught

Take any circle: a coin, a disk, a planet. Measure its circumference (C)(C) and diameter (d)(d). Divide CC by dd. You will always get the same number: π\pi, approximately 3.141593.14159.

We call it π\pi, give it a symbol, and that’s usually the end of it.

π=Cd\pi = \frac{C}{d}

The ratio is always the same because all circles are similar, so CC and dd always scale together, keeping their ratio fixed. That much is just geometry.

But knowing where π\pi lives is not the same as knowing what it is. And it turns up in places that have nothing to do with circles.

First stop: a stick on the floor

Here’s an experiment. Take a needle of length \ell and a floor ruled with parallel lines spaced tt apart, with t\ell \leq t. Drop the needle. Sometimes it crosses a line, sometimes it doesn’t. Now do that thousands of times and count how often it crosses.

You’d expect a result about needles and floors. What you get is π\pi.

If you drop the needle nn times and it crosses a line xx times, then:

π2nxt\pi \approx \frac{2n\ell}{xt}

This is Buffon’s needle problem, posed by Georges-Louis Leclerc in 1777. It was one of the earliest examples of a Monte Carlo method, using randomness to compute a deterministic quantity. People have actually done this experiment physically and recovered π\pi to several decimal places – just by dropping sticks.

Drops: 0Crossings: 0π ≈

Where does π\pi come from? The needle lands at some angle θ\theta relative to the lines. That angle is uniformly random on [0,π)[0, \pi) – and there’s your culprit. The range of possible angles is exactly π\pi radians. When you integrate over all possible angles and positions, π\pi falls out of the geometry of the angle itself, not from any circle.

The probability of a crossing is:

P=2tπP = \frac{2\ell}{t\pi}

No circles. Just a stick, a floor, and an angle that happens to range over π\pi radians.

Second stop: an infinite sum

In 1644, Pietro Mengoli posed a question that stumped mathematicians for nearly a century: what is the exact sum of the reciprocals of all perfect squares?

112+122+132+=?\frac{1}{1^2} + \frac{1}{2^2} + \frac{1}{3^2} + \cdots = \mathord{?}

It was obvious the sum converged (it’s bounded), but nobody could find the exact value. Until Euler cracked it in 1734, at age 27, and the answer was:

n=11n2=π26\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}

Why would adding up reciprocal squares produce π\pi? There are no circles anywhere in sight. The connection runs through the sine function. Euler noticed that sin(x)\sin(x) can be written as an infinite product over its zeros:

sin(x)=xn=1(1x2n2π2)\sin(x) = x\prod_{n=1}^{\infty}\left(1 - \frac{x^2}{n^2\pi^2}\right)

The zeros are exactly 0,±π,±2π,±3π,0, \pm\pi, \pm 2\pi, \pm 3\pi, \ldots. When you expand this product and compare coefficients with the Taylor series for sin(x)\sin(x), the coefficient of x3x^3 forces the sum to equal π2/6\pi^2/6.

3Blue1Brown has a beautiful visual proof of this.

The result has a beautiful connection to prime numbers too. The probability that two randomly chosen integers are coprime turns out to be exactly 6/π26/\pi^2, roughly 61%. π\pi has no obvious business being in number theory, and yet there it is.

Third stop: the bell curve

This is the one that genuinely surprises people.

Take the function ex2e^{-x^2}. It has nothing to do with circles. It’s the bell curve: the shape of measurement errors, of heights in a population, of noise in a signal. It’s arguably the most important function in all of probability and statistics.

Now integrate it over the entire real line:

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi}

π\pi is hiding inside the bell curve. But how?

The trick is elegant. Call the integral II. Square it:

I2=(ex2dx)(ey2dy)=e(x2+y2)dxdy\begin{aligned} I^2 &= \left(\int_{-\infty}^{\infty} e^{-x^2} \, dx\right)\left(\int_{-\infty}^{\infty} e^{-y^2} \, dy\right) \\ &= \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} e^{-(x^2+y^2)} \, dx \, dy \end{aligned}

Now switch to polar coordinates, where x2+y2=r2x^2 + y^2 = r^2 and the area element dxdydx\,dy becomes rdrdθr\,dr\,d\theta. The double integral becomes clean:

I2=02π0er2rdrdθ=πI^2 = \int_0^{2\pi}\int_0^{\infty} e^{-r^2} \, r \, dr \, d\theta = \pi

So I=πI = \sqrt\pi. The circle wasn’t in the function. It was in the coordinate system. When you square the integral and switch to polar coordinates, you’re tracing out a circle in the plane, and π\pi is the reward for that symmetry.

That π\sqrt\pi is not decorative. Every time you write down the normal distribution (the bell curve used across statistics, science, and machine learning), π\pi is sitting in the denominator:

f(x)=1σ2πe(xμ)22σ2f(x) = \frac{1}{\sigma\sqrt{2\pi}}\, e^{-\frac{(x - \mu)^2}{2\sigma^2}}

The 2π\sqrt{2\pi} is the normalising constant. Without it, the total area under the curve wouldn’t equal 1, and the function couldn’t be a probability distribution.

3Blue1Brown has a visual walkthrough of the polar coordinates argument.

Fourth stop: counting things

Factorials are about counting: 5!5! is the number of ways to arrange five books on a shelf. Purely discrete. So finding π\pi buried in their asymptotic behaviour is strange.

For large nn, Stirling’s approximation gives:

n!2πn(ne)nn! \approx \sqrt{2\pi n} \left(\frac{n}{e}\right)^n

Drop the 2πn\sqrt{2\pi n} and the approximation falls apart for large nn. Keep it and the relative error goes to zero.

Why is it there? Factorials have an exact integral representation via the Gamma function: n!=Γ(n+1)=0tnetdtn! = \Gamma(n+1) = \int_0^\infty t^n e^{-t} \, dt. The integrand peaks sharply at t=nt = n, and near that peak it’s shaped like a Gaussian. Evaluating that Gaussian peak is the same computation as the bell curve integral, and π\pi falls out for the same reason.

The Gamma function extends this to values beyond the positive integers, and there too π\pi shows up: Γ(1/2)=π\Gamma(1/2) = \sqrt\pi. Same π\pi, same mechanism. Discrete counting and continuous analysis are less separate than they look.

Fifth stop: a formula nobody expected

In 1748, Euler published what is now called Euler’s identity:

eiπ+1=0e^{i\pi} + 1 = 0

Five constants in a single equation: ee, ii, π\pi, 11, and 00. No circles, no geometry in the setup. Just the exponential function and imaginary numbers. So where does π\pi come from?

The answer is Euler’s formula:

eix=cosx+isinxe^{ix} = \cos x + i\sin x

This isn’t a definition – it follows from the Taylor series for eze^z. Substitute ixix and separate real and imaginary parts, and you recover exactly the series for cosx\cos x and sinx\sin x.

What it says geometrically is that raising ee to an imaginary power traces a circle in the complex plane. As xx increases, the point eixe^{ix} moves around the unit circle at a constant rate, completing a full loop when x=2πx = 2\pi.

Drag the point around the circle below to see how the real part (cosθ\cos\theta, blue) and imaginary part (sinθ\sin\theta, green) change as θ\theta sweeps from 00 to 2π2\pi.

Set x=πx = \pi. Since cosπ=1\cos\pi = -1 and sinπ=0\sin\pi = 0:

eiπ=1+0i=1e^{i\pi} = -1 + 0i = -1

And so eiπ+1=0e^{i\pi} + 1 = 0.

The π\pi appears because it is the exact value of xx at which the complex exponential has rotated halfway around the unit circle, and that is precisely why C/d=πC/d = \pi holds for any circle. The two descriptions are equivalent. But starting from the Taylor series, π\pi earns its place analytically, and that is why it reappears wherever oscillation is described through sines and cosines: in Fourier analysis, wave mechanics, and quantum mechanics.

So what is π, really?

Here’s a way to think about it. Suppose alien mathematicians developed calculus before ever studying geometry. They’d discover π\pi through the Gaussian integral, or through the Basel problem, or through the Gamma function. And then, one day, they’d stumble upon circles and realise with some surprise that this constant they’d been computing analytically is also the ratio of circumference to diameter.

The schoolbook definition isn’t wrong; it’s just not the whole picture. π\pi doesn’t belong to circles. Circles are just where humans happened to notice it first, because they were the first smooth, symmetric curves we ever thought carefully about.

π\pi is a constant of continuous mathematics. It turns up in angles, in infinite sums, in probability, in counting, and more. The circle is one expression of that. Euler’s identity is another.

The ratio C/d=πC/d = \pi isn’t the definition of π\pi. It’s a consequence of what π\pi already is.

Last updated