Skip to content
Snippets Groups Projects
title: Complex Numbers

Complex numbers

The lecture on complex numbers consists of three parts, each with their own video:

Total video length: 38 minutes and 53 seconds

Definition and basic operations

Complex numbers are numbers of the form

z=a+bi.z = a + b {\rm i}.
Here
i\rm i
is the square root of -1:
i=1,{\rm i} = \sqrt{-1},
or, equivalently:
i2=1.{\rm i}^2 = -1.

Usual operations for numbers have their natural extension for complex numbers as we shall see below.

Some definitions:

  • For a complex number

    z=a+biz = a + b {{\rm i}}
    ,
    aa
    is called the real part, and
    bb
    the imaginary part.

  • The complex conjugate

    zz^*
    of
    z=a+biz = a + b {{\rm i}}
    is defined as
    z=abi,z^* = a - b{{\rm i}},
    i.e., taking the complex conjugate means flipping the sign of the imaginary part.

Addition

For two complex numbers,

z1=a1+b1iz_1 = a_1 + b_1 {{\rm i}}
and
z2=a2+b2iz_2 = a_2 + b_2 {{\rm i}}
, the sum
w=z1+z2w = z_1 + z_2
is given as
w=w1+w2i=(a1+a2)+(b1+b2)iw = w_1 + w_2 {{\rm i}}= (a_1 + a_2) + (b_1 + b_2) {{\rm i}}
where the parentheses in the rightmost expression have been added to group the real and the imaginary part. A consequence of this definition is that the sum of a complex number and its complex conjugate is real:
z+z=a+bi+abi=2a,z + z^* = a + b {{\rm i}}+ a - b {{\rm i}}= 2a,
i.e., this results in twice the real part of
zz
. Similarly, subtracting
zz^*
from
zz
yields
zz=a+bia+bi=2bi,z - z^* = a + b {{\rm i}} - a + b {{\rm i}}= 2b{\rm i},
i.e., twice the imaginary part of
zz
(times
i\rm i
).

Multiplication

For the same two complex numbers

z1z_1
and
z2z_2
as above, their product is calculated as
w=z1z2=(a1+b1i)(a2+b2i)=(a1a2b1b2)+(a1b2+a2b1)i,w = z_1 z_2 = (a_1 + b_1 {{\rm i}}) (a_2 + b_2 {{\rm i}}) = (a_1 a_2 - b_1 b_2) + (a_1 b_2 + a_2 b_1) {{\rm i}},
where the parentheses have again be used to indicate the real and imaginary parts.

A consequence of this definition is that the product of a complex number

z=a+biz = a + b {{\rm i}}
with its conjugate is real:
zz=(a+bi)(abi)=a2+b2.z z^* = (a+b{{\rm i}})(a-b{{\rm i}}) = a^2 + b^2.
The square root of this number is the norm
z|z|
of
zz
:
z=zz=a2+b2.|z| = \sqrt{z z^*} = \sqrt{a^2 + b^2}.

Division

The quotient

z1/z2z_1/z_2
of two complex numbers
z1z_1
and
z2z_2
as above, can be evaluated by multiplying the numerator and denominator by the complex conjugate of
z2z_2
:
z1z2=z1z2z2z2=(a1a2+b1b2)+(a1b2+a2b1)ia22+b22.\frac{z_1}{z_2} = \frac{z_1 z_2^*}{z_2 z_2^*} = \frac{(a_1 a_2 + b_1 b_2) + (-a_1 b_2 + a_2 b_1) {{\rm i}}}{a_2^2 + b_2^2}.
Check this!

!!! check "Example:"

1+2i12i=(1+2i)(1+2i)12+22=1+8i45=35+i85\begin{align} \frac{1 + 2{\rm i}}{1 - 2{\rm i}} &= \frac{(1 + 2{\rm i})(1 + 2{\rm i})}{1^2 + 2^2} = \frac{1+8{\rm i} -4}{5}\\ & = -\frac{3}{5} + {\rm i} \frac{8}{5} \end{align}

Visualization: the complex plane

Complex numbers can be rendered on a two-dimensional (2D) plane, the complex plane. This plane is spanned by two unit vectors, one horizontal, which represents the real number 1, whereas the vertical unit vector represents

i{\rm i}
.

