The Complex Exponential Function

An Interactive Explanation

This essay is an interactive explanation of the complex exponential function. For those who have never worked with complex functions before, it looks alien and complicated in its usual mathematical notation. But we will show here that one can easily build a visual model of this function, which maps each aspect of the equation to an equivalent primitive. By dissecting the equation step by step, the reader will gain understanding of each aspect of the formula by having a direct link between the mathematics and the visualization. Using this cognitive model for imagining the complex exponential function, one is enabled to build equivalent visual explanations for a wide range of applications of the complex exponential function.

Students of electrical engineering and information technology often get introduced to the complex exponential function, without having learned basic complex function theory before. The same holds true for practitioners, applied physicists or radio amateurs, who do signal processing, work with second order differential equations or deal with waves in systems of any kind. The complex exponential function is the basis for a number of mathematical models that describe real world phenomena.

For this text, we require a basic understanding of complex numbers, which we will briefly introduce in the next section. We can, however, only recap some of those properties that are relevant later on.
If you know how to work with complex numbers, feel free to skip the following section.

A Review of Complex Numbers

The complex numbers are an extension to the space of real numbers. A complex number \(z\) consists of two parts and can be written in the form \begin{equation} z = a+\imagUnit b, \end{equation} where \(a\) and \(b\) are real numbers. The first part \(a\) is called the real part \(\mathfrak{R}(z)\) of the complex number and \(b\) is called the imaginary part \(\mathfrak{I}(z)\) with the imaginary unit \(\imagUnit\).

In this essay we use \(\mathrm{i}\) as the symbol for the imaginary unit. The imaginary unit \(\imagUnit\) is defined by the relation \begin{equation} \imagUnit^2 = -1. \end{equation} Imaginary numbers allow the computation of expressions not satisfiable with real numbers, in particular to calculate the root of a negative number.

All real numbers can be imagined as a point on a number line. If we locate the real part of a complex number on this line, then its imaginary part lies perpendicular to this value. The real and the imaginary part of complex numbers form two orthogonal axes, which create a Cartesian coordinate system, we call the complex plane.
A complex number is a point in the complex plane, it is also addressable in a polar coordinate system. The two parameters to describe a point in this system are the distance \(r\) from the origin and the angle \(\varphi\) with respect to the real axis. Both representations are illustrated in the figure below.

\(\Re(z) =a=\)
\(\Im(z)=b=\)
\(|z|=r=\)
\(\mathrm{arg}(z)=\varphi=\) \(\cdot\pi\)
Figure 1. A complex number in Cartesian and polar representation.

Using basic trigonometry, we can obtain the relation between the Cartesian form and the polar form of a complex number as \begin{equation} \label{PolarForm} z = \underbrace{a + \imagUnit b}_{\textrm{Cartesian form}} = \underbrace{r \cos{\varphi} + \imagUnit r \sin{\varphi}} _{\textrm{polar form}}. \end{equation} If the imaginary part of a complex number is null, then it consists only of its real part, a real number. Therefore, all real numbers fall on the real axis of the complex plane.

Euler's Notation

Perhaps one of the most important equations in mathematics, and essentially the core of this text, is Euler's formula. It establishes a relation between the exponential function and the complex numbers and connects both as \begin{equation} \label{EulersFormula} \e^{\imagUnit \varphi} = \cos{\varphi} + \imagUnit\sin{\varphi}. \end{equation} Euler's formula states that the exponential function with a pure imaginary exponent can be expressed as a complex number, whose real and imaginary parts are the cosine, respective the sine, of this exponent.

You might have noticed the similarity between Euler's formula and the polar form of complex numbers. And indeed, we can use \eqref{EulersFormula} and apply it to \eqref{PolarForm}. This allows us to express the same complex number \(z\) in a third way \begin{equation} z=r\e^{\imagUnit \varphi}, \end{equation} the so-called Euler form of complex numbers.

Let's further explore the polar representation of complex numbers. Euler's formula considers the special case of a complex number with absolute value \(|z|=r=1\). Figure 2 illustrates where such a number is located in the complex plane, depending on the angle \(\varphi\).

