When someone wishes you a "Happy Pi Day," you probably immediately think of circles—and not only pies. (Pi Day is March 14, or 3.14 if you’re using US date formatting.) That's because if you measure the distance around a circle’s outside (the circumference) and then the distance across it (the diameter), pi is the circumference divided by the diameter.

So anytime you’re dealing with circles, it seems quite logical that the number pi could show up. But many situations where pi appears at first seem to have nothing to do with circles at all. In quantum mechanics, it's in the solution to the Schrödinger equation, the way we model electrons and protons in an atom. It's in the magnetic permeability constant, which is used for calculating magnetic fields. It appears in the motion of a mass swinging on a string, otherwise known as a pendulum. It's in the electric constant, which is used for calculating the electric field due to charges. And it's even in the uncertainty principle, which says you can’t precisely know both the momentum and position of a particle.

Why does it keep showing up? Really, there are two primary reasons: symmetry and oscillations.

Pi and Symmetry

Let's talk about symmetry with an example—sunlight. Specifically, let’s consider the sun’s intensity. The easiest way to think about the sun’s power is to think about its rate of energy production, or how much it produces over a certain amount of time. It’s huge. The sun outputs almost 4 x 1026 watts (that’s 4 x 1026 joules) of energy every second.

Since it radiates this power in all directions, we can describe the power per unit area as the solar intensity. As light travels away from the sun, it covers an expanding sphere. As the radius of this sphere increases, the surface area over which the power must be distributed also increases. This means that the solar intensity decreases with distance from the sun. By the time that light has finally reached Earth, its intensity is only around 1,000 watts per square meter. Maybe this 2D diagram will help illustrate the concept:

Most PopularThe End of Airbnb in New York

BusinessAmanda Hoover

This Is the True Scale of New York’s Airbnb Apocalypse

BusinessAmanda Hoover

*Starfield* Will Be the Meme Game for Decades to Come

Will Bedingfield

The 15 Best Electric Bikes for Every Kind of Ride

GearAdrienne So

Guess what? The surface area of an expanding sphere depends on the value of pi, since a sphere is just a 3D circle. (The area of a sphere is 4πR2.) That gives the following expression for the solar intensity:

Light—or any other entity—spreading equally in all directions creates a spherical distribution. Any spherical distribution is symmetrical, since any point on a sphere would be equidistant from the center of the sphere.

OK, let's try another example. Imagine that I have an electric charge moving with some velocity (v). (Let's use a proton, but this applies to any charge, including the charges in atoms or even the charges moving in electric current.)

A moving electric charge creates a magnetic field, and we can calculate this magnetic field with the following equation:

Most PopularThe End of Airbnb in New York

BusinessAmanda Hoover

This Is the True Scale of New York’s Airbnb Apocalypse

BusinessAmanda Hoover

*Starfield* Will Be the Meme Game for Decades to Come

Will Bedingfield

The 15 Best Electric Bikes for Every Kind of Ride

GearAdrienne So

That’s a complicated and very beautiful equation—and there's your pi. It's right there in the denominator. It's there because the magnetic field caused by a moving charged particle has circular symmetry. To find the strength of the magnetic field, imagine drawing a line from the moving charge to the location where you want to find the value of the field. The strength of this field depends on the distance from the charge—and that forms a circle.

You can see the symmetry with this Python calculation showing a charge with a velocity vector (the red arrow) and the magnetic field at different locations (the yellow arrows).