image

Note that the norm of

zz
is the length of this vector.

Addition in the complex plane

Adding two numbers in the complex plane corresponds to adding the horizontal and vertical components:

image

We see that the sum is found as the diagonal of a parallelogram spanned by the two numbers.

Complex functions

Real functions can (most of the times) be written in terms of a Taylor series:

f(x)=n=0f(n)(x0)n!(xx0)nf(x) = \sum \limits_{n=0}^{\infty} \frac{f^{(n)}(x_{0})}{n!} (x-x_{0})^{n}
We can write something similar for complex functions, when replacing the real variable
xx
with its complex counterpart
zz
:
f(z)=n=0f(n)(x0)n!(zx0)nf(z) = \sum \limits_{n=0}^{\infty} \frac{f^{(n)}(x_{0})}{n!} (z-x_{0})^{n}

For this course, the most important function is the complex exponential function, at which we will have a look below.

The complex exponential function

The complex exponential is used extremely often. It occurs in Fourier transforms and it is very convenient for doing calculations involving cosines and sines. It also makes doing many common operations on complex number a lot easier.

The exponential function

f(z)=exp(z)=ezf(z) = \exp(z) = e^z
is defined as:
exp(z)=ex+iy=exeiy=ex(cosy+isiny).\exp(z) = e^{x + {\rm i}y} = e^{x} e^{{\rm i} y} = e^{x} \left( \cos y + {\rm i} \sin y\right).
The last expression is called the Euler identity.

Exercise Check that this function obeys

exp(z1)exp(z2)=exp(z1+z2).\exp(z_1) \exp(z_2) = \exp(z_1 + z_2).
You need sum- and difference formulas of cosine and sine.

The polar form

A complex number can be represented by two real numbers,

aa
and
bb
which represent the real and imaginary part of the complex number. An alternative representation is a vector in the complex plane, whose horizontal component is the real, and vertical component the imaginary part. However, it is also possible to characterize that vector by its length and direction, where the latter can be represented by the angle the vector makes with the horizontal axis:

image

The angle with the horizontal axis is denoted by

φ\varphi
, just as in the case of polar coordinates. In the context of complex numbers, this angle is denoted as the argument. We have:

A complex number can be represented either by its real and imaginary part, corresponding to the Cartesian coordinates in the complex plane, or by its norm and its argument, corresponding to polar coordinates. The norm is the length of the vector, and the argument is the angle it makes with the horizontal axis.

From our previous discussion on polar coordinates we can conclude that for a complex number

z=a+biz = a + b {\rm i}
, its real and imaginary parts can be expressed as
a=zcosφa = |z| \cos\varphi
b=zsinφb = |z| \sin\varphi
The inverse equations are |z| = \sqrt{a^2 + b^2} \varphi = \arctan(b/a) for a>0. In general: \varphi = \begin{cases} \arctan(b/a) &{\rm for ~} a>0; \\ \pi + \arctan(b/a) & {\rm for ~} a<0 {\rm ~ and ~} b>0;\\ -\pi + \arctan(b/a) &{\rm for ~} a<0 {\rm ~ and ~} b<0. \end{cases}

It turns out that using this magnitude |z| and phase \varphi, we can write any complex number as z = |z| e^{{\rm i} \varphi} When increasing \varphi with 2 \pi, we make a full circle and reach the same point on the complex plane. In other words, when adding 2 \pi to our argument, we get the same complex number! As a result, the argument \varphi is defined up to 2 \pi, and we are free to make any choice we like, such as \begin{align} -\pi < \varphi < \pi \textrm{ (left)} \\ -\frac{\pi}{2} < \varphi < \frac{3 \pi}{2} \textrm{ (right)} \end{align}

image

Some useful values of the complex exponential to know by heart are $e^{2{\rm i } \pi} = 1 $, $e^{{\rm i} \pi} = -1 $ and e^{{\rm i} \pi/2} = {\rm i}. From the first expression, it also follows that e^{{\rm i} (y + 2\pi n)} = e^{{\rm i}y} {\rm ~ for ~} n \in \mathbb{Z} As a result, y is only defined up to 2\pi.

Furthermore, we can define the sine and cosine in terms of complex exponentials: \cos(x) = \frac{e^{{\rm i} x} + e^{-{\rm i} x}}{2} \sin(x) = \frac{e^{{\rm i} x} - e^{-{\rm i} x}}{2i}