Figure 2. The function \(f(\varphi)=\e^{\imagUnit\varphi}\) is \(2\pi\)-periodic on the unit circle.

As we can see, Euler's formula describes a circle with radius 1, the so-called unit circle. We will show that this is indeed a circle. First, note that each point on the circle has the same distance to the origin of the complex plane. Hence, each complex number that fulfills Euler's formula, must also fulfill the equation of the circle as \begin{equation} \mathfrak{R}^2(z) + \mathfrak{I}^2(z) = r^2. \end{equation} It is easy to prove that this holds true, using Euler's formula and the trigoniometric identity \begin{equation} \cos^2(\varphi) + \sin^2(\varphi) = 1. \end{equation} We also observe, that \(\e^{\imagUnit\varphi}\) is periodic with \(2\pi\). This is obvious if we look at the polar representation of complex numbers, since both sine and cosine are also \(2\pi\)-periodic themselves.

Multiplication of Complex Numbers

Now, we need just one last prerequisite before we can go on: how to multiply two complex numbers. This is most easily done in the polar form, so numbers should be converted to this representation where necessary. We get the product of two complex numbers \(z_1\) and \(z_2\) as \begin{equation} \begin{split} z_1 \cdot z_2 &= r_1 \e^{\imagUnit \varphi_1} \cdot r_2 \e^{\imagUnit \varphi_2} = r_1 r_2 \cdot \e^{\imagUnit \varphi_1} \e^{\imagUnit \varphi_2}\\ &= r_1 r_2 \e^{\imagUnit(\varphi_1 + \varphi_2)}. \end{split} \end{equation} If two complex numbers are multiplied, the absolute values of both factors are multiplied and their arguments added.

What is the Complex Exponential Function?

The complex exponential function is one of most important basic functions in signals and systems theory, and digital signal processing. It is the underlying function for the Laplace transform and the Fourier transform, which are used to convert a signal to the frequency domain. If you have not heard of those, you might have heard of the fast Fourier transform (FFT), which is an efficient algorithm for computing the closely related discrete Fourier transform (DFT). The discrete Fourier transform is an integral part of many audio, image and video processing applications, where it enables efficient real time signal processing.

Starting With a Definition

The complex exponential function is a complex function. This is a type of function that returns a complex number. As stated, it is a fundamental building block for a lot of signal processing applications, where we often deal with functions depending on time. Therefore, we use \(t\) as our independent variable instead of \(x\), as conventionally done in mathematics.
The complex exponential function is commonly defined as \begin{equation} f(t) = X \cdot \e^{st}, \label{eq:abstract_base_equation} \end{equation} where both parameters \(X\) and \(s\) are complex numbers themselves. The outer parameter \(X\) is called the complex amplitude and the inner parameter \(s\) the complex frequency.

Complex Functions

As you might not have worked with complex functions before, we want to take a moment to briefly introduce the concept. The only kind of function students become acquainted with in math class are real functions, which map a real number to another real number. We write \(f:\RR\to\RR\).
Correspondingly a complex function maps — surprise, surprise — a complex variable to a complex value. Complex functions in the time domain are a special case of complex functions, that map a real input variable (the time \(t\)) to a complex number. In short, \(f:\RR\to\CC\).

To illustrate this with a little example, consider Euler's formula \eqref{EulersFormula} which maps a real input value, the angle \(\varphi\), to a point in the complex plane. Let's take that equation and make the angle dependent on time as \(\varphi(t) = 2\pi t\). We then obtain the complex function \begin{equation} f(t) = \e^{\imagUnit 2\pi t}=\cos(2\pi t)+\imagUnit\sin(2\pi t). \label{timeDependentEuler} \end{equation} This is exactly what we could observe in the animation in Figure 2: as the angle \(\varphi\) increased linearly with time, the resulting complex number performed a rotation on the unit circle.

A common problem with complex functions is that they are hard to plot. Real functions are graphed as two-dimensional x-y-plots, therefore they are easy to print on a two-dimensional support. For complex functions, however, we have four different dimensions to relate: the real and the imaginary part of the independent variable, and likewise the real and the imaginary part of the dependent variable.

