I’ve recently been looking into a fascinating corner of mathematics that at first glance appears a little bit silly, but actually has far-reaching applications, from physics to numerical methods to machine learning. I thought I’d share what I’ve learned over the next few episodes.
I assume you recall what a complex number is, but perhaps not all of the details. A complex number is usually introduced as a pair of real numbers
(a, b), where
a is called the “real part” and
b is called the “imaginary part”.
A brief aside: it has always bugged me that these labels are unnecessarily value-laden. There is no particular “reality” that is associated with the real part; it is every bit as “imaginary” as the imaginary part. They might as well be called the “rezrov part” and the “gnusto part”, but we’re stuck with “real” and “imaginary”. Moving on.
It would be perfectly sensible to notate these as a pair
(a, b) — and indeed, when we characterize complex numbers as points on the complex plane, we often do. But it is also convenient to notate complex numbers in an algebraic form
a+bi, where the
i indicates the imaginary part.
Finally, we have well-known rules for adding and multiplying complex numbers. The fundamental rule is that
(0+1i)2 is equal to
-1+0i, and the rest of the rules follow from there. For complex numbers:
(a+bi) + (c+di) = (a+c) + (b+d)i (a+bi)(c+di) = (ac-bd) + (ad+bc)i
Division is a little bit tricky and I won’t write it all out here; look it up if you do not remember. We can similarly go on to derive rules for complex exponentiation, trigonometry, and so on.
Let’s switch gears slightly. It is very common in mathematics, and especially calculus, to reason about a quantity “plus a little bit”. That is, any old quantity, plus some positive amount that is not zero, but is much smaller than one, and really, really small compared to the original quantity. What “really, really small” means is of course dependent on context; maybe one-millionth of the original quantity is small. Maybe one-millionth is still pretty big, but one-trillionth, or one part in a googolplex, or whatever, is “really small” in our context. I’m being deliberately vague and hand-wavy here; just run with it.
Let’s call our really small positive quantity
ε, which is the lower-case Greek letter epsilon; it is traditionally used in calculus to represent a very small quantity. Let’s suppose our value is
a, and we have a very small amount added to it, so that would be
a+ε. Hmm. What if we doubled that quantity? Plainly that would be
2a+2ε. So scalar multiplication works as you’d expect. It seems reasonable that if we can have
2ε then we can have
3ε or for that matter
bε for any real value of
b. So once again we have an
(a, b) pair of numbers representing a quantity, which we notate as
a+bε. What are the algebraic rules of this thing? It certainly makes sense that addition should work as we expect, the same as complex addition:
(a+bε) + (c+dε) = (a+c) + (b+d)ε
This should match our intuitions. The sum of “
a plus a bit” and “
c plus a bit” should be “
a + c plus a bit” if there is justice in the world. What about multiplication? Let’s just multiply it out using ordinary algebra:
(a+bε)(c+dε) = ac + (ad+bc)ε + bdε2
We seem to have introduced an
ε2 term there. What are we going to do with that? Remember,
ε is not zero but is very, very small indeed, so that thing squared must be super tiny. So tiny that we can just ignore it entirely! (Remember, I am hand-waving egregiously here.) Let’s just say that
ε2 is by definition zero, just as we said that
i2 is by definition -1, and see what happens. So we have:
(a+bε)(c+dε) = ac + (ad+bc)ε
Again, this should match our intuitions. The product of something a bit bigger than
a with something a bit bigger than
c should be a bit bigger than the product of
What about division? Division by zero is illegal, and division by zero plus a tiny amount I think should also be illegal. Seems reasonable. What then is
c is not zero? Well, if it is not zero then we can multiply top and bottom by
a+bε (c-dε)(a+bε) ac + (bc-da)ε a bc-da ———— = ——————————— = —————————————— = - + ————— ε c+dε (c-dε)(c+dε) c2 c c2
Once again our intuition is satisfied: the quotient of “something close to
a” divided by “something close to
c” is close to the quotient of
This is a pretty neat number system; it is called the dual number system and it was introduced to the world in 1873 by the English mathematician William Clifford. But so far it might look like it is just a curiosity; however, it is extremely useful.
Next time on FAIC: we will implement the dual number system in C#, and discover a surprising property.