Euler's Formula 1 - Perpendicular Accountancy

Euler's Formula (1 of 2)

I originally learned Euler’s formula as a result to be relied upon, casually stated in the middle of some dry lesson about complex numbers. It seemed like witchcraft, connecting so many unexpected things:

e^{i\theta} = \cos \theta + i\sin \theta

Once we know that \cos and \sin are functions giving the coordinates of a point on the unit circle, and if we are willing to swallow the idea that a unit complex number can be written in radial form as a complex power of e, then we can happily draw this diagram:

TikZ diagram

Euler’s formula is telling us how to convert between the radial and cartesian forms of the same number. But that complex power is the sticking point. There’s nothing obvious about it.

Raising things to exotic powers is always confusing, at least to me. I am only an enthusiast whose interest in such things has steadily grown over the last few years, and I always want to find an intuitive route to understanding anything, an explanation so simple, even I can grasp it.

It is extremely easy to see why when we multiply two powers of the same base, it’s the same as adding the powers:

x^4 = x \cdot x \cdot x \cdot x \quad \quad x^3 = x \cdot x \cdot x \quad \quad x^4 \cdot x^3 = (x \cdot x \cdot x \cdot x) \cdot (x \cdot x \cdot x) = x^7

And so this rule x^a x^b = x^{a+b} leads naturally to the idea of a fractional power, because if:

x^{\frac{1}{2}}x^{\frac{1}{2}} = x^1 = x

then inevitably:

x^{\frac{1}{2}} = \sqrt{x}

Likewise from:

x^7 x^{-3} = x^4

we are forced to conclude that a negative power is just the reciprocal of a positive power:

x^{-a} = \frac{1}{x^a}

This I can accept. But a complex power is baffling. The “product means add” rule is no help:

x^i x^i = x^{2i}

On the other hand, using i as the base and raising it to a power, that is fine. I get how i acts as a 90^\circ rotation operator. If you perform such a rotation twice, you clearly caused a 180^\circ rotation. By repeatedly multiplying by i we cycle through i, -1, -i, 1, i \dots and so on. If you want a 45^\circ rotation, that must be something that produces a 90^\circ rotation if performed twice:

i^{\frac{1}{2}}i^{\frac{1}{2}} = i

which is entirely consistent with the preceding square root observation. So with the base being i and a power of 1 meaning 90^\circ or \frac{\pi}{2} radians, the unit complex number with angle \theta can be written:

i^{2\theta/\pi}

Therefore Euler’s formula could be written as:

i^{2\theta/\pi} = \cos \theta + i\sin \theta

and my personal intuitive ELI5 needs would be satisfied. It’s the switch from i being in the base to i being in the power that I can’t seem to bridge. In the already dawned AI era that cannot apparently be stopped I see no reason to give up my insistence on the feeling that I understand. What else do I have?

The first place I want to look is somewhere that I’ve previously ignored because it always seemed so boring. It’s the compound interest formula:

e^x = \lim_{n \to \infty} \left( 1 + \frac{x}{n} \right)^n

Woo, accounting, let’s go. What is this saying? n is an integer here, and the higher you let it go, the more times you are multiplying together a huge number of identical factors. So if n is 5, we’re saying this is a crummy estimate of a certain function of x:

\left( 1 + \frac{x}{5} \right) \left( 1 + \frac{x}{5} \right) \left( 1 + \frac{x}{5} \right) \left( 1 + \frac{x}{5} \right) \left( 1 + \frac{x}{5} \right)

and it wouldn’t be quite so crummy if we could be bothered to multiply out a million such factors in which the 5 is replaced with 1,000,000. So what’s so important about this function?

If someone tells you that you’re going to earn interest on your pile of money, it makes a difference how often you get paid a chunk of interest, because each time that happens, that chunk gets added to the pile so it starts earning interest too. Yes, you know already, someone whose mortgage payments in 1957 were cheaper than a cup of coffee in 2026 told you about the importance of wise investments instead of wasting your money on fancy types of coffee.

So if you invest your money (a single dollar, pound, euro, your choice) for one year, and there’s a single payment at the end of 100% interest (x = 1, n = 1) then you will have:

1 + \frac{x}{n} = 1 + \frac{1}{1} = 2

You doubled your money. Not bad. But what if you got two payouts, one at the halfway mark and one at the end of the year? For the last 6 months you’re earning interest on the 1.5 you have due to the halfway payment:

\left( 1 + \frac{1}{2} \right) \left( 1 + \frac{1}{2} \right) = 2.25