The problem is somewhat easier for our special case of complex functions in the time domain. Since the independent variable is a real number, there are only three axis to display (namely time, real part and imaginary part). One option is to show a two-dimensional projection of a three-dimensional plot. Or one could plot the function in the complex plane and animate the dependency on time.
The more common approach is to split the complex function into two real functions and plot two separate graphs, each over t as the independent variable. There are two conventional ways to do this. One is mapping a complex function to its real part and its imaginary part. Alternatively one can plot the absolute value and the angle, also called magnitude and phase.

Dissecting the Definition

Let's look back at the definition \eqref{eq:abstract_base_equation} of the complex exponential function \begin{equation*} f(t) = X \cdot \e^{st}. \end{equation*} The first thing to notice is that \(X\) is a constant multiplicative scaling factor. We set \(X=1\) and ignore it for now. The reminder \(\e^{st}\) is a complex time-dependent function with parameter \(s\), the complex frequency. Since \(s\) is a complex number, we can express it in its Cartesian form and separate it into \begin{equation} s = \sigma + \imagUnit\omega \label{complex_frequency} \end{equation} Let's further assume that \(\sigma=0\). We then have \(s=\imagUnit\omega\), which leads to \begin{equation} \e^{\imagUnit\omega t} = \cos(\omega t) + \imagUnit\sin(\omega t). \end{equation} Now, that looks familiar! Very much like Euler's formula with time-dependent angle \eqref{timeDependentEuler} that we have seen before. It's a rotation on the unit circle in the complex plane. If we separate the real and imaginary part of the function we get a cosine function for the real part and sine function for the imaginary part.
Figure 3 shows the function as an animation in the complex plane and its imaginary part as a conventional Cartesian plot in dependency on \(\omega\).

Figure 3. The parameter \(\omega\) determines the rotation speed.

The parameter \(\omega\) is called angular velocity and determines the speed and orientation of the rotation, respective the oscillation. It is a constant and therefore results in a linear increase of \(\varphi\), which leads to a rotation with constant angular velocity.

Similar to the real exponential function, the complex exponential function runs through the point \(1+\imagUnit 0\) for \(t=0\), since \(\e^0 = 1\). The special case \(\omega=0\) yields the constant function \(f(t)=1\), which can also be discovered in the simulation.

An Exponential Envelope

After examining the imaginary part \(\omega\) of the complex frequency \(s=\sigma+\imagUnit\omega\), we want to take a closer look on its real part \(\sigma\). To this end, we expand \(s\) into its Cartesian form in \(\e^{st}\) and obtain \begin{equation} \e^{st} = \e^{(\sigma + \imagUnit\omega)t} = \e^{\sigma t + \imagUnit\omega t} = \e^{\sigma t} \cdot \e^{\imagUnit\omega t}. \end{equation} An exponential function with a complex exponent can be grasped as the product of two exponential functions, one with a pure real exponent and the other with a pure imaginary exponent. We can think of the product of both functions as the pointwise product of the values of both functions for each time instant \(t\).
As \(\e^{\sigma t}\) is the well-known real exponential function. We already know how it behaves depending on the exponent \(\sigma\). When multiplying a real number with a complex number, the angle of the complex number stays the same and only the absolute value of the complex number is scaled with the value of the real number. Therefore, \(\sigma\) in the complex exponential function is called growth rate too, since its effect on the function is similar.

Figure 4. The complex exponential function forms a spiral for \(\sigma \neq 0\).

It becomes apparent that \(\e^{st}\) forms a so-called logarithmic spiral in the complex plane. Depending on the sign of \(\sigma\), its absolute value is either increasing or decreasing with time. By taking a closer look at the real and imaginary part, we can observe that the maxima of both the sine and the cosine function lie exactly on the real valued exponential function. As a result of the multiplication, the harmonic functions are oscillating under the real exponential function. It is therefore called an envelope to the harmonic function.

Adding the Complex Amplitude

