# 3.3: Algebra of Complex Numbers

The complex numbers form a mathematical “field” on which the usual operations of addition and multiplication are defined. Each of these operations has a simple geometric interpretation.

The complex numbers $$z_1$$ and $$z_2$$ are added according to the rule

$z_1+z_2 = (x_1+jy_1) + (x_2+jy_2) = (x_1+x_2) + j(y_1+y_2)$

We say that the real parts add and the imaginary parts add. As illustrated in the Figure, the complex number $$z_1+z_2$$ is computed from a “parallelogram rule,” wherein $$z_1+z_2$$ lies on the node of a parallelogram formed from $$z_1$$ and $$z_2$$.

Exercise $$\PageIndex{1}$$

Let $$z_1 = r_1e^{jθ_1}$$ and $$z_2 = r_2e^{jθ_2}$$. Find a polar formula $$z_3 = r_3e^{jθ_3}$$ for $$z_3 = z_1 + z_2$$ that involves only the variables $$r_1,r_2,θ_1,$$ and $$θ_2$$. The formula for $$r_3$$ is the “law of cosines.”

The product of $$z_1$$ and $$z_2$$ is

$z_1z_2=(x_1+jy_1)(x_2+jy_2) = (x_1x_2−y_1y_2)+j(y_1x_2+x_1y_2)$

If the polar representations for $$z_1$$ and $$z_2$$ are used, then the product may be written as 1

$z_1z_2=r_1e^{jθ_1}r_2e^{jθ_2} = (r_1cos{θ_1}+jr_1sin{θ_1})(r_2cos{θ_2}+jr_2sin{θ_2})$

$= (r_1cos{θ_1}r_2cos{θ_2}−r_1sin{θ_1}r_2sin{θ_2}) + j(r_1sin{θ_1}r_2cos{θ_2}+r_1cos{θ_1}r_2sin{θ_2})$

$= r_1r_2cos(θ_1+θ_2)+jr_1r_2sin(θ_1+θ_2)$

$= r_1r_2e^{j(θ_1+θ_2)}$

We say that the magnitudes multiply and the angles add. As illustrated in Figure, the product $$z_1z_2$$ lies at the angle $$(θ_1+θ_2)$$

## Rotation

There is a special case of complex multiplication that will become very important in our study of phasors in the chapter on Phasors. When $$z_1$$ is the complex number $$z_1=r_1e^{jθ_1}$$ and $$z_2$$ is the complex number $$z_2=r_1e^{jθ_2}$$, then the product of $$z_1$$ and $$z_2$$ is

$z_1z_2=z_1e^{jθ_2}=r_1e^{j(θ_1+θ_2)}$

As illustrated in Figure, z_1z_2\) is just a rotation of $$z_1$$ through the angle $$θ_2$$

Exercise $$\PageIndex{2}$$

Begin with the complex number $$z_1=x+jy=re^{jθ}$$. Compute the complex number $$z_2=jz_1$$ in its Cartesian and polar forms. The complex number $$z_2$$ is sometimes called perp$$(z_1)$$. Explain why by writing perp$$(z_1)$$ as $$z_1e^{jθ_2}$$. What is $$θ_2$$? Repeat this problem for $$z_3=−jz_1$$.

## Powers

If the complex number $$z_1$$ multiplies itself $$N$$ times, then the result is

$(z_1)^N=r^N_1e^{jNθ_1}$

This result may be proved with a simple induction argument. Assume $$zk_1=rk_1e^{jkθ_1}$$. (The assumption is true for $$k=1$$.) Then use the recursion $$z^{k+1}_1=z^k_1z_1=r^{k+1}_1e^{j(k+1)θ_1}$$. Iterate this recursion (or induction) until $$k+1=N$$. Can you see that, as $$n$$ ranges from $$n=1,...,N,$$ the angle of z§ranges from $$θ_1$$ to $$2θ_1$$,..., to $$Nθ_1$$ and the radius ranges from $$r_1$$ to $$r^2_1$$,..., to $$r^N_1$$ ? This result is explored more fully in Problem 1.19

## Complex Conjugate

Corresponding to every complex number $$z= x+jy=re^{jθ}$$ is the complex conjugate

$z^∗=x−jy=re^{−jθ}$

The complex number $$z$$ and its complex conjugate are illustrated in the Figure. The recipe for finding complex conjugates is to “change $$j$$ to $$−j$$. This changes the sign of the imaginary part of the complex number.

## Magnitude Squared

The product of $$z$$ and its complex conjugate is called the magnitude squared of $$z$$ and is denoted by $$|z|^2$$

