Complex numbers

From the discussion here it follows that in practice there is a need to extend the set of real numbers to a set of complex numbers. In this section we will first introduce the set of complex numbers in two different ways and we will show how complex numbers can be visualized by vectors. Then we will introduce the concept of complex conjugation, which is important to obtain the definition of the length of a complex vector. Furthermore we will introduce calculation rules for complex numbers, which are defined in such a way that these rules are generalizations of the calculation rules for real numbers. Finally we show how the addition of two complex numbers can be visualized, which leads to the vectorial addition rule.



Polar and Cartesian representation

Polar notation

From the solution of the harmonic oscillator we saw that the solution to the second-order differential equation was given by a linear combination of e±jθ. The complex exponential z=rejθ, with both θR and rR, is also a valid solution of the second order differential equation. This notation is one of the two notations of a complex number and is the so-called polar notation. Using this information, the set of complex numbers can be defined as

Polar representation:C={z=rejθ | rR and θR}

Cartesian notation

In the other intuitive example we saw that a complex number could also be written in the form of z=x+jy, which is related to the polar notation through the Euler equations as

z=rejθ=rcos(θ)+jrsin(θ)

The first term is the so-called real part, denoted by e{}. The second term, which is the part after the unit j, is the so-called imaginary part which is denoted by m{}. Both the real and imaginary part are real numbers and are given by the following expressions:

e{z}=rcos(θ)Randm{z}=rsin(θ)R

Using this Cartesian notation, the set of complex numbers can be defined as

Cartesian representation:C={z=x+jy | xR and yR}

Visualisation of complex numbers

From these definitions it follows that a real number can be viewed as a complex number from which the imaginary part m is zero. Thus the set of complex numbers C is a generalization of the set of real numbers R. From experience we know that real number can be represented on a one dimensional line, as depicted in Fig. 1.

The real line.
The real line, allowing for representation of the set of real numbers R.

From the Cartesian (and thus also the polar representation) of complex numbers it follows that we need two independent axes in order to represent a complex number graphically: one for the real part of the complex number and one for the imaginary part. In contrary to the set of real numbers, which are represented on the real line, complex numbers are represented in the complex plane.

A complex number represented in the complex plane in (a) Cartesian notation and (b) polar notation.
A complex number represented in the complex plane in (a) Cartesian notation and (b) polar notation.

In Fig. 2 we visualized the complex number, both in Cartesian and polar notation, as a complex vector z in a two dimensional plane. The horizontal axis represents the real part of the complex vector z while the projection on the vertical axis represents the imaginary part. Thus, when using the Cartesian representation z=x+jy, the parameter x represents the real part e{z} and y represents the imaginary part m{z}. On the other hand, when using the polar representation z=rejθ, the parameter r represents the length of the complex vector z and θ the (counterclockwise) angle with the (positive) real axis.

Converting between the notations

