## Arithmetic involving complex numbers

In a nutshell, adding and multiplying complex numbers follow the usual rules of arithmetic as long as one treats them as polynomials in $$i$$ with the provision that $$i^2$$ can always be simplified to $$-1$$.

In what follows, $$z = a+bi$$ and $$w = c+di$$ are complex numbers with $$a,b,c,d\in \mathbb{R}$$.

Addition is as follows: $z+w = (a+bi)+(c+di) = (a+c) + (b+d)i.$

### Examples

1. $$(1+2i) + (-2+i) = -1 + 3i$$

2. $$i + (3+i) = 3 + 2i$$

## Multiplication of complex numbers

Multiplication is carried out as follows: \begin{eqnarray*} z w & = & (a+bi)(c+di) \\ & = & a(c+di)+bi(c+di) \\ & = & ac + adi + bci + bdi^2 \\ & = & ac + adi + bci - bd \\ & = & (ac-bd) + (ad+bc)i. \end{eqnarray*}

### Examples

1. $$(1+2i) (-2+i) = 1(-2+i) + 2i(-2+i) = -2 + i + (-4)i - 2 = (-4) + (-3)i$$. For convenience, we simply write $$-4-3i$$.

2. $$2i (2+i) = 4i + 2i^2 = 4i - 2 = -2 + 4i$$.

## Exercises

Let $$z = 2i$$ and $$w = -2+i$$. Give the answer to each of the following. Express your answer in the form $$a+bi$$ with $$a,b\in \mathbb{R}$$.

1. $$z + i w$$

2. $$z w$$

3. $$z^3$$