Most operations on complex numbers are easiest when converting the complex number to its polar form, using the exponential. Some operations which are common in real analysis are then easily derived for their complex counterparts: z^{n} = \left(r e^{{\rm i} \varphi}\right)^{n} = r^{n} e^{{\rm i} n \varphi} \sqrt[n]{z} = \sqrt[n]{r e^{{\rm i} \varphi} } = \sqrt[n]{r} e^{{\rm i}\varphi/n} \log(z) = log \left(r e^{{\rm i} \varphi}\right) = log(r) + {\rm i} \varphi z_{1}z_{2} = r_{1} e^{{\rm i} \varphi_{1}} r_{2} e^{{\rm i} \varphi_{2}} = r_{1} r_{2} e^{{\rm i} (\varphi_{1} + \varphi_{2})} We see that during multiplication, the norm of the new number is the product of the norms of the multiplied numbers, and its argument is the sum of the arguments of the multiplied numbers. In the complex plane, this looks as follows:

image

!!! check "Example: Find all solutions solving z^4 = 1." Of course, we know that z = \pm 1 are two solutions, but which other solutions are possible? We take a systematic approach: \begin{align} z = e^{{\rm i} \varphi} & \Rightarrow z^4 = e^{4{\rm i} \varphi} = 1 \\ & \Leftrightarrow 4 \varphi = n 2 \pi \\ & \Leftrightarrow \varphi = 0, \varphi = \frac{\pi}{2}, \varphi = -\frac{\pi}{2}, \varphi = \pi \\ & \Leftrightarrow z = 1, z = i, z = -i, z = -1 \end{align}

Differentiation and integration

We only consider differentiation and integration over real variables. We can then regard the complex {\rm i} as another constant, and use our usual differentiation and integration rules: \frac{d}{d\varphi} e^{{\rm i} \varphi} = e^{{\rm i} \varphi} \frac{d}{d\varphi} ({\rm i} \varphi) ={\rm i} e^{{\rm i} \varphi} . \int_{0}^{\pi} e^{{\rm i} \varphi} = \frac{1}{{\rm i}} \left[ e^{{\rm i} \varphi} \right]_{0}^{\pi} = -{\rm i}(-1 -1) = 2 {\rm i}

Bonus: the complex exponential function and trigonometry

Let us show some tricks where the simple properties of the exponential function helps in re-deriving trigonometric identities.

  1. Take |z_1| = |z_2| = 1, and \arg{(z_1)} = \varphi_1 and \arg{(z_2)} = \varphi_2. Then it is easy to see that z_i = \exp({\rm i} \varphi_i), i=1, 2. Then: z_1 z_2 = \exp[{\rm i} (\varphi_1 + \varphi_2)]. The left hand side can be written as \begin{align} z_1 z_2 & = \left[ \cos(\varphi_1) + {\rm i} \sin(\varphi_1) \right] \left[ \cos(\varphi_2) + {\rm i} \sin(\varphi_2) \right] \\ & = \cos\varphi_1 \cos\varphi_2 - \sin\varphi_1 \sin\varphi_2 + {\rm i} \left( \cos\varphi_1 \sin\varphi_2 + \sin\varphi_1 \cos\varphi_2 \right). \end{align} On the other hand, the right hand side can be written as \exp[{\rm i} (\varphi_1 + \varphi_2)] = \cos(\varphi_1 + \varphi_2) + {\rm i} \sin(\varphi_1 + \varphi_2). Comparing the two expressions, equating their real and imaginary parts, we find \cos(\varphi_1 + \varphi_2) = \cos\varphi_1 \cos\varphi_2 - \sin\varphi_1 \sin\varphi_2; \sin(\varphi_1 + \varphi_2) = \cos\varphi_1 \sin\varphi_2 + \sin\varphi_1 \cos\varphi_2. Note that we used the resulting formulas already in order to derive the properties of the exponential function. The point is that you can use the properties of the complex exponential to quickly find the form of gonometric formulas which you easily forget.

  2. As a final example, consider what we can learn from the derivative of the exponential function: \frac{d}{d\varphi} \exp({\rm i} \varphi) = {\rm i} \exp({\rm i} \varphi) . Writing out the exponential in terms of cosine and sine, we see that \cos'\varphi + {\rm i} \sin'\varphi = {\rm i} \cos\varphi - \sin\varphi. where the prime ' denotes the derivative as usual. Equating real and imaginary parts leads to \cos'\varphi = - \sin\varphi; \sin'\varphi = \cos\varphi.

