I’ve been interested in complex numbers lately1, but something bothered me about complex multiplication: why is multiplying two numbers the same as adding their angles and multiplying their lengths? Luckily, I’m starting to figure out that analogies are what make math beautiful, and that doing good math often feels like playing around.

So, what analogies can we use? First, complex numbers can be vectors on a plane. Second, doing arithmetic (multiplying, adding, etc.) can be a geometric transformation.

So instead of asking, “what does \((a+bi)(c+di)\) mean?” We can ask “what geometric transformation is the same as multiplying by \((c+di)\)?”

To start, we can apply the distributive rule:

\[(a+bi)(c+di) = \textcolor{green}{(a+bi)c} + \textcolor{blue}{(a+bi)di}\]

So now, instead of one transformation, we have three simpler transformations:

1. Scale your original complex number by c.

2. Scale your original complex number by d, then rotate it by 90 degrees.
(Multiplying by i is the same as rotating by 90).

3. Add those together.

When you add two vectors together, it’s the same as putting the tail of one at the end of the other, and then drawing a vector to the result. If we plot some examples, we can see the geometry of these transformations2: (it should move if you mouse over it)

This trick is what 3blue1brown uses in all his videos: create visual / geometric analogues for abstract concepts to gain an intuitive and deeper understanding that connects with existing experience. This is just one type of useful analogy, but it’s super useful, so I want to keep practicing it.

Anyway, we’re interested in the black transformed vector: \((a+bi)(c+di)\).

What is the angle \(\color{purple}\theta\) between our original number and the transformed one? From the geometry, we can see \(\color{purple}\theta\) is 90 degrees minus the angle formed by the right triangle. Luckily, we know the length of the sides of that triangle is the same as our original complex number, scaled by some scalars c and d:

\[\textcolor{purple}{\theta} = 90 - \arctan(\frac{\textcolor{green}{c \|a+bi\|}}{\textcolor{blue}{d \|a+bi\|}}) = 90 - \arctan(\textcolor{green}{c}/\textcolor{blue}{d}) = \arctan(\textcolor{blue}{d} /\textcolor{green}{c})\]

Where \(\color{red}\|a+bi\|\) just means the length of \(\color{red}(a+bi)\). Notice that \(\arctan(\textcolor{blue}{d} /\textcolor{green}{c})\) is the same as the angle of our multiplier, \((c+di)\). So multiplying by \((c+di)\) effectively rotates a complex number by the angle of \((c+di)\)!

If you play with the sketch above, you can see that when \(d=0\), there’s no rotation, when \(c=0\), there’s a 90 degree rotation, and when \(c=d\), the rotation is exactly 45 degrees.

What about the length? Again, we can use the sides of our right triangle:

\[\|(a+bi)(c+di)\| = \sqrt{\textcolor{green}{(c\|a+bi\|)^2} + \textcolor{blue}{(d\|a+bi\|)^2}} \\ = \sqrt{(c^2+d^2)\|a+bi\|^2} \\ = \sqrt{\|c+di\|^2\|a+bi\|^2} \\ = \|c+di\|\|a+bi\|\]

So multiplying by \((c+di)\) scales a number by the length of \((c+di)\).

Now, we could have always figured this stuff out by applying definitions and doing a bunch of algebra. But thinking about the geometry just makes it feel… obvious. Note that we ignored some very important cases (what about negative numbers?), but we can figure that out later.

What’s nice about having the intution is that extensions come just as naturally. For example: finding the multiplicative inverse of a complex number. In other words, what number undoes the transformation of multiplying by \((c+di)\)? Obviously it would need to rotate by the opposite angle, and then scale by the inverse scale. More here.

So yeah, complex numbers are cool. Not sure why I never used them before, but it seems like they would be cool to use in machine learning. What’s even cooler is that all of this complex business naturally derives from a simple question: “how can we solve a polynomial with no real solutions?” When you answer it, you get all this crazy geometry that’s closely related to oscillations and trigonometry. Wild.

- Mitchell

  1. If you’re also interested, I highly recommend checking out BetterExplained’s visual intuitive guide to complex numbers. If you’re really interested, check out the whole series! They go over the details of complex arithmetic, as well as euler’s formula and the Fourier Transform. Finally, you can check out 3blue1brown’s video on euler’s formula with introductory group theory and the Fourier Transform for some of that and more (god I love Grant). 

  2. Multiplication is associative, so the picture we drew could also (c+di) as the original number and (a+bi) as the transformation. That would create a symmetric picture around our black product vector. Neat.