Demonstrating Euler’s formula

If you have ever been taught about complex numbers and you’re like me, then the sudden appearance of Euler’s number in this seemingly unrelated subject was probably met by surprise. That’s why in this post, I aim to bring together several concepts you might not have seen together before. To start off, meet Leonhard Euler’s formula:

    \[e^{ix} = \cos{x} + i \sin{x}\]

While justifications have inevitably been given in the form of working out Taylor series or taking derivatives, there is a difference between writing down a mathematical proof and actually understanding how and why this formula could be true. So, please allow me to show you a visual way of looking at the formula and its actions embedded within! Note that this post holds no grudge against mathematical rigor: the latter is still a vital tool across all domains of mathematics and beyond. I simply want to present to you a new perspective, hopefully expanding your insight even further into this remarkable formula.

What is complex multiplication?

Just as complex addition can be thought of as a translation in the complex plane, complex multiplication is really just a scaling and a rotation. For example, multiplying a by 1 + i gives a new complex number b that is:

  • \sqrt{2} larger in magnitude than a (the scaling), and
  • rotated 45° counterclockwise relative to a (the rotation).

The parameters of this transformation, represented in the figure below, are simply the magnitude and the phase of the multiplier 1 + i. Notice how a and b are each ‘in the same position’ relative to their own grids, loosely speaking.

Rendered by

For our discussion, it’s more convenient to view the multipliers as transforming ‘triangles’ rather than transforming the whole Cartesian plane. The input a and the output b then ought to be similar triangles, with the third point being 1 and the multiplier respectively. In the above figure, this means concretely that a is to 1 exactly as b is to 1 + i (which is clearly an algebraic truth). Here’s another example to intuitively demonstrate that the two methods are equivalent:

Rendered by

Rendered by

The ‘action’ that transforms 2+3i to (2+3i)(2-i) is the same as what transforms the black grid to the green grid, or what transforms the black triangle into the teal triangle. This geometric equivalent may look daunting, but it’s all just a consequence of the familiar ‘multiplying magnitudes and adding up angles’ characteristic of complex products.

Breaking down the equation

Equipped with a visual interpretation of complex multiplication, let’s now return to Euler’s formula. The right-hand side simply represents a point (\cos{x}, \sin{x}) on the unit circle of the complex plane. As a reminder, x is the counterclockwise distance walked along this unit circle, starting from 1.

Rendered by

On the other hand, the left-hand side is more intriguing: one wonders about the relevancy of e=2.71828..., an irrational number somewhere in-between two and three. And what does it even mean to raise that specific quantity to the power of an imaginary number ix? The key is to consider the following representation of Euler’s number:

    \[e = \lim_{n \to \infty} (1+\frac{1}{n})^n\]

Lots of interesting connections can be made with this identity, ranging from binomial distributions to compound interest. However, for our purposes we’ll just continue by raising both sides to the power ix and rewriting:

    \[e^{ix} = \lim_{n \to \infty} (1+\frac{ix}{n})^n\]

Now, we have written the left-hand side as an infinitely long compound multiplication of identical factors 1+ix/n. This latter element is an important one, so let’s see what it actually means before taking the limit. For n large enough, we then get the following approximation:

    \[e^{ix} \approx \underbrace{(1+\frac{ix}{n}) (1+\frac{ix}{n}) ... (1+\frac{ix}{n})}_\text{n factors}\]

Each factor is a number with a real part of one, and with an extremely small but non-zero imaginary part:

Rendered by

Note that the magnitude of this number is very close to one, and that its angle is nearly zero. It follows that in the compound multiplication, every factor gives rise to a small rotation, and a tiny increase in magnitude. To make things more concrete, let’s select x=2 and see what happens for different values of n. The following figures are approximations of e^{2i} for increasingly larger values of n. Naturally, a higher n makes for a more accurate result.

Rendered by

Rendered by

Rendered by

Keeping in mind that complex multiplication works by successively scaling and rotating as explained above, it appears that this sequence of infinitesimal rotations eventually converges to what we already know as e^{2i}: a journey along the unit circle by 2 radians. The end result also has a magnitude of exactly one. Crazy, isn’t it? The crucial insight here was to write e as the limit of an infinite product as described above, ignoring its decimal representation. (You could say that e^1 “just so happens” to be 2.71828....) I hope you have learnt something at this point!

Bringing magnitude into the story

The fact that |e^{ix}|=1 (for real x) is not magic, but easily follows by geometrical insight into the limit: the larger n, the more every factor contributes to a tiny rotation rather than the tiny increase in magnitude, the latter eventually becoming ever more negligible compared to the former. On the other hand, we reach many more values with the natural exponential function when any complex argument is allowed.

(1)   \begin{align*} e^{z} &= e^{\mathrm{Re}(z)} (\cos{\mathrm{Im}(z)}+i\sin{\mathrm{Im}(z)}) \\ &= \lim_{n \to \infty} (1+\frac{z}{n})^n \end{align*}

The whole reasoning presented earlier applies here as well: the individual factors 1 + z/n have a real part very close to one, and an imaginary part very close to zero. The same ‘triangle reasoning’ allows us to understand the limiting process. As an example, let’s plot the approximation for z=1-i and n=5:

Rendered by

A special case: Euler’s identity

Few equations contain so many fundamental mathematical constants yet are so short as the following:

    \[e^{i\pi} + 1 = 0\]

This is simply the result of substituting z=i\pi in the previous equation: more on that below.

Try it out yourself!

In Grapher Pro for Android, you can plot the following equation to view the ‘construction’ of e^{i\pi} with a number of iterations n:

z(t) = (1+ipi/n)^ceil(nt)

where t runs from 0 to 1. A slider will appear for n, whose range you can then set to, for example, 1 to 20 step 1. See the screenshot below for a preview.



P.S.: This article was partially inspired by 3Blue1Brown’s excellent video on Euler’s formula in the context of group theory. I highly recommend checking it out if you want to learn more.

Leave a Reply

Your email address will not be published. Required fields are marked *