(Here's the code.)

OK, now look at that other variable in the magnetic field equation, μ0. This is the magnetic constant (also called the vacuum permeability), and it has a value equal to 4π x 10-7 newtons per square ampere. Like all of the fundamental constants, it creates a relationship between stuff that we can actually measure—like forces and electric currents.

But why is there a pi in there, too? At first, it seems like these two instances of pi should cancel each other out. The one in the magnetic field equation is in the numerator, and there was already one in the denominator. That’s a fair point. In fact, it is possible to define our constants such that pi does not appear in the expression for the magnetic field. However, there’s another place this magnetic constant appears—in the speed of light.

If you recall, light is an electromagnetic wave. This means that it’s really two waves in one. There is a changing electric field that creates a changing magnetic field, and the changing magnetic field creates a changing electric field. As such, the value of the speed of this electromagnetic wave (we call it the speed of light, c) depends on both the magnetic constant *and* the electric constant (ε0).

Most PopularThe End of Airbnb in New York

BusinessAmanda Hoover

This Is the True Scale of New York’s Airbnb Apocalypse

BusinessAmanda Hoover

*Starfield* Will Be the Meme Game for Decades to Come

Will Bedingfield

The 15 Best Electric Bikes for Every Kind of Ride

GearAdrienne So

This means that if you wrote an expression for the magnetic constant without a pi, it would instead appear in the equation for the speed of light. One way or another, pi is going to show up.

Pi and Oscillations

And now for something completely different. Grab a mass and hang it vertically from a spring. Now pull this mass down a little bit and let go. This will cause the mass to oscillate up and down. If you measure the value of the mass (m) and the strength of the spring (the spring constant, k), you will find that the time it takes this mass to make one complete oscillation (the period T) agrees with the following equation:

Most PopularThe End of Airbnb in New York

BusinessAmanda Hoover

This Is the True Scale of New York’s Airbnb Apocalypse

BusinessAmanda Hoover

*Starfield* Will Be the Meme Game for Decades to Come

Will Bedingfield

The 15 Best Electric Bikes for Every Kind of Ride

GearAdrienne So

There's your pi. In fact, you can measure the mass, period, and spring constant independently and use this to calculate pi just for fun.

However, we can also use a mathematical function to represent this oscillation. Here is the simplest equation that gives the position of the mass as a function of time, where A is the amplitude of the motion and ω is the angular frequency.

This solution includes the trigonometric function cosine. If your trig is hazy, just remember that all trig functions tell us about the ratio of sides for right triangles. For instance, the cosine of 30 degrees says that if you have a right triangle with one angle of 30 degrees, the length of the side adjacent to this angle divided by the length of the hypotenuse would be some value. (In this case, it would be 0.866).

(You might think it's weird that we need a mathematical function that is also used for triangles to understand the motion of a spring—which is a circular object, after all. But in the end, this function just so happens to be a solution to our equation. In short, we use it because it works. Anyway, stick with me.)

Now imagine that your right triangle has an angle that is constantly increasing. (That’s the ωt term.) Since the angle changes, you essentially have a triangle that rotates around in a circle. If you look at just one side of this right triangle and how it changes with time—there’s your trigonometric function. Here’s what that looks like:

Since this oscillation is related to a circle, it seems obvious you would have a pi in there.

In fact, you can find pi in any other kind of oscillation that can be modeled with a trig function that contains sines or cosines. For example, think of a pendulum, which is a mass swinging from a string, or the vibrations of a diatomic molecule (a molecule with two atoms, like nitrogen), or even the change in electric current in something like a circuit inside a radio that makes an oscillation.

Uncertainty Principle

For physics geeks, perhaps the most popular fundamental is called h-bar (ħ). This is essentially just the Planck constant (h) divided by 2π.

The Planck constant gives the relationship between energy and frequency for super tiny objects, like atoms—and you can measure this constant yourself with some LEDs. In fact, pi shows up so often in models dealing with tiny quantum things that physicists combined pi and h to make h-bar.

Most PopularThe End of Airbnb in New York

BusinessAmanda Hoover

This Is the True Scale of New York’s Airbnb Apocalypse

BusinessAmanda Hoover

*Starfield* Will Be the Meme Game for Decades to Come

Will Bedingfield

The 15 Best Electric Bikes for Every Kind of Ride

GearAdrienne So

One place that you will see this h-bar (and thus pi) is with the uncertainty principle, which basically says that you can’t precisely measure both the position (x) and the momentum (p) of a particle. In fact, there is a fundamental limit to these measurements. (That’s the uncertainty principle.) It looks like this:

This says the product of the uncertainty in x (Δx) and momentum (Δy) must be greater than a value that depends on pi (h-bar).

Why can’t you know both position *and* momentum? The best explanation comes from waves. Imagine waves passing through water. We can estimate the velocity of each wave (and its momentum) by looking at the time it takes for multiple peaks to pass a stationary point. The more wave peaks that pass that point, the better our estimation of each wave’s velocity. However, if you have a bunch of wave peaks, it’s pretty difficult to determine the exact location of an individual wave—its position.

Now imagine there is instead just one wave peak. In this case, you will have a pretty good idea of where the wave is, but now you don’t know how fast it’s going. You can’t pinpoint both position and velocity to exact values. This is the uncertainty principle—it’s true for waves in water and for the behavior of tiny particles like electrons and protons.

Fine. But why is there a pi in there? This is going to get a little complicated, so just hold on to this idea for a moment: When we are talking about particles like electrons, we describe them with something called a wave function. This wave function gives us a probabilistic interpretation of motion such that we don’t actually know where or how a particle is moving, but only *probabilities* of what could happen.

Most PopularThe End of Airbnb in New York

BusinessAmanda Hoover

This Is the True Scale of New York’s Airbnb Apocalypse

BusinessAmanda Hoover

*Starfield* Will Be the Meme Game for Decades to Come

Will Bedingfield

The 15 Best Electric Bikes for Every Kind of Ride

GearAdrienne So

If we want to find *where a particle is* (the position, x) or *how fast it is going* (the momentum, p), then we need to integrate this wave function over all space. In quantum mechanics, this integral usually means that we are trying to find the probability of finding the particle *anywhere*. To do that, we add up the probabilities for all the different values of x, from negative infinity to positive infinity.

Those integrals can get a little complicated, but they always end up with something that looks like this:

Why in the world does an integral like that produce the value of pi? Of course, it’s complicated—but there is one trick to solve this type of integral. The trick is to expand the integral from one to two dimensions. Since the two new dimensions are independent, we create a 2-dimensional surface with circular symmetry. So, it should not be surprising that we get the value of pi. It’s this appearance of pi that gives us the constant h-bar.