From this it follows that for the Cartesian representation the length r of the complex vector z=x+jy is equal to x2+y2. The angle, in radians, is defined as the angle between the positive x-axis of the complex plane and the point given by the coordinates (x,y) on the complex plane. The angle is positive for counter-clockwise angles (upper half-plane, y>0), and negative for clockwise angles (lower half-plane, y<0). In other words if we need to convert from Cartesian to Polar notation we can use the following equations: r=x2+y2 and θ={arctan(yx)for x>0arctan(yx)+πfor x<0;y0arctan(yx)πfor x<0;y<0π2for x=0;y>0π2for x=0;y<0undeterminedfor x=y=0

The different cases for the angle θ are required because of the ambiguity introduced by the arctan() function. This function does not take into account in which quadrant the complex number is located and therefore it is sometimes necessary to add π to the angle. On the other hand from the polar representation as depicted in Fig. 2 it follows that the projection of the complex vector z=rejθ on the real axis equals rcos(θ), while the projection on the imaginary axis is given by rsin(θ). Thus if we need to convert from polar to Cartesian notation we can use the following equations: x=rcos(θ) and y=rsin(θ)

Example


Convert z=4ej3π4 to Cartesian notation z=x+jy.
By using the Euler equations we obtain: 4ej3π4=4cos(3π4)+j4sin(3π4)=4122+j4122=22j22

Example


Convert z=323+j32 to polar notation z=rejθ.
First calculate the length r of the complex vector z as follows: r=|z|=(323)2+(32)2=274+94=3 Since the real part of the complex vector z is negative the argument can be found with the following equation: θ=arctan(32323)+π=arctan(13)+π=π6+π=56π Concluding we obtain: z=323+j32=3ej56π



Mathematical operations

Similar to each extension from one set of numbers to a more general set of numbers, the calculation rules for complex numbers are defined in such a way that these rules generalize the calculation rules of real numbers.

Because of the fact that we can represent a complex number in Cartesian or in polar notation, each of the calculation rules can be performed by using both of these representations, however a general rule of thumb for the calculation rules is:

It is easiest to use Cartesian notation when adding or subtraction complex numbers, while polar notation works easiest for multiplication and division.

Screencast video [⯈]

Complex conjugation

In this subsection we will show that we can obtain the length of a complex vector by using the so called complex conjugated vector, denoted by z, which is constructed by inverting the sign the imaginary part, so by changing j to -j and -j to j, thus: (1)z=ejθz=ejθ(2)z=x+jyz=xjy

This conjugation operation is visualized in Fig. 3 and simply corresponds to the mirroring of the complex number in the real axis.

The complex conjugation operation.
Visualisation of the complex conjugation operation.

We have seen that the length of a complex vector is either given by the parameter r, when using polar notation, or by x2+y2, when using the Cartesian notation. Since the length of a vector is always a positive real number, we will denote it by using the absolute value sign ||. Now by using the definition of complex conjugation we can define the length of a complex vector z as follows: |z|=zzreal and 0

This definition can be shown either by using polar or Cartesian notation as follows: (3)|z|=rejθrejθ=r2ej(θθ)=r(4)=(x+jy)(xjy)=x2jxy+jyxj2y2=x2+y2

Addition & subtraction

When adding two complex numbers z1=x1+jy1 and z2=x2+jy2 we have to add separately their real parts and imaginary parts. Thus when evaluating the real and imaginary part of z=z1+z2 we obtain: z=z1+z2=(x1+jy1)+(x2+jy2)=(x1+x2)+j(y1+y2) from which it follows that: e{z}=x1+x2andm{z}=y1+y2

As a result of the separate addition of the real and the imaginary parts we can visualize the addition of two complex vector by the so called vector addition rule which is depicted in Fig. 4. Now because of the fact that we have to add the real and imaginary parts separately. The construction of the addition of two complex vectors in a resulting complex vector z is simply performed by appending the vectors behind each other.

The complex addition operation.
Visualisation of the complex addition operation.

Multiplication

The result z=rejθ of multiplying two complex vectors z1=r1ejθ1 and z2=r2ejθ2 is: z=z1z2=r1ejθ1r2ejθ2=(r1r2)ej(θ1+θ2)=rejθ with r=r1r2 and θ=θ1+θ2.

Example


Use the Cartesian notation to find the result of the multiplication of two arbitrary complex numbers.
When using the Cartesian notation the result becomes as follows: (5)z=z1z2=(x1+jy1)(x2+jy2)(6)=x1x2+j2y1y2+jx1y2+jy1x2(7)=(x1x2y1y2)+j(x1y2+x2y1)(8)=e{z}+jm{z}

Division

The result z=rejθ of dividing two complex vectors z1=r1ejθ1 and z2=r2ejθ2 is: z=z1z2=r1ejθ1r2ejθ2=r1r2ej(θ1θ2)=rejθ with r=r1r2 and θ=θ1θ2.

Example


Use the Cartesian notation to find the result of the division of two arbitrary complex numbers.
When using the Cartesian notations z1=x1+jy1 and z2=x2+jy2 for dividing two complex numbers the main problem is that there is a complex number in the denominator. So we have to find a way to get rid of this complex number in the denominator. Now we have seen before that when multiplying a complex number by its complex conjugate the result is real. We can use this fact to rewrite the original fraction of two complex numbers as a fraction of a complex number divided by a real number. This strategy goes as follows: z=z1z2=z1z21=z1z2z2z2=z1z2|z2|2 Now the division works out as follows: (9)z=z1z2=z1z2|z2|2=x1x2j2y1y2jx1y2+jy1x2x22+y22(10)=(x1x2+y1y2)+j(y1x2x1y2)x22+y22(11)=(x1x2+y1y2x12+y12)+j(y1x2x1y2x12+y12)=e{z}+jm{z}