17 Complex Numbers

A square root of a number is a value which, when multiplied by itself, gives you the original number. So a square root of $4$ is $2$ because $2 \times 2 = 4$. Another square root of $4$ is $-2$ because $(-2) \times (-2) = 4$.

So what are the square roots of $-4$? They can't be $2$ or $-2$ because these are the roots of $4$. We could let $-4 = -1 \times 4$ now we only need to deal with the square root of $-1$.

We are going to define $\sqrt{-1}=i$ (or $j$ if you are an electronic engineer). $i$ does not have a value, you cannot calculate it, it is simply a number in a different dimension, called, sadly, an imaginary number. It does, however, mean we can now find the square roots of $-4$. They are $+2i$ and $-2i$.

We can multiply $i$ by a scalar to get $2i$, $5i$, $-6i$, $ai$ and so on. These are all imaginary numbers. We can add imaginary numbers to real numbers to get complex numbers like $5+3i$, $2-3i$ and, more generally, $a+ib$.

You can imagine real numbers on a number line. For complex numbers we add a second, perpendicular axis which is called the imaginary axis. Real numbers are one dimensional quantities. Complex numbers are two dimensional quantities.


17.1 Cartesian Form of Complex Numbers

Complex Number z
Fig 17.1 Complex Number $z$

A complex number written in the Cartesian form is given as $z = a + ib$.

It is called the Cartesian form because $a$ is the $x$ value and $b$ is the $y$ value as shown in figure 17.1.

17.2 Polar Form of Complex Numbers

The complex number $a + ib$ can be also be given as a radius and an angle. Look at figure 17.2. The magnitude of the complex number, called the modulus, is given by

$$|z| = r = \sqrt{a^2 + b^2}$$

The angle, called the argument, is given by $$arg(z) = \theta = tan^{-1}(\frac{b}{a})$$

Modulus and Argument
Fig 17.2 Modulus and Argument

The polar form of complex numbers can be written with any of the following notations:

$$z = r(cos \theta + isin \theta) = rcis( \theta) = r \angle \theta = [r, \theta ] $$

Note: Baseline tutorials use $[r, \theta ]$ notation for answers in polar form.


17.3 Addition and Subtraction of Complex Numbers

The sum of two complex numbers is equal to the sum of the real parts and the sum of the imaginary parts, rather like vectors.

If $z_1=2+5i$ and $z_2=4+2i$ then

$$z_1+z_2=(2+4)+(5+2)i=6+7i$$

The difference of two complex numbers is equal to the difference of the real parts and the difference of the imaginary parts. Using $z_1$ and $z_2$ from above we get

$$z_1-z_2=(2-4)+(5-2)i=-2+3i$$


17.4 Product of Complex Numbers

The product of two complex numbers can be found by multiplying the parts of one number by the parts of the other. Using $z_1$ and $z_2$ from above we get:

$z_1 \times z_2$$=$$(2+5i)(4+2i)$
 $=$$2 \times 4 + 2 \times 2i + 5i \times 4 + 5i \times 2i$
 $=$$8 + 4i + 20i + 10i^2$
  Remember that $i=\sqrt{-1}$ so $i^2=-1$
so $z_1 \times z_2$$=$$8 + 24i - 10$
 $=$$-2 + 24i$

Another, and easier, way to find the product of two complex numbers is to put the numbers in polar form. Imagine we have $z_1 = r_1(cos \theta + isin \theta)$ and $z_2 = r_2(cos \phi + isin \phi)$ then


$$z_1 z_2 = r_1 r_2(cos(\theta + \phi) + isin( \theta + \phi)) $$

or $$z_1 z_2 = r_1 r_2 \angle (\theta + \phi)$$


17.5 The Complex Conjugate

You probably already know the identity

$(a+b)(a-b)=a^2-b^2$

With a small change we can write

$(a+ib)(a-ib)=a^2-(ib)^2$.

We also know $i = \sqrt{-1}$ so $i^2 = -1$ which means

$(a+ib)(a-ib)=a^2+b^2$.

The complex conjugate is the quantity that creates a real number from a complex number. If $z=a+ib$ then the complex conjugate is $z^*=a-ib$ and if $z=a-ib$ then the complex conjugate is $z^*=a+ib$. Multiplying a complex number by it's conjugate always produces a real number.


17.6 Quotient of Complex Numbers

To find the quotient of two Cartesian form complex numbers $z_1/z_2$ start by multiplying the numerator and denominator by the complex conjugate of the denominator. Using $z_1$ and $z_2$ from above we get:

$\large{\frac{z_1}{z_2}}$$=$$\frac{2+5i}{4+2i}$
 $=$$\frac{(2+5i)(4-2i)}{(4+2i)(4-2i)}$
 $=$$\frac{8+10-4i+20i}{16+4}$
 $=$$\frac{18+16i}{20}$
 $=$$\frac{9+8i}{10}$

In section 17.4 we noted that the product of two complex numbers can be easily calcualted using the polar form. The same is true for the quotient. Using $z_1 = r_1(cos \theta + isin \theta)$ and $z_2 = r_2(cos \phi + isin \phi)$ we get


