TwoPi
← Back
A visual representation of π appearing across mathematics

What is π, really?

Most of us meet π\pi as the ratio of a circle’s circumference to its diameter. It is a clean definition, easy to state and easy to remember. But it does not explain why the same number shows up in probability, infinite sums, and even problems about counting.

That wider story is what makes π\pi so interesting.

The definition you were taught

Take any circle: a coin, a plate, or a planet. Measure its circumference (C)(C) and its diameter (d)(d), then divide one by the other. You will always get the same number: π\pi, about 3.141593.14159.

This works because all circles have the same shape. Make a circle twice as wide and its circumference also becomes twice as long, so the ratio stays fixed.

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

That is a perfectly good definition of π\pi. The surprise is that it turns up far beyond geometry.

First stop: a stick on the floor

Consider a floor ruled with parallel lines, spaced tt apart, and a needle of length \ell, where t\ell \leq t. Drop the needle at random. Sometimes it crosses a line and sometimes it does not. Repeat this thousands of times and count the crossings.

You might expect to learn something about needles and floors. Instead, you can use the results to estimate π\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 is one of the earliest examples of a Monte Carlo method, which uses random experiments to estimate a fixed quantity. People have actually recovered several decimal places of π\pi by dropping sticks.

Drops: 0Crossings: 0π ≈ -

Why does π\pi appear? The needle lands at an angle θ\theta relative to the lines, and that angle is uniformly random on [0,π)[0,\pi). When we account for every possible angle and position, π\pi falls out of the geometry of the angle itself.

The probability of a crossing is:

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

No circle is drawn on the floor. But angles are measured in radians, and radians are built from circle geometry. π\pi is already nearby.

Second stop: an infinite sum

In 1644, Pietro Mengoli asked a question that puzzled mathematicians for nearly a century: what is the exact value of this endless sum?

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

The sum is finite, but for nearly a century nobody could find its exact value. In 1734, Leonhard Euler found the answer:

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

Why should adding fractions involving square numbers produce π\pi? The link comes through the sine function. Euler found that sin(x)\sin(x) can be written as an infinite product:

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

The important detail is where sine equals zero: 0,±π,±2π,±3π,0, \pm\pi, \pm2\pi, \pm3\pi, \ldots. Expand this product and compare it with the Taylor series for sin(x)\sin(x), and the coefficient of x3x^3 forces the sum to equal π2/6\pi^2/6. The regular rhythm of sine carries π\pi with it.

3Blue1Brown has a beautiful visual proof of this.

There is an even stranger link to prime numbers. The probability that two randomly chosen integers are coprime, meaning they share no factor other than 1, is 6/π26/\pi^2, or about 61%. π\pi has no obvious business being in number theory, and yet there it is.

Third stop: the bell curve

This is often the most surprising example.

Consider ex2e^{-x^2}. It makes a bell-shaped curve, related to the patterns behind measurement errors, heights, and noise in signals. It is one of the central shapes in probability and statistics.

Now integrate it over the entire real line:

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

π\pi is hiding in the area under this curve. Why?

The usual trick is to call the integral II, then 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}

Squaring the integral lets us view it over the whole plane. 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:

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 original curve did not mention circles, but the two-dimensional version has circular symmetry. Polar coordinates make that symmetry visible, and π\pi comes along with it.

This π\sqrt\pi is not an extra detail. In the normal distribution, the familiar bell curve used in statistics, science, and machine learning, π\pi appears 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} makes the total area under the curve equal to 1. Without it, the curve could not represent probabilities.

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

Fourth stop: counting things

Factorials are about counting. For example, 5!5! is the number of ways to arrange five books on a shelf. So it feels odd to find π\pi in a formula about factorials.

For large nn, Stirling’s approximation gives:

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

The 2πn\sqrt{2\pi n} is essential. Without it, the estimate is much less accurate; with it, the relative error shrinks as nn grows.

Why is it there? The Gamma function gives an exact integral for a factorial: n!=Γ(n+1)=0tnetdtn! = \Gamma(n+1) = \int_0^\infty t^n e^{-t} \, dt. For large nn, the integrand peaks sharply near t=nt=n, and near that peak it is shaped like a Gaussian. Evaluating that Gaussian peak is the same computation as the bell curve integral, so π\pi appears for the same reason.

The Gamma function also works beyond positive integers, and it still contains π\pi: Γ(1/2)=π\Gamma(1/2) = \sqrt\pi. Counting and continuous mathematics are more connected than they first appear.

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 famous constants appear in one equation: ee, ii, π\pi, 11, and 00. There are no circles or geometric objects in the setup, only the exponential function and imaginary numbers. So why is π\pi involved?

The answer is Euler’s formula:

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

This formula follows from the power series for eze^z. Put ixix into that series and separate the real and imaginary parts; the familiar series for cosx\cos x and sinx\sin x appear.

Geometrically, an imaginary exponent makes eixe^{ix} travel around the unit circle. As xx increases, it moves at a steady rate and completes one full loop at x=2πx=2\pi.

Try dragging the point around the circle below. The blue value is the real part, cosθ\cos\theta, and the green value is the imaginary part, sinθ\sin\theta.

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.

π\pi appears because x=πx=\pi means a half-turn around the unit circle. This is the same circle geometry behind C/d=πC/d=\pi. The formula also explains why π\pi keeps returning wherever sines and cosines describe repeating motion: in sound, waves, and quantum mechanics.

So what is π, really?

Imagine mathematicians who discovered calculus before they studied geometry. They could meet π\pi through the bell curve, the Basel problem, or the Gamma function. Later, when they finally studied circles, they might be surprised to find the same number waiting there too.

The schoolbook definition is not wrong. It is one view of a much larger idea. Circles are where π\pi is easiest to see, but they are not its only home.

π\pi is a constant that appears throughout continuous mathematics. You see it in angles, infinite sums, probability, and counting. A circle is one expression of it; Euler’s identity is another.

The ratio C/d=πC/d = \pi remains a valid definition. But it is also a doorway into a number that connects many parts of mathematics.

Last updated