Today is often referred to as “Pi Day”, since in the United States and various other countries, the date March 14 is written as 3/14. Beyond those who write the date 14/3, there are a few who object to Pi Day for other reasons. For pedants who want to point out that 3.14 is not actually equal to pi, you’re right. However, note that the difference in numerical calculations is 0.05%. (The real pedants will also point out that in Greek, “pi” is pronounced “pee”, but nobody wants a “Pee Day”.) So, because I am not a complete curmudgeon, I dusted off an older mathy post and updated it.
Nobody can write about the history of science and mathematics without eventually bringing up Leonhard Euler (1707-1783). (Most Americans end up pronouncing his name like “oiler”.) So many important findings in math and physics that it’s hard to list them all, so I won’t try. I don’t really want to write a biography of him anyway: I just want to focus on one profound equation he discovered, and follow where it leads into some other interesting math…and of course physics.
Without further ado, here’s one of several formulas known as “Euler’s equation”:
The numbers 0, 1, and π are hopefully familiar to you; the exponential number e may be less well-known. It’s another geometrical number like π, and it has a value approximately equal to 2.71828… (but since it goes on forever without repeating, I’ll spare you any more digits). There are several ways to get at e, but we don’t need to worry about them for now. The main thing is that it’s standard, built into scientific calculators, and well-understood. The imaginary unit i also appears in the equation: recall that
So maybe you can see why Euler’s equation is a bit unexpected: e and π are real irrational numbers. (Irrational means these numbers can’t be expressed as the ratio of integers; integers are the whole numbers 0, 1, -1, 2, -2, 3, -3, etc.) Including i in the mix naïvely should yield a complex number, but it doesn’t: combining e, π, and i gives the negative integer -1.
In case you’re thinking I’m making a big deal out of nothing, type “exp(pi)” (without the quotation marks) into Wolfram Alpha. You should get
and so on, which is significantly larger than 1, and a positive number to boot. In fact, you won’t ever get a negative number by raising e to a real number. Try these in Wolfram Alpha: exp(-10), exp(-1), exp(0), exp(1), exp(10). Something weird and cool happens when you include an imaginary number in the exponent, and Euler realized after some careful computation what was going on.
First of all, the number π is special: if you plug another number in its place (say 1), you won’t get a real number out:
(rounding to two digits for conciseness). That’s a complex number: the sum of a real number with an imaginary number; refer to the figure on the right for a refresher on how to interpret complex number using coordinates. However, watch what happens when we square the real part and the imaginary part and add them together:
Rounding makes these numbers not quite equal, but if you include more and more digits while running , reaching ever higher levels of precision, you find that the sum is exactly equal to 1. You’ll also find this is true for other similar expressions like : you get a complex number, but if you square the real and imaginary parts, they add up to 1. Pi and its integer multiples are special, though: yields a real integer if is any integer: 0, -1, 1, -2, 2, etc.
Euler determined that you can split the exponential into real and imaginary parts like this:
where “cos” is the cosine function, “sin” is the sine function, and θ is any real number. If you’re like me, you first learned about sine and cosine in the context of triangles, and that’s a pretty useful way to think of them here too. To start, let’s draw a circle with radius equal to 1. All points on the circle will be the same distance—1—from the center; after all, that’s really what a circle means. Take an arbitrary point on the circle and map its x– and y-coordinates; draw a line from the center of the circle to your point. Now complete the triangle by connecting your point with the x-axis and the center, as shown in the figure below:
The standard trick in math is to associate the x– and y-axes with the real and imaginary parts of a complex number, so that the angle between the blue line and the x-axis, marked by θ, is the same as in Euler’s formula. The x-coordinate is the cosine of the angle, and the y-coordinate is the sine of the angle. Properly, we need to write the angle in radians, not degrees: one circle (360°) is 2π radians, so a half-circle (180°) is π radians. Looking at the circle above, you can see that an angle of π corresponds to x = -1 and y = 0, exactly what Euler’s formula predicts!
I won’t prove Euler’s formula (since it really needs calculus to do properly), but with a little more work we can see how useful it is. By drawing a larger or smaller circle, we can represent any complex number using a variation on Euler’s formula:
where r is a real number representing the radius of the new circle. Instead of writing the real and imaginary parts of the complex number like x– and y-coordinates, we can use r and θ, which are known as polar coordinates. The angle θ is also known as the phase of the complex number, and r is its magnitude. That’s a very simple formula, and makes doing many calculations with complex numbers quite easy.
For example: if you want to mathematically represent rotations in two dimensions, you can do it using complex numbers. Take the coordinates of (say) the corners of a square, and write them as four complex numbers:
To rotate the square by angle θ, multiply the number for each corner of the square by
and you’ll get the coordinates of the rotated square:
For the example image, I used radians (or 60° if you prefer, but it’s Pi DAY so use the friggin’ radians already).
and so forth, as in the picture.
It’s endlessly fascinating how many places π shows up where you don’t necessarily expect it. However, once you’re attuned, you realize its ubiquity is because geometry hides in many places: the spiral of shells, the strength of gravity, the fluctuations of waves. Pi is an interesting number, encoding a deep connection between many apparently disparate areas of the natural world.