Euler’s identity is a special case of the equation that the American quantum physicist Richard Feynman called “the most remarkable formula in mathematics.” That equation is Euler’s formula,

$e^{{i}{x}} = cos(x) + {i}sin(x)$

Euler’s identity is Euler’s formula when x = $\pi\$.

$e^{{i}\pi} = cos \pi\ + {i} sin \pi\$
$e^{{i}\pi} = {-1} + {i}{(0)}$
$e^{{i}\pi} + {1} = {0}$

Euler’s formula connects complex analysis with trigonometry, and Euler’s identity ties in a single equation the five most fundamental numbers of mathematics. (For more on the irrational numbers in Euler’s identity, see these three posts.)

Why does Euler’s formula and, by extension, Euler’s identity, even work? One explanation, and the one by which I was first exposed to Euler’s formula, was the Maclaurin expansion of e and the trigonometric functions sine and cosine.

Maclaurin series, named after 18th century Scottish mathematician Colin Maclaurin, are a form of Taylor series beginning where x = 0. Taylor series represent a function as an infinite sum of terms calculated from taking higher and higher order derivatives of the function at the point xa. They help turn complicated functions into more easily interpreted ones.

According to a Taylor series expansion, f(x) = $\sum_{n=0}^\infty \frac{f^{n}{(a)}}{n!}\cdot {(x-a)}^{n}$

Where x = 0, you have the Maclaurin series expansion f(x) = $\sum_{n=0}^\infty \frac{f^{n}{(a)}}{n!}\cdot {x}^{n}$

Expanding the functions f(x) = ${e}^{x}$g(x) = cos x, and h(x) = sin using Maclaurin series gives us the following sums:

$f{(x)} = {e}^{x} = 1 + {x} + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} ...$

${g}{(x)} = \cos (x) = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \frac{x^8}{8!} ...$

${h}{(x)} = \sin (x) = {x} - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \frac{x^9}{9!} ...$

Notice that the cosine function has only even powers and the sine function has only odd powers. The cosine and sine Maclaurin expansions would complete one another, if not for the changing of signs for each term.

If we substituted the x in ${e}^{x}$ with ${i}\theta$, understanding that is equal to $\sqrt{-1}$, gives us:

${e}^{{i}\theta} = 1 + {({i}\theta)} + \frac{{({i}\theta)}^{2}}{2!} + \frac{{({i}\theta)}^{3}}{3!} + \frac{{({i}\theta)}^{4}}{4!} + \frac{{({i}\theta)}^{5}}{5!} ...$

Simplifying this yields:

${e}^{{i}\theta} = 1 + {({i}\theta)} - \frac{\theta^{2}}{2!} - {i}\frac{\theta^{3}}{3!} + \frac{\theta^{4}}{4!} + {i}\frac{\theta^{5}}{5!} ...$

When we group the even and odd order terms separately, the expansion becomes:

${e}^{{i}\theta} = (1 - \frac{\theta^{2}}{2!} + \frac{\theta^{4}}{4!} - ...) + {i}(\theta - \frac{\theta^{3}}{3!} + \frac{\theta^{5}}{5!} - ...)$

Remarkably, the left side of the sum contains the even order terms of the Maclaurin expansion of the cosine series; the right side, the odd order terms of the sine series. We could simplify the sum, then, to:

${e}^{{i}\theta} = \cos(\theta) + {i}\sin(\theta)$

Then, as discussed previously, where x = $\theta$ = $\pi$, we derive Euler’s identity, ${e}^{{i}\pi} + 1 = 0$.

Given a unit circle, such as the one displayed at the beginning of this post, you can see the relation between e and the trigonometric functions as well. (For more on the real and imaginary axes on the unit circle, see this post.) For a point on the unit circle, cos x is the x-coordinate and sin x is the y-coordinate. $e^{{i}\theta}$ is equal to a counterclockwise rotation around that circle.

Think of it as the hypotenuse of the triangle formed by the cosine and sine functions. Taking every value for $\theta$ and plotting ${e}^{{i}\pi}$ at each point would trace the unit circle.

That is imaginary exponential growth described by Euler’s identity.