2.1. Complex numbers

We briefly recap complex numbers. Through Euler's formulae, the usage of complex numbers is a crucial tool to describe periodic functions, e.g. plane waves and harmonic oscillations. Most textbooks spend only a few words on how this is done, while here we want to give an elaborate introduction.

2.1.1. The field of complex numbers

The complex numbers are a field $\mathbb{C}$ of numbers

$$z = x+\imath y \mathrm,$$

where $x \in \mathbb{R}$ and $y \in \mathbb{R}$ are real numbers, with the following definitions for addition $+$ and multiplication $-$:

$$ \begin{align} z_i &= x_i+\imath y_i\qquad i=1, 2\\ z_1+z_2&=(x_1+x_2)+\imath (y_1+y_2)\\ z_1\cdot z_2&= (x_1 x_2-y_1 y_2)+\imath (x_1 y_2+y_1 x_2) .\\ \end{align} $$

The real part $\Re\left\{z\right\} \in \mathbb{R}$, imaginary part $\Im\left\{z\right\} \in \mathbb{R}$, complex conjugate $z^* \in \mathbb{C}$, and magnitude or modulus $|z| \in \mathbb{R}$ of a complex number $z \in \mathbb C$ are definded via

$$ \begin{split} z &=\, x + \imath y &\\ &\Rightarrow\\ \Re{\left\{z\right\}} &=\, x & \\ \Im\left\{z\right\} &=\, y & \\ z^* &=\, x + \imath( -y) &= x - \imath y \quad\left[\Rightarrow \, z_1^*\,{z_2}^* =\, (z_1\,z_2)^*\right]\\ \lvert z\rvert &=\, \sqrt{zz^\ast} &=\, \sqrt{x^2+y^2} \in \mathbb{R} \end{split} $$

The field of real numbers can be interpreted as a subfield of the complex numbers with the definition

$$ x \in \mathbb{R}, \qquad z_x \in \mathbb{C}\\ z_x = x \Leftrightarrow z_x = x +\imath 0 $$

and the imaginary unit $\imath$ can be interpreted as a number, the square root of the real number $-1$.

$$\imath = \sqrt{-1} $$

Equation 2.1.1

We leave it to the reader to show that with this the complex numbers are a field.

2.1.2. Euler's formula

Euler's formula, named after Leonhard Euler⤴ (1707-1783), states that, for any real number $\phi \in \mathbb{R}$,

$$ \exp(\imath \phi) = e^{\imath \phi}=\cos \phi+\imath\sin \phi\mathrm, $$ Equation 2.1.2

where $e$ is the base of the natural logarithm, $\cos$ and $\sin$ are the trigonometric functions cosine and sine respectively. Euler's formula can be proven by simply expanding the terms in the formula into a Taylor series⤴.

With the function $exp(\imath \phi), \phi \in \mathbb{R}$ one hence describes the position of a point on the unit circle in the complex plane:

Figure 2.1.1 Unit circle in the complex plane. Credit: Wikipedia⤴

Remembering that for any angle $\phi \in \mathbb{R}$

$$ \cos^2 \phi + \sin^2 \phi = 1 $$

This means that any complex number $z \in \mathbb{C}$ can be written in the form

$$ z = \lvert z\rvert\exp{(\imath\phi)} \qquad , $$

where $\phi \in \mathbb{R}$ is called the argument of $z$. Note also that $\lvert z \rvert \in \mathbb{R}$ and $\lvert \exp{(\imath\phi)}\rvert$=1

2.1.3 Periodic functions and complex numbers

Using Euler's formula ($\S$ 2.1.2), one finds that a (co-)sinusoidal real function

$$ f(t)=a\,\cos (\omega t+\phi) $$

can be re-written as

$$ \begin{split} f(t) & = a\,\cos (\omega t+\phi) \\ & = z \, e^{\imath\omega t} + z^* \, e^{-\imath\omega t} \end{split} , $$

where

$$ \begin{split} z & = z_1 + \imath \,z_2 \\ z_1 & = \frac{a}{2} \cos \phi\\ z_2 & = \frac{a}{2} \sin \phi \end{split} , $$ Equation: 2.1.3

with $z_1\in \mathbb{R}$ and $z_2 \in \mathbb{R}$. Inverting the relation leads to (assuming $a>0$):