In order to return to the initial form of the complex exponential function with \(f(t) = X\cdot\mathrm{e}^{st}\), we still need to examine the influence of \(X\). Since the complex amplitude \(X\) is a constant factor that is multiplied with the function, it is handy to rewrite it in Euler's form as \begin{equation} X = \hat{X}\cdot\e^{\imagUnit\varphi}, \end{equation} in order to separate the absolute value and the argument. The amplitude \(\hat{X}\) is a constant factor, which scales the absolute value of \(\e^{st}\) for all points in time. Equivalently, for each time instant \(t\) the function is rotated with the constant angle \(\varphi\).

Figure 5. The complex amplitude scales and rotates the function.

There is another interpretation of \(X\): it is the value the complex exponential function yields for \(t=0\) as \(f(t=0) = X\cdot\e^{s0} = X\). This is easy to observe with the animation in Figure 5.

Recomposing the Function

The shape of the complex exponential function is determined by its two complex parameters. We have seen the close relation between the complex exponential function and the trigonometric functions, so it seems consistent to call \(X\) the complex amplitude and \(s\) the complex frequency. By rewriting both, we can represent the complex exponential function in its expanded form: \begin{equation} f(t) = X \cdot \e^{st} = \hat{X} \cdot \e^{\imagUnit\varphi} \cdot \e^{\sigma t} \cdot \e^{\imagUnit\omega t} \end{equation}

  1. \(\hat{X}\) is called the amplitude of the function. It is a constant real number, serving as a scaling factor.
  2. \(\e^{\imagUnit\varphi}\) is a constant complex number on the unit circle. The angle \(\varphi\) is called phase shift and determines the starting angle of the complex exponential funciton at \(t=0\).
  3. \(\e^{\sigma t}\) is a real valued exponential function with the decay rate \(\sigma\) (or growth rate, depending on the sign).
  4. \(\e^{\imagUnit\omega t}\) is a complex function yielding a rotation on the unit circle with angular velocity \(\omega\).

In order to consolidate your comprehension, we provide a sandbox in Figure 6 below. Here you can play with all parameters simultaneously and observe their interaction on the resulting plots.
In addition to the previous figures, we also show the real part of the function over time. It is plotted in a non-standard direction, to allow for a shared real axis with the complex plane above.

Figure 6. Simultaneous view with all parameters.

Hopefully this essay guided you to an intuitive understanding of the complex exponential function. There is absolutely no reason to despair, when coming across equations like \begin{equation} \cos x = \frac{\e^{\imagUnit x}+\e^{-\imagUnit x}}{2} \end{equation} or \begin{equation} \sin x = \frac{\e^{\imagUnit x}-\e^{-\imagUnit x}}{2\imagUnit}. \end{equation} You can prove those relations by using calculus and applying Euler's formula. But you could also try to come up with a visual explanation that can be derived using the model for the complex exponential function we have illustrated here.



About this Essay

This essay explores how interactive elements can augment learning processes and presents an alternative vision for the future of digital education. I's a proof of concept, wherein the modeling capabilities of a computer are used to enhance the learning experience with a mathematics textbook.

I do believe the future of education should focus uncompromisingly on the needs of students and prioritize effective acquisition of knowledge for everyone. In order to achieve this goal, we require methods that permit individual and time-independent education with adaptive learning pace and variable profundity. An efficient knowledge transfer of core principles leaves more room to study and understand important concepts in depth. It particularly empowers students to decide for themselves which concepts those are.
For this essay I tried to achieve the following objectives:

As with most things, few of the ideas presented here are mine. This text was hugely influenced by the work of Bret Victor, in particular their essay Up and Down the Ladder of Abstraction.
There exist many more Explorable Explanations out there, waiting for you to be explored. If you are interested in signal processing in particular, you might find Seeing Circles, Sines, and Signals by Jack Schaedler a good read.

This piece was created as part of my studies, attending the international Masters course in Mathematics in Mittweida, Germany.

The fonts used in this text are Linux Libertine and the beautiful Fira Sans. All animations are written in JavaScript, using the awesome D3 library. Equations are set appropriately with MathJax.

This work, including all figures and their source code, is licensed under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.

CC0
contact: mail@marsue.de