Summary

  • A complex number z has the form z = a + b \rm i where a and b are both real, and \rm i^2 = 1. The real number a is called the real part of z and b is the imaginary part. Two complex numbers can be added, subtracted and multiplied straightforwardly. The quotient of two complex numbers z_1=a_1 + \rm i b_1 and z_2=a_2 + \rm i b_2 is \frac{z_1}{z_2} = \frac{z_1 z_2^*}{z_2 z_2^*} = \frac{(a_1 a_2 + b_1 b_2) + (-a_1 b_2 + a_2 b_1) {{\rm i}}}{a_2^2 + b_2^2}.

  • Complex numbers can also be characterised by their norm |z|=\sqrt{a^2+b^2} and argument \varphi. These coordinates correspond to polar coordinates in the complex plane. For a complex number z = a + b {\rm i}, its real and imaginary parts can be expressed as a = |z| \cos\varphi b = |z| \sin\varphi The inverse equations are |z| = \sqrt{a^2 + b^2} \varphi = \begin{cases} \arctan(b/a) &{\rm for ~} a>0; \\ \pi + \arctan(b/a) & {\rm for ~} a<0 {\rm ~ and ~} b>0;\\ -\pi + \arctan(b/a) &{\rm ~ for ~} a<0 {\rm ~ and ~} b<0. \end{cases} The complex number itself then becomes z = |z| e^{{\rm i} \varphi}

  • The most important complex function for us is the complex exponential function, which simplifies many operations on complex numbers \exp(z) = e^{x + {\rm i}y} = e^{x} \left( \cos y + {\rm i} \sin y\right). where y is defined up to 2 \pi. The \sin and \cos can be rewritten in terms of this complex exponential as \cos(x) = \frac{e^{{\rm i} x} + e^{-{\rm i} x}}{2} \sin(x) = \frac{e^{{\rm i} x} - e^{-{\rm i} x}}{2i} Because we only consider differentiation and integration over real variables, the usual rules apply: \frac{d}{d\varphi} e^{{\rm i} \varphi} = e^{{\rm i} \varphi} \frac{d}{d\varphi} ({\rm i} \varphi) ={\rm i} e^{{\rm i} \varphi} . \int_{0}^{\pi} e^{{\rm i} \varphi} = \frac{1}{{\rm i}} \left[ e^{{\rm i} \varphi} \right]_{0}^{\pi} = -{\rm i}(-1 -1) = 2 {\rm i}

Problems

  1. [:grinning:] Given a=1+2\rm i and b=-3+4\rm i, calculate and draw in the complex plane the numbers a+b, ab, and b/a.

  2. [:grinning:] Evaluate (a) \rm i^{1/4}, (b) \left(1+\rm i \sqrt{3}\right)^{1/2}, (c) \exp(2\rm i^3).

  3. [:grinning:] Find the three 3rd roots of 1 and {\rm i} (i.e. all possible solutions to the equations x^3 = 1 and x^3 = {\rm i}, respectively).

  4. [:grinning:] (a) Find the real and imaginary part of \frac{1+ {\rm i}}{2+3{\rm i}} (b) Evaluate \left| \frac{a+b\rm i}{a-b\rm i} \right| for real a and b.

  5. [:sweat:] For any given complex number z, we can take the inverse \frac{1}{z}. Visualize taking the inverse in the complex plane. What geomtric operation does taking the inverse correspond to? (Hint: first consider what geometric operation \frac{1}{z^*} corresponds to.)

  6. [:grinning:] Compute (a) \frac{d}{dt} e^{{\rm i} (kx-\omega t)}, and (b) calculate the real part of \int_0^\infty e^{-\gamma t +\rm i \omega t} dt(k, x, \omega, t and \gamma are real; \gamma is positive).

  7. [:smirk:] Compute \int_{0}^{\pi}\cos(x)\sin(2x)dx by making use of the Euler identity.