# Operations with complex numbers

We can write any complex number $z$ in form: $z = x+yi$, where $x$ and $y$ are real numbers and $i$ imaginary unit.  Number $x$ is real part and number $y$ imaginary part so we write:

$$z = x+yi =Re(z) + Im(z).$$

This notation is known as standard form of complex number.

To add two complex numbers, we simply add real part to the real part and the imaginary part to the imaginary part.

Let $z_1 = x_1 + y_1 i$ and $z_2 = x_2 + y_2 i$ be complex numbers. Then their addition is defined as:

$$z_1 + z_2 = (x_1 + y_1 i) + (x_2 + y_2 i)$$

$$= (x_1 + x_2) + (y_1 i + y_2 i)$$

$$= (x_1 + x_2) + (y_1 + y_2) i$$

Example 1: Calculate $(4 + 5i) + (3 – 4i)$.

Solution:

$(4 + 5i) + (3 – 4i) = (4 + 3) + (5 – 4)i = 7+i$

## Subtraction of complex numbers

To subtract two complex numbers, we need to subtract the real part from the real part and the imaginary part from the imaginary part.

Let $z_1 = x_1 + y_1 i$ and $z_2 = x_2 + y_2 i$ be complex numbers. Then their subtraction is defined as:

$$z_1 – z_2 = (x_1 + y_1 i) – (x_2 + y_2 i)$$

$$= (x_1 – x_2) + (y_1 i – y_2 i)$$

$$= (x_1 – x_2) + (y_1 – y_2) i$$

Example 2: Calculate $(6 + 3i) – (4 + 2i)$.

Solution:

$(6 + 3i) – (4 + 2i) = (6 – 4) + (3 – 2)i = 2 + i$

## Multiplication of complex numbers

Let $z_1 = x_1 + y_1 i$ and $z_2 = x_2 + y_2 i$ be complex numbers. Then their multiplication is defined as:

$$z_1 \cdot z_2 = (x_1 + y_1 i) \cdot (x_2 + y_2 i)$$

$$= x_1 \cdot x_2 + x_1 \cdot y_2 \cdot i + y_1 \cdot x_2 \cdot i + y_1 \cdot y_2 \cdot i^2$$

$$= x_1 \cdot x_2 + (x_1 \cdot y_2 + y_1 \cdot x_2 ) i + y_1 \cdot y_2 \cdot (-1)$$

$$=(x_1x_2 – y_1 y_2) + (x_1 y_2 + y_1x_2)i$$

Operations of addition and multiplication of complex numbers are commutative, associative and distributive.

Example 3: Calculate $(2 + 3i) \cdot (4 + 2i)$.

Solution:

$(2 + 3i) \cdot (4 + 2i) = 2 \cdot 4 + 2 \cdot 2i + 3i \cdot 4 + 3i \cdot 2i$

$= 8 + 4i + 12i + 6 \cdot (-1)$

$= 2 + 16i$

## Division of complex numbers

If $z = x + yi$ is any complex number, then the number $\overline{z} = x – yi$ is called the complex conjugate of a complex number $z$.

The pair of complex numbers $z$ and $\overline{z}$ is called the pair of complex conjugate numbers. That pair has real parts equal, and imaginary parts opposite real numbers.

The product of two complex conjugate numbers is a positive real number:

$$z \cdot \overline{z} = (x + yi) \cdot ( x – yi) = x^2 – (yi)^2 = x^2 + y^2$$

For the division of complex numbers we will use the rationalization of fractions. To divide two complex numbers, we need to multiply the numerator and denominator by the complex conjugate number of number in the denominator. After that, we just rearrange and simplify the expression. The result has to be written in standard form.

Let $z_1 = x_1 +y_1i$ and $z_2= x_2 + y_2i$ be two complex numbers. Then we have

$$\frac{z_1}{z_2} = \frac{x_1 + y_1i}{x_2 + y_2 i}$$

$$= \frac{x_1 + y_1i}{x_2 + y_2 i} \cdot \frac{x_2 – y_2i}{x_2 – y_2 i}$$

$$= \frac{x_1x_2 + y_1y_2 +(x_2y_1 – x_1 y_2)i}{x_2^2 + y_2^2}$$

$$= \frac{x_1x_2 + y_1y_2}{x_2^2 + y_2^2} + \frac{x_2y_1 – x_1y_2}{x_2^2 + y_2^2} i.$$

Example 4: Calculate $\frac{6 + 9i}{-1 + 4i}$.

Solution:

$$\frac{6 + 9i}{-1 + 4i} \cdot \frac{-1 – 4i}{-1 – 4i}=$$

$$= \frac{(6+9i)(-1-4i)}{(-1 + 4i)(-1-4i)}$$

$$= \frac{30 – 33i}{1+16}$$

$$= \frac{30}{17} – \frac{33}{17}i.$$

Example 5: Calculate $\frac{1+2i}{4} – \frac{3-5i}{2}$.

Solution:

$$\frac{1+2i}{4} – \frac{3-5i}{2} =$$

$$= \frac{(1+2i) – 2 \cdot (3-5i)}{4}$$

$$= \frac{1+2i -6 +10i}{4}$$

$$= \frac{-5+12i}{4}$$

$$= – \frac{5}{4} + 3i.$$