## Imaginary numbers

- Invented to solve problems where an equation has no real roots e.g. $x^2 + 16 = 0$, the idea of declaring the existence of a quantity $i$ such that $i^2 = -1$ allows us to express the solution as

The set represented by $\mathbb{I}$ defines an imaginary number as

### Powers of i

If $i^2 = -1$ then $i^4 = i^2i^2 = -1 * -1 = 1$

Therefore we have the sequence

## Complex numbers

A complex number is just the sum of a real and an imaginary number

### Operations on complex numbers

Given two complex numbers

#### Addition and subtraction

#### Product

Given the complex number

#### Norm (modulus or absolute value)

#### Complex conjugate

The product of two complex numbers where the only difference between them is the **sign** of the imaginary part is

This quantity $a - bi$ is called the *complex conjugate* of $z$ (denoted as $z^*$), it implies that

#### Inverse

Multiplying the numerator and denominator with the conjugate of $z$ (so that we have a real part on the denominator)

#### Square root of $i$

We’re trying to find a complex number $z$ such that

Assuming that $z$ is the complex number $z = a + bi$

Therefore

Equaling real and imaginary parts

Therefore $a = \pm b$, replacing $a = -b$ in the second equation we obtain $-2b^2 = 1$ which is not satisfied by any real number $b$ therefore the case $a = -b$ is impossible, replacing $a = b$ in the second equation we obtain $2a^2 = 1$ so

Finally the value of $\sqrt{i}$ is

The value of $\sqrt{-i}$ is found in the same way (by replacing $b = -a$ in the equation $-2ab = 1$ found from multiplying \eqref{square-imaginary} by $-1$)

### Matrix representation of a complex number

The matrix $C$ for a complex number is the sum of two other matrices representing the real $R$ and imaginary $I$ parts:

which can be written as

Where $R = 1$ and $I = i$

The matrix representation of $R = 1$ in 2d is the identity matrix

To find the matrix representation of $i$ we have to analyze the definition of $i$ which is *a quantity* which squares to $-1$, given that we already know the value of $1$ in matrix form

Squaring the following matrix gives the matrix above, then the value of $i$ expressed in matrix form is

Finally the value of $C$ is

### The complex plane

The powers of $i$ give rise to the sequence $(1, i, -1, -i, 1, \ldots)$ which is quite similar to the pattern $(x, y, -x, -y, x, \ldots)$, the resemblance is no coincidence as complex number belong to a 2-dimensional plane, this complex plane allows us to visualize complex numbers using the horizontal axis for the real part and the vertical axis for the imaginary part

We can see that the positions of $i^0 = 1, i^1 = i, i^2 = -1, i^3 = -i, \ldots$ suggest that the multiplication of a complex number by $i$ is equivalent to rotating through 90 degrees

e.g.

A complex number is rotated $\pm 90^{\circ}$ by multiplying it by $\pm i$

Let’s graph the roots of $\sqrt{i} = \pm \frac{1}{\sqrt{2}} (1 + i)$

We can see that $\tfrac{1}{\sqrt{2}} (1 + i)$ is exactly at $45^{\circ}$ and $- \tfrac{1}{\sqrt{2}} (1 + i)$ is exactly at $225^{\circ}$

Let’s multiply the complex number $2 + i$ by $\sqrt{i}$ (it should rotate it by $45^{\circ}$)

Multiplying $z_2$ by $\sqrt{i}$ again should be equal to multiplying $z_1$ by $i$ (because $z_2$ is already rotated by $45^{\circ}$)

Which is exactly what we find if we multiply $z_i$ by $i$, these observations suggest that we can build a complex number which can rotate another complex number by any angle

A complex number is rotated $45^{\circ}$ by multiplying it by $\sqrti + \sqrti i$

A complex number is rotated $225^{\circ}$ by multiplying it by $-\sqrti + \sqrti i$

### Polar representation

Instead of using coordinates in the complex plane we can represent a polar number with the length of the vector from the origin to the complex coordinate and the angle between the complex vector and the positive real axis

The horizontal component of $z$ is then $r * cos(\theta)$ and the vectical component is $r * sin(\theta)$, expressing the complex number using these quantities

Euler provided the identity

Which allows us to represent any complex number as

Given two polar numbers

Their product is

Which effectively rotated the complex number $z$ by $\phi$ angles! However the quantity $zw$ was scaled $s$ units, to avoid scalling we can normalize $w$ (i.e. making $r = 1$ which is equal to \eqref{rotor})

A

rotoris a complex number that rotates another complex number by an angle $\theta$ (through multiplication) and has the form

Rotating a complex number $x + yi$ by an angle $\theta$

Which in matrix form is

Note that because of the way the complex product is defined, the multiplication between two complex numbers commutes