The two factors are the two 6-month periods. The first one grows what you started with by half a year’s interest. Then the second one takes that grown pile and applies the same growth to it. If you take the interest monthly, n=12, you’ll end up with 2.61. If you take it once per second (31,536,000 instalments) you’ll end up with 2.71828178. As we chop up the year into finer time slices we tend toward this magic number that we call e (we already have it correct to 7 significant figures by this point.)

Why shouldn’t we make the x we pass into this formula be ix? Banks don’t generally offer this facility, but how would it work?

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

We now have something we can actually crunch the numbers on. Again, let’s set x = 1, n=1:

1 + \frac{ix}{n} = 1 + i

This is a 45^\circ arrow in the complex plane, of length \sqrt{2}. Our original investment of 1 has “grown” by i, which is to say, perpendicularly. All the growth is imaginary (which I assume would be financially bad, but then I’m not an accountant.)

For large n, multiplying many terms, it works like a lot of tiny rotations, by an angle \approx 1/n, and by doing that n times over, the cumulative rotation is approximately 1 radian, and in fact as n \to \infty it tends toward exactly 1 radian (and it’s 1 because we set x = 1.) It also tends toward being exactly a unit vector.

All this came from Jacob Bernoulli’s interest (!) in compound interest, and he actually did this properly using the binomial (“two numbers”) expansion, known to Persian mathematicians since the 11th century, which is the pattern you get from multiplying out a sum raised to some power:

(x + y)^n = \sum_{k=0}^n \binom{n}{k} x^{n-k} y^k

Take a moment to convince yourself of that formula. First, when you multiply out (x + y)^2:

(x + y)(x + y) = x^2 + 2xy + y^2

you get one x^2 term, one y^2, and two xy terms that you can gather together into a single term 2xy. For longer lists of factors, every output term is the result of going through the list of identical factors and choosing either x or y. How many ways are there to choose x from every factor? There’s only one way to do that. So there will only be a single x^n, same for y^n. However, to get xy we can switch to y in either of the two factors. That is, there are two ways to choose one factor to provide y from a list of two factors. How many ways are there to choose k items from a set of n (pronounced “n choose k”)? This is even older Indian mathematics (3rd century BCE):

\binom{n}{k} = \frac{n!}{k!(n-k)!}

Again, convince yourself this is true (so many layers to this onion.) Step one, you have a box of n chocolates and you eat one of them. Then you eat another, and so on until you eat the whole box. How many ways could you have done that? (A question I’ve often asked myself.)

n (n - 1) (n - 2) \dots 3 \cdot 2 \cdot 1=n!

Suppose you are more restrained and only eat k of the n. It’s like you do the start of this sequence but you don’t see it through; no stamina. Oh well, we can cut the end off by dividing by (n-k)!. There’s one more thing we need to consider: we’ve counted the ways you could eat k chocolates from a box of n, but we’ve treated the different orders in which you ate them as significant. If we don’t care about the ordering, we need to divide by the number of ways of ordering k items, which is actually what we worked out for n when we considered eating the whole box in the first place, so we need to divide by k! as well. So that’s the whole formula for the binomial coefficients.

So we can multiply out our compound interest formula:

\begin{eqnarray*} e^x = \left( 1 + \frac{x}{n} \right)^n &=& 1 + n \left( \frac{x}{n} \right) + \frac{n(n-1)}{2!} \left( \frac{x}{n} \right)^2 + \frac{n(n-1)(n-2)}{3!} \left( \frac{x}{n} \right)^3 + \

As n \to \infty all the fractions with n on the bottom disappear, leaving us with:

e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \frac{x^5}{5!} + \dots

Into this we can immediately substitute i\theta for x:

e^{i\theta} = 1 + i\theta - \frac{\theta^2}{2!} - i\frac{\theta^3}{3!} + \frac{\theta^4}{4!} + i\frac{\theta^5}{5!} + \dots

The increasing powers cause the terms to cycle through positive real, positive imaginary, negative real, negative imaginary, and so on. We can gather the real and imaginary terms:

e^{i\theta} = \left( 1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} + \dots \right) + i \left(\theta - \frac{\theta^3}{3!} + \frac{\theta^5}{5!} + \dots \right)

That’s quite a provocative discovery is it not? Tune in for part two.




    Not yet regretting the time you've spent here?

    Keep reading:

  • Euler's Formula 2 - Going in Circles
  • Quantumania 25 - Irritating Conveyor Belts
  • Quantumania 24 - Learn from the Flerfers
  • Quantumania 23 - Turn! Turn! Turn!
  • Quantumania 22 - Three Dimensions