$$z_1 / z_2 = (r_1 / r_2)(cos(\theta - \phi) + isin( \theta - \phi)) $$

or $$z_1 / z_2 = (r_1 / r_2) \angle (\theta - \phi)$$

Note: In general terms it is easier to use the Cartesian form of complex numbers for addition and subtraction and the polar form for multiplication and division


17.7 Euler's Formula for Complex Numbers

When calculators evaluate functions like the sine of an angle they often use the Taylor series. The Taylor series represents functions as an infinite series of terms. Calculators keep adding terms until a specific level of precision is reached.

Working with the Taylor series Leonhard Euler noticed that if you added the series for cosine to the series for sine you got an expression similar to the Taylor series for the number $e$, the base of natural logarithms. He then noticed that by multiplying the sine term by $i$ the expressions became identical. Mathematically, he found $cos \theta + i\ sin \theta = e^{i \theta}$

We have already seen expressions of the form $r(cos \theta + isin \theta)$. Using Euler's formula we can rewrite this as $r(cos \theta + isin \theta) = re^{i \theta}$.

$e^{i \theta} = cos \theta + i\ sin \theta$

Euler's formula simplifies an immense range of problems in science and engineering including control theory, improper integrals, fluid dynamics, dynamic equations, electromagnetism and electrical engineering, signal analysis, quantum mechanics, relativity, geometry, fractals, algebraic and analytic number theory.


A special case of the formula is when $\theta = \pi$. $cos \pi=-1$ and $sin \pi = 0$ so we can write $e^{i \pi} = -1 + 0$ which, with a little rearrangement becomes $e^{i \pi} + 1 = 0$


This subtle formula links five fundamental quantities, $e, i, \pi, 0$ and $1$.


$e^{i \pi} + 1 = 0$

17.8 De Moivre's Formula

De Moivre's formula states:

$(cos(\theta) + i\ sin(\theta))^n = cos(n \theta) + i\ sin(n \theta)$


De Moivre proved his formula before Euler published $e^{i \theta} = cos \theta + i\ sin \theta$ but Euler's formula makes proving De Moivre's formula easy.

We know $e^{i \theta}$$=$$cos(\theta) + i\ sin(\theta)$
and $(e^{i \theta})^n$$=$$e^{i n \theta}$
so it's a fairly easy step to see
$(cos(\theta) + i\ sin(\theta))^n$$=$$cos(n \theta) + i\ sin(n \theta)$

17.9 Roots of Polynomial Equations

In 1799 Carl Friedrich Gauss published an incomplete proof on the number of roots a polynomial of order $n$. This continued a discussion which ultimately lead to the fundamental theorem of algebra. In simple terms the theorem states that a polynomial of order $n$ has exactly $n$ roots. Let's find the roots of $y=x^2+2x+2$

$x$$=$$\frac{-b \pm \sqrt{b^2-4ac}}{2a}$
 $=$$\frac{-2 \pm \sqrt{2^2-4 \times 1 \times 2}}{2 \times 1}$
 $=$$\frac{-2 \pm \sqrt{-4}}{2}$
 $=$$-1 \pm \sqrt{-1}$
 $=$$-1 \pm i$

The polynomial $x^2+2x+2$ has no real roots but it does have complex roots. Whats more, the roots are complex conjugates of each other.

If one root of a polynomial is the complex number $z$ then another root will be $z^*$, the complex conjugate of $z$.


Example 17.1: Factorise $2x^3+5x^2-2x-15$ given one of the factors is $x+2+i$.

The given factor is $x+2+i$ so we know there is another factor $x+2-i$. Multiply these together:

$(x+2+i)(x+2-i)$
$=$
$x^2+2x-ix$
  $+2x+4-2i$
    $+ix+2i-i^2$
 =$x^2+4x+5$

Next, divide $2x^3+5x^2-2x-15$ by $x^2+4x+5$ to get $2x - 3$

So the factors of $2x^3+5x^2-2x-15$ are $x+2+i$, $x+2-i$ and $2x - 3$


Example 17.2: Find the cube roots of $-8$.

There are three cube roots of $-8$. Remembering $cos \pi = -1$ and $sin \pi = 0$ we can write

$-8$$=$$8(cos \pi + i sin \pi)$

If we add $2 \pi$ to $cos \pi$ or $sin \pi$ we move forward one wavelength and get the same value so we can write

$-8$$=$$8(cos((2n + 1)\pi) + i sin((2n + 1)\pi))$
 $=$$8e^{i (2n + 1)\pi}$
So $\sqrt[3]{-8}$=$(8e^{i (2n + 1)\pi})^{1/3}$
 $=$$2e^{i (2n + 1)\pi /3}$
 $=$$2(cos((2n + 1) \pi/3) + i sin((2n + 1) \pi/3))$

For values of $n = 0$, $1$ and $2$ we get:
$root_0 = 1 + 1.71i$, $root_1 = -2$ and $root_2 = 1 - 1.71i$

We can see what this means on the diagram below

Cube Root of -8
Fig 17.3 Cube Root of $-8$