A 20-minute intro to complex numbers
You might have heard of complex numbers before -- but what's the actual significance of i = √-1?
In a couple of earlier articles on this site, I brought up complex numbers. They are a fairly abstract construct that reeks of higher math, but is hard to avoid in the context of analog electronics, signal processing, computer graphics, and more.
If you’re a subscriber, you probably have at least an inkling of how complex numbers work; the mechanics are explained in many places on the internet and are probably required for CS and EE degrees. That said, accessible texts usually don’t explain why this particular construct is uniquely suited as a model of two-dimensional Cartesian geometry and other “orthogonal” quantities.
Let’s dive in, starting with the more interesting geometric view.
The cat coordinate system
The most basic (if somewhat flawed) way to introduce complex numbers is that they’re a trick to express two independent, real numbers as a single variable while keeping the two halves at an arm’s length. This is done by coupling one of the numbers to a magic-bean value of i:
We call the free term (x) the “real” part, and the i-coupled term (y) the “imaginary” part.
A more accessible way to put it would be to say that we invented a value of 🐱, with the rule that 🐱 is not a normal number. There are no obvious arithmetic rules that would allow you to combine the terms that contain a 🐱 with the ones that do not, but you’re free to work on each part separately.
Addition and subtraction can be pretty intuitively extended to cat-complex numbers by individually summing the cat-free and cat-bearing parts:
This aligns with intuition about the real world; for example, if the cat-free part represents horizontal distance and the cat part represents elevation gain, summing the corresponding cat-complex numbers for different segments of a mountain trail can give us the totals for the hike:
In a boring math paper, they would make you delete the cats and use i instead, but the semantics of addition and subtraction remain the same:
The rules for multiplication by real numbers follow from addition and are similarly obvious. You multiply the real and imaginary parts independently:
If we’re using complex numbers to represent (x, y) points on a Cartesian plane, then addition moves them by some specified distance, while multiplication by a positive value scales the geometry in relation to the center of the coordinate system.
Making the cat spin
We could stop there: a system that uses 🐱 or that defines i as an abstract symbol works just fine. That said, for geometry, it’s just not a big improvement over keeping track of x and y coordinates as separate entities and manipulating them individually. The cat symbol is cool, but it doesn’t offer any special insights into reality.
The core problem is that the cat-based model doesn’t encode any specific relationship between the two values. As far as it’s concerned, the cat domain and the non-cat domain are completely disjoint. They are two different number lines on two separate sheets of paper.
These are not the mechanics of the two-dimensional Cartesian coordinate system: the axes are orthogonal. They are mostly separate, but we expect there to be a rotation operator that transposes one axis onto another. Alas, in our 🐱-coupled system, rotation is not intrinsically defined.
OK, I lied: we have the notion of rotating a point by 180°. It’s equivalent to scalar multiplication by -1:
The operation flips the signs of both coordinates. For a pair of points on a plane, we’d get the following result:
Upon closer inspection, we can intuit that it’s not the magnitude of the scalar value (-1) that’s doing the hard work; if we switch to -2 or -0.5, the objects change scale, but they’re still rotated just 180°.
Instead, a full turn (360°) requires multiplying by -1 twice. Continuing down that path, multiplying by -1 three times in a row results in a 540° turn (180° · 3), and so on. In other words, the secret sauce appears to be the exponent of a constant -1 base:
So, what would it take to achieve rotation by 90°? Well, looking at the series above, the answer seems pretty clear, if weird. We need to choose an exponent of ½:
In the Cartesian view of complex numbers, if we take a real value and attach it to i, we’re essentially saying that it no longer represents a distance on the x axis, and instead represents the same distance on the y axis. That’s rotation by 90°. It follows that to automatically encode orthogonality between the two parts of a complex number, we ought to define i as (-1)½.
But what’s (-1)½?
If you had any prior exposure to complex numbers, you already know the “official” answer, but it can be useful to ponder how we arrive at that. Let’s start with the basic, middle-school definition of positive integer powers. It’s a convenient notation that replaces repeated multiplication:
We have no real-world intuition about what it means to raise n to anything other than a positive integer, but it suffices to make another obvious observation about the equivalence of na · nb and na + b:
This equality gives us a lead for n0:
The only possible multiplier for na that produces na is 1, so in an internally-consistent algebra system, that must be the value of n0. Roughly the same logic can be used to figure out the meaning of n-a:
The first half of the expression — na — expands to a product of a repetitions of n. The only way to get back to 1 is for n-a to be the reciprocal of na — that is, to expand to a repetitions of 1/n.
This brings us to simple fractions. Whatever the meaning of n½ might be, we want the following to hold:
Exponentiation has two inverse operations: roots (mapping result & exponent → base) and logarithms (mapping result & base → exponent). In this instance, since we’re looking for a value that gives us n when squared, we need the square root of n; in other words, n½ = √n.
Tying it all together
At this point, we can more conventionally describe the value we’ve been looking for: i = (-1)½ = √-1.
The value of i is not real (in the sense that it doesn’t have a place on the ℝ number line), so it obeys the design rule of the 🐱-based system: it keeps the orthogonal coordinates separate. The exception is that multiplication of a complex number by im results in a rotation of m · 90°. For example, for m = 1, we can see that the x and y coordinates change places:
We’ll get to the way to deal with fractional m values in a moment.
For the most part, rudimentary complex number algebra is straightforward, but there are some surprises. Division is the inverse of multiplication; if multiplying by i is equivalent to a rotation by 90°, then to get us back to the starting point, division by i must correspond to rotation by -90°. So far, it makes sense, but consider that in a Cartesian coordinate system, taking -1 on the real axis and rotating it by +90° (i.e., calculating -1·i) produces the same result as taking +1 and rotating it -90° (= 1/i). We arrive at a peculiar but unavoidable corollary: -i = 1/i.
To build a more general model of complex multiplication, we can note that any point on a two-dimensional plane that’s described by its (x, y) coordinates can be also unambiguously described by its distance from (0, 0) and an angle:
This representation is known as polar coordinates. The technique is fairly common in computer graphics and engineering; there are simple trigonometric conversions between the two. When applied to the complex plane, the trick allows us to imagine any complex number as a real value l on the x axis that’s rotated by some angle m · 90 — and we already have a formula for that:
This length is usually referred to as the modulus or the absolute value. The angle (again, m · 90°) is called the argument, apparently as a homage to an astronomical term that dates back to the 14th century.
This notation is surprisingly useful. For example, the polar form gives us a neat geometric interpretation of what it means to multiply two complex numbers represented using the polar formula:
In essence, the result is that the lengths are multiplied while the angles add.
Rotations in two dimensions can also be described with basic trigonometry. When working with separate x and y coordinates, we use the following formula to rotate a point on the x axis by some chosen angle α:
This gives us a yet another to represent complex numbers: as a scalar length l multiplied by a cosine of an angle α to construct the real part, and a sine to construct the imaginary part:
This might seem mundane, but combining the new formula with the earlier z = l · im representation, we can write the following identity:
If we substitute l = 1 and switch to radians, we get a equation that allows us to easily find im for fractional values of m using trigonometric functions:
Heck, move the scaling factor for m from right to the left and you end up with the following form:
This is within an earshot of the well-known Euler’s formula:
In that last equation, if we substitute m = π, we end up with eiπ + 1 = 0, which is deemed profound by many pop-science mystics and cranks.
In all fairness to mystics, getting to Euler’s formula is not that simple: I skipped a step, and to explain the sudden appearance of the mathematical constant e, we’d need more closely investigate the properties of logarithms. Perhaps that’s a topic for another time?
Postscript: the algebraic view
In most texts, complex numbers are introduced in a seemingly less purposeful way: not as a model of 2D geometry, but as a way to solve equations such as x² = -2. This seems somewhat fanciful: why is it important to have imagined “solutions” to such equations in the first place?
A good way to answer it is to start with the field (the “realm”) of natural numbers. Natural numbers are an intuitive formalization of rudimentary day-to-day math: one apple plus one apple equals two apples. That said, basic algebra on these numbers can produce solutions that lie outside the field: for example, the solution to x + 2 = 1 is not a natural number. Because of this, we say that this field is not algebraically closed.
To fix the issue with subtraction, we can obviously extend the field by adding negative integers. We’re all used to the concept, but imagine defining it for a caveman mathematician! You’d probably say that we envisioned a make-believe realm of numbers that are just like naturals, except they’re coupled to a magic symbol to represent some multiple of the “negative unit” (-1). Oh and we came up with new rules for combining negative and positive values. Wait, doesn’t that sounds awfully close to the way we explain i?…
In any case: the introduction of negative numbers solves subtraction, but still allows the field to be escaped via division (the solution to 2·x = 1 is not an integer). To close that particular gap, we need to allow rational numbers. Yet, rationals are also not enough: the solution to x² = 2 is not a finite fraction. So, we move on to reals… but what about x² = -2?
We can fix that glitch by allowing the imaginary unit (√-1) — and crucially, this is where it all ends. The addition of this element closes off all escape routes and gives us an algebraically-closed field. The only remaining gaps are singularities such as 0/0 (aka, 0·x = 0), which can’t have a well-defined solution under conventional algebra rules.
Just as importantly, the addition of imaginary numbers doesn’t break algebra: all the standard rules extend seamlessly to this realm. The only property we lose is strict ordering: for any one-dimensional sorting algorithm we invent, different complex numbers will sometimes need to have the same rank.
So, complex numbers are not just a one-off hack, but the final stepping stone in the construction of an escape-proof algebra system that naturally follows from standard mathematical axioms that have roots in observations about the real world. And yes: this means that standard algebra, taken to its logical conclusion, is a two-dimensional geometry.
👉 For a followup article about extending complex numbers to 3D, see here.
I write well-researched, original articles about geek culture, electronic circuit design, and more. If you like the content, please subscribe. It’s increasingly difficult to stay in touch with readers via social media; my typical post on X is shown to less than 5% of my followers and gets a ~0.2% clickthrough rate.
I understand Gauss wanted to call the "imaginary" axis the "lateral" axis, which would have been a lot less confusing for math students. There is also the nice fact that understanding multiplication as rotation explains something else that students can find confusing: It makes sense that multiplying positive (real) numbers results in a positive real number, and it sort of makes sense that multiplying a positive real number times a negative real number gives a negative number, but much harder to understand why multiplying two negative numbers results in a positive number. But it's just a matter of 180° rotations.
If you want a more visual explanation of Euler’s formula, I wrote one a long while back:
https://docs.google.com/presentation/d/1oMNjkDp-LieSGnZEwNpceG8KTIvbnus9olu3KqnM5bg/