\(\newcommand{L}[1]{\| #1 \|}\newcommand{VL}[1]{\L{ \vec{#1} }}\newcommand{R}[1]{\operatorname{Re}\,(#1)}\newcommand{I}[1]{\operatorname{Im}\, (#1)}\)

# Refresher on complex numbers¶

\(i\) is the *imaginary unit*:

Therefore:

Engineers often write the imaginary unit as \(j\), and that is the convention that Python uses:

```
>>> 1j * 1j
(-1+0j)
```

An imaginary number is a real number multiplied by the imaginary unit. For example \(3i\) is an imaginary number.

A *complex* number is a number that has a *real* part and an *imaginary* part.
The real part is a real number. The imaginary part is an imaginary number.

For example, consider the complex number \(a = (4 + 3i)\). \(a\) has two parts. The first is a real number, often written as \(\R{a}\), and the second is an imaginary number \(\I{a}\):

Now consider the complex number \(c = (p + qi)\). \(\R{c} = p, \I{c} = qi\).

To multiply a complex number \(c\) by a real number \(r\), we multiply both real and imaginary parts by the real number:

```
>>> a = (4 + 3j)
>>> 2 * a
(8+6j)
```

Multiplying a complex number by an imaginary number follows the same logic, but remembering that \(i^2 = -1\). Let us say \(s i\) is our imaginary number:

```
>>> 3j * a
(-9+12j)
```