$|z|^2=z^∗z=(x−jy)(x+jy)=x^2+y^2=re^{−jθ}re^{jθ}=r^2$

Note that $$|z|=r$$ is the radius, or magnitude, that we defined in "Geometry of Complex Numbers".

Exercise $$\PageIndex{3}$$

Write $$z^∗$$ as $$z^∗=zw$$. Find $$w$$ in its Cartesian and polar forms.

Exercise $$\PageIndex{4}$$

Prove that angle $$(z_2z^∗_1)=θ_2−θ_1$$.

Exercise $$\PageIndex{5}$$

Show that the real and imaginary parts of $$z=x+jy$$ may be written as

$\mathrm{Re}[z]=\frac 1 2 (z+z^∗)$

$\mathrm{Im}[z]=\overline{2j}(z−z^∗)$

## Commutativity, Associativity, and Distributivity

The complex numbers commute, associate, and distribute under addition and multiplication as follows:

$z_1+z_2 = z_2+z_1$

$z_1z_2 = z_2z_1$

$(z_1+z_2)+z_3=z_1+(z_2+z_3)$

$z_1(z_2z_3)=(z_1z_2)z_3$

$z_1(z_2+z_3)=z_1z_2+z_1z_3$

## Identities and Inverses

In the field of complex numbers, the complex number $$0+j0$$ (denoted by 0) plays the role of an additive identity, and the complex number $$1+j0$$ (denoted by 1) plays the role of a multiplicative identity:

$z+0=z=0+z$

$z1=z=1z$

In this field, the complex number $$−z=−x+j(−y)$$ is the additive inverse of $$z$$, and the complex number $$z^{−1} = \frac {x} {x^2+y^2} + j \left(/frac {−y} {x^2+y^2} \right) is the multiplicative inverse: $z+(−z) = 0$ $zz^{−1} = 1$ Exercise \(\PageIndex{6}$$

Show that the additive inverse of $$z=re^{jθ}$$ may be written as $$re^{j(θ+π)}$$.

Exercise $$\PageIndex{7}$$

Show that the multiplicative inverse of $$z$$ may be written as

$z^{−1} = \frac {1} {z^∗z} z^∗ = \frac {1} {x^2 + y^2} (x−jy)$

Show that $$z^∗z$$ is real. Show that $$z^{−1}$$ may also be written as

$z^{−1} = r^{−1}e^{−jθ}$

Plot $$z$$ and $$z^{−1}$$ for a representative $$z$$.

Exercise $$\PageIndex{8}$$

Prove $$(j)^{−1} = −j$$.

Exercise $$\PageIndex{9}$$

Find $$z^{−1}$$ when $$z = 1+j1$$

Exercise $$\PageIndex{10}$$

Prove $$(z^{−1})^∗ = (z^∗)^{−1} = r^{−1}e^{jθ} = \frac {1} {z^∗z} z$$. Plot $$z$$ and $$(z^{−1})^∗$$ for a representative $$z$$.

Exercise $$\PageIndex{11}$$

Find all of the complex numbers $$z$$ with the property that $$jz = −z^∗$$. Illustrate these complex numbers on the complex plane

### Demo 1.2 (MATLAB)

Create and run the following script file (name it Complex Numbers) 2

Code $$\PageIndex{1}$$ (MATLAB):

clear, clg j=sqrt(-1) z1=1+j*.5,z2=2+j*1.5 z3=z1+z2,z4=z1*z2 z5=conj(z1),z6=j*z2 avis([-4 4 -4 4]),axis('square'),plot(z1,'0') hold on plot(z2,'0'),plot(z3,'+'),plot(z4,'*'), plot(z2,'0'),plot(z3,'+'),plot(z4,'*'), plot(z5,'x'),plot(z6,'x')

With the help of Appendix 1, you should be able to annotate each line of this program. View your graphics display to verify the rules for add, multiply, conjugate, and perp. See Figure.

Exercise $$\PageIndex{12}$$

Prove that $$z^0 = 1$$.

Exercise $$\PageIndex{13}$$

(MATLAB) Choose $$z_1 = 1.05e^{j2π/16}$$ and $$z_2 = 0.95e^{j2π/16}$$. Write a MATLAB program to compute and plot $$z^n_1$$ and $$z^n_2$$ for $$n = 1,2,...,32$$. You should observe a figure like the one below.

1. We have used the trigonometric identities $$cos(θ_1+θ_2) = cos{θ_1}cos{θ_2} − sin{θ_1}sin{θ_2}$$ and $$sin(θ_1+θ_2) = sin{θ_1}cos{θ_2} + cos{θ_1}sin{θ_2}$$ to derive this result.