$$ \begin{split} a & = 2\sqrt{z_1^2 + z_2^2} \\ & = 2\lvert z \rvert\\ \phi & = atan2(z_1,z_2) &= \left \{ \begin{array}{lll} \arctan{\frac{z_2}{z_1}}&,&z_1 > 0\\ \arctan{\frac{z_2}{z_1}} - sign(z_2)\pi&,&z_1 < 0\\ sign(z_2)\frac{\pi}{2}&,&z_1 = 0 \land z_2 \neq 0 \end{array} \right. \end{split} $$

We leave it to the reader to calculate this for a sine periodic function.

Another possibility to express a real periodic function in terms of a product of a complex number and an exponential is to identify $a$ with the complex number $z_a$:

$$ \begin{split} \Re\left\{z_a\right\} & = a\\ \Im\left\{z_a\right\} & = 0 \end{split} , $$

and hence (see Eq 2.1.1 ⤵ )

$$ \begin{split}\ f(t) & = a\,\cos (\omega t+\phi) \\ & = \Re \left\{{z_a \, e^{\imath(\omega t+\phi)}}\right\}\\ & = \Re \left\{{a \, e^{\imath(\omega t+\phi)}}\right\}\\ & = a \Re \left\{{e^{\imath(\omega t+\phi)}}\right\} \end{split} \qquad . $$ Equation 2.1.4

This is the most common convention.

To translate from one format to the other just use Eq 2.1.3 ⤵ :

$$ \begin{aligned} z & = z_1 + \imath\,z_2 && \\ z_1 & = \frac{a}{2} \cos \phi && = \frac{z_a}{2} \cos \phi \\ z_2 & = \frac{a}{2} \sin \phi && = \frac{z_a}{2} \sin \phi \end{aligned} \qquad . $$

Eq 2.1.4 ⤵ can be made more general, in that $a \in \mathbb{R}$ can be replaced by any complex number $z^\prime$ with the same absolute value but different argument, in other words $a$ (or $z_a$) multiplied with a number on the unit circle $x$:

$$ \begin{split} f(t) & = a\,\cos (\omega t+\phi) \\ & = \Re \left \{{z^\prime \, e^{\imath(\omega t+\phi)}}\right\}\\ z^\prime &= z^\prime_1 + \imath z^\prime_2\\ &=x \cdot a\\ &= (x_1 + \imath\,x_2) \cdot a\\ \lvert z^\prime \rvert & = \lvert a \rvert \Rightarrow \\ \lvert x \rvert & = 1 \Rightarrow \\ x &= e^{\imath\alpha}\\ x_1 &= \cos \alpha\\ x_2 &= \imath\,\sin \alpha\\ z^\prime_1 &= a \cdot \cos \alpha\\ z^\prime_2 &= \imath\,a\cdot\sin \alpha \end{split} \qquad . $$

Again, to figure out $\alpha$:

$$ \begin{split} a & > 0 \Rightarrow \\ \alpha & = atan2(z^\prime_1,z^\prime_2) &= \left \{ \begin{array}{lll} \arctan{\frac{z^\prime_2}{z_1}}&,&z^\prime_1 > 0\\ \arctan{\frac{z^\prime_2}{z^\prime_1}} - sign(z^\prime_2)\pi&,&z^\prime_1 < 0\\ sign(z^\prime_2)\frac{\pi}{2}&,&z^\prime_1 = 0 \land z^\prime_2 \neq 0 \end{array} \right. \end{split} \qquad . $$

Equation 2.1.5

Then, Eq 2.1.4 ⤵ becomes, by simply implementing the identity:

$$\begin{split} f(t) & = a\,\cos (\omega t+\phi) \\ & = \Re \left \{{a \, e^{i(\omega t+\phi)}}\right\}\\ & = \Re \left \{{a \cdot 1 \cdot e^{i(\omega t+\phi)}}\right\}\\ & = \Re \left \{{a (\, x \, x^*) \, e^{i(\omega t+\phi)}}\right\}\\ & = \Re \left \{{z^\prime \left ({x^* \, e^{i(\omega t+\phi)}}\right)} \right\}\\ & = \Re \left \{{z^\prime \left ({e^{-i\,\alpha} \, e^{i(\omega t+\phi)}}\right)} \right\}\\ & = \Re \left \{{z^\prime \, e^{i(\omega t+\phi-\alpha)}} \right\}\\ & = \Re \left \{{z^\prime \, e^{i(\omega t+\widehat{\phi})}} \right\} \end{split} \qquad . $$

For any complex number $z^\prime$ with $\lvert a \rvert = \lvert z^\prime \rvert $, one can hence formulate:

$$ \begin{split} f(t) & = a\,\cos (\omega t+\phi) \\ & = \Re \left \{{z \, e^{\imath(\omega t+\phi^\prime)}}\right\} \end{split} \qquad , $$

with $$ \begin{split} \phi^\prime & = \phi - \alpha \\ \end{split} \qquad , $$

and $\alpha$ calculated according to Eq 2.1.5 ⤵ . The most common convention is to enforce $\Im\left\{z^\prime\right\} = 0$, and hence Eq 2.1.4 ⤵ .

In this section we used the conventional symbols $t$ and $\omega$ usually employed for time and angular frequency for the case of an oscillation in time. This can of course be adapted to other periodic functions or other arguments. The equations above do not change when we replace the term $\omega t$ with $2\pi \nu t$ or $2\pi \frac{t}{T}$ or $\bf{k}\cdot\bf{x}-\omega t$ or $2\pi(\frac{l}{\lambda}x+\frac{m}{\lambda}y+\frac{n}{\lambda}z- \nu t)$