"Whenever you can, share. You never know who all will be able to see far away standing upon your shoulders!"
I write mainly on topics related to science and technology.
Sometimes, I create tools and animation.
Euler's formula is considered by many as the most beautiful equation in mathematics.
One of the reasons for that is the way it marries an imaginary number to two transcendental numbers in such a manner that you get an integer in the end! And it probably can't get any simpler...
\[e^{i\pi} = -1\]
For a long long time this equation was just another equation for me - something to keep in the back of the mind, but without any valuable geometric interpretation - until recently, when I found out its exceedingly beautiful geometric representation, and in the process, gained an insight to look at all the numbers - all of them - in a different way than I ever did.
If enlightenment came in pieces, I bet the realization which I had and which I'm going to present below, would be one of those!
Let's start with revisiting two very basic concepts in mathematics - multiplication and exponentiation.
Think of multiplication as expansion - an instant expansion. For example, say, I have number 2, and I expand it 4 times. Boom! The next moment I have 8. And since even 2 is basically 1 x 2, we can think of every number is "1 expanded to that number".
\[n = 1 \times n ~\text{(n is 1 instantly expanded n times)}\]
Now, exponentiation. But before that I want you to think about another concept - simple interest (SI) and compound interest (CI). Why these? Bear with me - when the dots are connected, you'll be amazed.
Let's say P is the principal, r is the rate (per cent rate divided by 100) per year and A is the total amount at the end of the given period of time, and let's take the time period as 1 unit, say 1 year.
The formula for SI then will be:
\[A_{SI} = P + Pr = P (1 + r)\]
In this formula, the principal is always kept separate from the interest which just gets added to the principal at the end of the term.
If we, instead, decide to add interest to the principal some time before the end of the term and then, from that point onward, start calculating interest on that enhanced principal for the rest of the term, we say that now we are compounding the interest.
One needs to be careful about the modified r in this case - if the term is subdivided, say n times for compounding the interest, we'll have to divide r by n accordingly in order to apply this new r to each of those sub-terms. After all, the given r was for a given period of time, if we are stopping, say, mid term and calculating interest till then, we ought to divide r by 2 in this case. And so on for having more sub-terms.
For example, if we compound the interest semi-annually, we get:
\[\begin{align} A_{CI} = &~P + P\frac{r}{2} + \left(P + P\frac{r}{2}\right)\frac{r}{2}\\
=&~P \left[ \left(1 + \frac{r}{2}\right) + \left(1 + \frac{r}{2}\right) \frac{r}{2} \right]\\
=&~P \left(1 + \frac{r}{2}\right)^2\ \end{align}\]
This can be generalized. So, for interest compounded n times in the given (unit) term, we get the following (we'll simply use $A$ for $A_{CI}$ henceforth):
\[\begin{align} A = P \left(1+\frac{r}{n}\right)^n \end{align}\]
Fasten your seat belts, the first magic is going to show up soon!
What if we say that we want to compound interest not n times, not 2n times, but every moment! Yes, every moment. This means that we are taking n towards infinity. Sounds lucrative, right? We should have a very large, if not infinite, amount in the end. It turns out that it does not make that much of a difference - for the simple reason that as n grows indefinitely, r needs to shrink correspondingly. We get:
\[A = P\lim_{n\to\infty} \left( 1 + \frac{r}{n} \right)^n \]
Let's take 1 for principal, so that we have:
\[A = \lim_{n\to\infty} \left( 1 + \frac{r}{n} \right)^n \]
For a moment, have \(r = 1\), we have now:
\[A = \lim_{n\to\infty} \left( 1 + \frac{1}{n} \right)^n \]
Sounds familiar? Yes, it is nothing else but our beloved friend \(e\) !
So, it turns out that \(\mathbf{e}\) is "number 1 grown at 100% rate for 1 unit of time, with compounding done every moment!" That is, we had 1 and we let it grow exponentially (another way of saying 'with an interest rate compounded every moment') at 100% rate for one unit of time, and we get \(\mathbf{e}\)!
Compare its value 2.72 with 2 which is what we would have got if we had 1 grown at the same rate but not exponentially (i.e. interest added only at the end of the term). 2.72 is not even double of 2. But it's non-trivially more than 2, nevertheless.
Henceforth, for simplicity we'll just use the word 'grow' to mean 'grow exponentially' (i.e. with the growth rate compounded every moment).
Now, let's get back to the general \( \lim_{n\to\infty} \left( 1 + \frac{r}{n} \right)^n \) for any \(r\). This is simply \( e^r \). So, we can say that any number represented by \( e^r \) is nothing else but "1 grown at rate r for one unit of time". Finally, since every number n (consider only positive numbers for now) can be written as \( e^{\ln n} \) - that's the definition of \( \ln \) - , it turns out that, any number n is nothing but 1 grown at the rate \( \ln n \) for one unit of time.
Remember multiplication explained above? Now we have two representations of any number:
So, we have got \( e \) into our analysis. Now we'll go after \( i \). Before that, I want you to forget whatever you have known about \( i \) - that it is the square root of -1 or \( i^3 = -i \) etc.
We've seen how every number can be seen as either as an instant expansion of 1 (aka result of multiplication) or a continuous but quick exponential growth of 1 - see the figure to the right. Both of these operate on the number 1 and scale it linearly (i.e. along the real number line).
Let's focus on multiplication. Generally we understand multiplication as nothing else but repetitive addition. But just now, we've visualized it slightly differently - as instant expansion - that scales 1 along the number line.
Now, every number that exists in the real world lies on the one dimensional number line - be it rational, algebraic or transcendental. What if, just for the sake of curiosity , we want to include a line perpendicular to the number line in our mathematical analysis. We can draw such a line passing through the point 0 of the number line and have numbers on that line just like we have them on the number line.
But, even if we draw such a line, currently the numbers on these two lines have no way of interacting with each other. Earlier we saw how multiplication (and exponentiation) operate on numbers on the real number line and spit out other numbers that are still on the same number line. Same is true for any other type of mathematical operation known to us. Hence, these two lines are their own independent worlds (except that they have common point - 0). Let's call the line perpendicular to our real number line the imaginary number line, and numbers on this line, the imaginary numbers (just to acknowledge that these are different from the real number line and real numbers).
So, if we want any mathematical operation to work between the numbers on these two lines, we'll have to bring in something out of the blue. In order for the numbers on these two lines to be able to interact with each other, let's define a symbol called - \( i \), which has only one definition - in terms of its multiplication with other numbers:
\( \text{any real number} \times i \implies \) instant disappearance of that number from the real number line and its appearance on the imaginary number line such that its distance from the origin remains same on the imaginary number line as it was on the real number line. That is to say:
\( \text{any real number} \times i \implies \) instant 90° transformation (the word rotation kind of suggests a continuous process, hence let's use the word transformation).
This automatically implies that, \( i \), simply written like that is = \(1 \times i \), i.e. \( i \) is number 1 on the imaginary line.
Let's extend this definition of multiplication by \( i \) to include imaginary numbers as well.
Also, for the other way round - i.e. for multiplication of an imaginary number (including \(i\)) by a real number, let's continue with our normal understanding of multiplication - let it mean to scale (instantly expand) the imaginary number by a factor given by the real number.
So, we have the following:
So, let's start with just this ad hoc definition of \(i\) and see how things unfold. Few things become clear right away. For example \( i^2 = -1 \) is clearly evident (double 90° transformation), as is \( i^3 = -i \) (90° transformation three times)!
Now comes another beautiful stage in the idea we are building up. We saw how \( e^x \) means 1 growing at the rate \( x \) for 1 unit of time. What if we have \( bi \) for \( x \)? Before pondering on that, let's rethink what growth or exponential expansion actually is. It is nothing else but basically multiplication operating at the minutest level! \( \lim_{n\to\infty} \left( 1 + \frac{r}{n} \right)^n \) is just \( (1 + \frac{r}{n} ) \) being multiplied to itself so many times, that's it. Or, in other words, a number slightly larger than 1 being multiplied to itself lot many times.
So, in order to understand \( e^{bi} \), we need not bring in any other definition or concept, we can go about visualizing it just using the concept of multiplication - which we already understand for both real and imaginary numbers - multiplication of any number by any real number expands it instantaneously by a factor equal to the real number, and multiplication of any number by \( i \) rotates the number instantly by 90°. That said, exactly how can we visualize an imaginary rate of increase? We need to take a step back and have a look at simple interest once again.
\[A_{SI} = P (1 + r) = P + Pr\]
If we have \( bi \) for the interest rate, we get:
\[A_{SI} = P (1 + bi) = P + Pbi\]
By the definition of \( i \) we know \(Pbi\) will be perpendicular to \(P\) (in other words, \(P\) and \(Pbi\) will have no common component), so we cannot simply add these two. We can take help of vector addition, and if we do that we'll see that \((P + Pbi)\) will look like rotated (and stretched) \(P\), e.g. in the case of \( b=1 \), by 45° (as shown in the figure to the right).
And, if we define the magnitude (or amount, in terms of money) of any such number like \(P + Pbi\) as the square root of sum of their individual components squared, we'll see that the amount \(A\) is greater than the original \(P\). If we were to apply SI further, henceforth \(\Delta P\) would be \( Abi \), hence perpendicular to the current \(A\).
The last trick remaining is to understand compound interest CI (for an imaginary interest rate) starting with what we just understood for SI.
If we keep on compounding the interest at shorter and shorter intervals, we see that \( \Delta P \left(= \frac{Abi}{n}\right) \) keeps on getting smaller, but we apply it all the more often. Thus, after every minuscule interval of time, a \(\Delta P\) is added to \(A\), and this \(\Delta P\) is always perpendicular to \(A\) at that moment of time. In effect, we see that \(A\) starts tracing a circle of radius \(P\)! (I know it needs some more elaboration as to why the trajectory of \(A\) will exactly be a circle, but let's do that some other time please.)
Lastly, have 1 for P, and we see that \(e^{bi} \) is simply the number 1 rotated by b radians (in one unit of time).
An important thing to note is that how we got the rotation amount, i.e. the angle to be \( b \) radians. Let's start with \( b=1 \). The key is to understand that this rotation is not exponential in the sense that the current angle of \( A \) with real number line, say \( \theta \), does not contribute in \( \Delta \theta \) - whatever be the current value of \( \theta \), \( \Delta \theta \) will be unchanged - given by adding the two perpendicular entities \( \Delta A \) and \( A \) (which themselves are constant in their magnitudes). This is not the case with exponential growth in the same direction (i.e. on number line), as in that case, the current value of \( A \) does contribute to \( \Delta P \). This is the reason why, with a growth rate of 1, the value of \( e \) is 2.72 and not 2, i.e. the total \( \Delta P \) is not 1 but 1.72 in one unit of time. However, in the case of \( e^i \), because of this compounding not happening, in one unit of time, the total rotation \((\text{total } \Delta \theta)\) we get is just equal to the rate (the magnitude of i), which happens to be 1.
For a rotation rate other than 1, say, \( b \), the amount of rotation would have been \( b \) in one unit of time. That is to say, \( e^{bi} \) would be 1 rotated by \( b \) radians.
Further, since every real number raised to an imaginary number, say \( a^{bi} \) can be written in the form \( (e^{\ln{a}})^{bi} = e^{ib\ln{a}} \), it means that all such numbers, e.g. \( 5^{6i} \) are points on unit circle (i.e. have magnitude 1) making an angle of \( b\ln{a} \) with the real number line.
But wait! We know that imaginary numbers are real numbers multiplied by \( i \) which is equivalent to transforming (instantly rotating) them by 90°. Now we are talking about angles not restricted to 90°. That is, we had a real number 1, we rotated it to an angle that is not necessarily 90°. What do we have now? What we have is neither a real nor an imaginary but what is called a complex number. More on this a little while later.
Moving on, having \( \pi \over 2 \) for \( b \) in \( e^{bi} \) means the rate of rotation is \( \pi \over 2 \), and this in turn means that we have rotated by \( \pi \over 2 \) (in one unit of time) which means \( e^{\pi \over 2} = i \)! And guess what, substituting \( x \) with \( i\pi \), we get:
\[e^{i\pi} = -1\] In essence, this is a specific instance of the general case in which \(\mathit{ e }\) raised to any imaginary number \(\mathit{ ib }\) (i.e. \(\mathit{ e }\) growing at an imaginary rate) is a point on the unit circle centered at origin O such that the line joining the point to O makes an angle of 'b' radians with the real number line.
So, next time you imagine about growing (say knowledge-wise or health-wise, or money-wise), beware - you are just gradually rotating from the real world into the imaginary world! Makes sense, right? Imaginary growth is no growth - it's rotation 😊!
But there can be a real component in growth! This exposes us to numbers of the form \( e^{a + bi} = e^a \times e^{bi} \) or \( e^{bi} \times e^a\). These are just the products of a real number \( e^a \) and another number \( e^{ib} \) of unit magnitude. Thus we can see \( e^{a + bi}\) as number \( e^{ib} \) instantly expanded by a factor of \( e^a \) (keeping its angle with the real number line preserved), or, as it turns out, as number 1 first expanded to \( e^a \) and then rotated by b radians. Here, \( a \) and \( b \) are called the polar coordinates of the point (explained later).
So, we can look at real, imaginary and complex numbers in the following different ways.
Now that we know how to visualize real and imaginary numbers independently, let's bring in complex numbers. A complex number is nothing but a combination of two numbers one of which is real, say, \( n \) and the other imaginary, say, \( mi \). We write this combination as \( n + mi \), with \( + \) having no meaning at all (so far), except to signify that we want to look at these two number \( n \) and \( mi \) as... one (special) number!
But now, immediately we are faced with two questions. Does a complex number have a magnitude and an angle, apart from the magnitudes and angles of their individual components (magnitudes being n and m, and angles being 0 and 90° for \( n + mi \))? The answer is... no, unless we choose to define these! And we do!
We have two perpendicular lines with us - the real and the imaginary number lines. Why not use them to create a 2-D plane? Because if we do that, we immediately discover a way of visualizing the (just defined) complex number as a single, standalone entity. How? It's simple. Assume this newly constructed plane to be an \( xy \) plane and just plot the the point \( n + mi \) on this plane assuming \( x=n \) and \( y=m \). That is the visual representation of \( n + mi \).
Now, if we join origin to this point, we get a line. We define the magnitude of our complex number as the length of this line, and the angle of the complex number as the angle this line makes with the real number line... \(\enclose{roundedbox}{2}\). And now, the '\( +\)' in \( (n + mi) \) can be seen to have a kind of special meaning - like vector addition - for the individual components \( n \) and \( m \) of the complex number.
A quick question at this point - suppose we have a real (or imaginary) number and we don't know what it is, but we know its magnitude. The question is - do we know the number? Eh! What kind of question is this? Of course, yes, isn't it?
Both real and imaginary numbers are solely defined by their magnitudes. That is because just by knowing that they are either real or imaginary we at once know that the angle they are making with the real number line is either 0 or 90 degrees. So, if we know their magnitudes, we can plot them on the \( xy \) plane.
But that is no longer the case with a complex number which can make any angle with the the real number line. Hence, if we don't know a complex number in the form \( n + mi \), knowing just its magnitude is simply not enough for knowing it completely. We do need to know its angle as well. And knowing its angle along with its magnitude reveals everything about it! This is because of the rules of Cartesian coordinates - any point \( (x,y) \) on a 2-D plane can be completely described by its magnitude and angle. And we call the magnitude and angle together as the polar coordinates of the point. We do the same for complex numbers as well.
Keeping the polar-coordinates-picture of complex numbers described above in mind, if we know the magnitude, say, \(g\) (=\(e^a \)), and angle, say, \( b \), of a complex number, we can think of it as a real number of magnitude \(g\) getting rotated by an angle \( b \). Or, 1 rotated by angle \( b \) and then expanded by a factor given by the magnitude. But, as per the expansion-rotation-visualization of \(e^x\) described above as per \(\enclose{roundedbox}{1}\), this is the same as expressing the number as \( e^a \times e^{bi}\) or \( e^{bi} \times e^a\), which, in turn, is simply, \( e^{a+bi} \) (where a is the growth rate, which means that for magnitude g, a = \(\ln{g}\))!
So, if we express a complex number in the form \( e^{a+bi} \), we are simply expressing it in polar coordinates \(a\) and \(b\). We use the definitions of magnitude and angle of a complex number mentioned above as per \(\enclose{roundedbox}{2}\) for summarizing as follows.
It's amazing to see how this understanding can help us peep into very perplexing ideas, e.g. \( i^i\). Whoa! What on earth can this be? With our new understanding it's easy to decipher.
\[\begin{align}
i^i = &~\left({e^{i{\pi \over 2}}}\right)^i\\
= &~e^{{i{\pi \over 2}}.i}\\
= &~e^{-\pi \over 2}\\\\
\therefore i^i \approx &~ 0.2\text{ !}
\end{align}\]
Other such examples are:
Basically, looking at each complex number as number 1 grown and rotated is equivalent to writing it in the form \(e^{a + bi}\) or \(e^a.e^{bi}\), with growth and rotation rates given by \(a\) and \(b\) respectively. And once we do that, it equips us with a powerful tool for understanding many expressions and operations on complex numbers (including real and imaginary numbers) in the form of simple visualizations. Euler's formula is just one of the basic applications of this idea where the growth rate is 0, and rotation rate is \( \pi \)!
A very nice explanation by Kalid on betterexplained.com.
Then there is this one by 3b1b.
There is another lengthier by 3b1b again.