23 Complex numbers
Complex numbers extend the real numbers by introducing a number \(i\) satisfying \[ i^2=-1. \] They are indispensable in quantum mechanics: wave functions, state vectors, matrix elements, Fourier transforms, and time evolution are naturally complex-valued. Before using complex numbers in these settings, it is important to be comfortable with their elementary arithmetic and geometry.
23.1 Basic facts
A complex number has the form \[ z=a+ib, \] where \(a,b\in\mathbb{R}\). The number \(a\) is the real part and \(b\) is the imaginary part: \[ \operatorname{Re}z=a,\qquad \operatorname{Im}z=b. \] Notice that the imaginary part is the real number \(b\), not \(ib\).
Two complex numbers are equal precisely when their real and imaginary parts are equal: \[ a+ib=c+id \quad\Longleftrightarrow\quad a=c\text{ and }b=d. \]
Real numbers are special complex numbers: \(a=a+i0\). A purely imaginary number has zero real part, for example \(3i\) or \(-i/2\).
23.1.1 Arithmetic
Addition and subtraction are performed by collecting real and imaginary parts: \[ (a+ib)+(c+id)=(a+c)+i(b+d), \] \[ (a+ib)-(c+id)=(a-c)+i(b-d). \]
For multiplication, use the ordinary distributive law together with \(i^2=-1\): \[ (a+ib)(c+id)=ac+iad+ibc+i^2bd=(ac-bd)+i(ad+bc). \]
The powers of \(i\) repeat every four steps: \[ i^0=1,\qquad i^1=i,\qquad i^2=-1,\qquad i^3=-i,\qquad i^4=1. \]
23.1.2 Complex conjugation and absolute value
The complex conjugate of \[ z=a+ib \] is \[ \overline z=a-ib. \] Geometrically, conjugation reflects a complex number across the real axis.
Multiplying a number by its conjugate gives a nonnegative real number: \[ z\overline z=(a+ib)(a-ib)=a^2+b^2. \] The absolute value, or modulus, is therefore \[ |z|=\sqrt{a^2+b^2}, \] so that \[ |z|^2=z\overline z. \]
This identity is useful for division. If \(w\neq0\), multiply numerator and denominator by \(\overline w\): \[ \frac{z}{w}=\frac{z\overline w}{w\overline w}=\frac{z\overline w}{|w|^2}. \] The denominator is then real.
Some useful conjugation rules are \[ \overline{z+w}=\overline z+\overline w,\qquad \overline{zw}=\overline z\,\overline w,\qquad \overline{\left(\frac zw\right)}=\frac{\overline z}{\overline w}. \]
23.1.3 The complex plane
We can represent \(z=a+ib\) as the point \((a,b)\) in the complex plane. The horizontal axis is the real axis and the vertical axis is the imaginary axis. The modulus \(|z|\) is the distance from the origin to \(z\).
A nonzero complex number can also be described by its modulus \(r=|z|\) and an angle \(\theta\), called an argument: \[ z=r(\cos\theta+i\sin\theta). \] The angle is not unique: adding \(2\pi k\), with \(k\in\mathbb Z\), gives the same point.
Euler’s formula, \[ e^{i\theta}=\cos\theta+i\sin\theta, \] allows the compact polar form \[ z=re^{i\theta}. \] This makes multiplication especially simple: \[ r_1e^{i\theta_1}r_2e^{i\theta_2}=r_1r_2e^{i(\theta_1+\theta_2)}. \] Thus, multiplying complex numbers multiplies their lengths and adds their angles. Similarly, \[ \frac{r_1e^{i\theta_1}}{r_2e^{i\theta_2}} =\frac{r_1}{r_2}e^{i(\theta_1-\theta_2)}. \]
For an integer \(n\), De Moivre’s formula follows: \[ (\cos\theta+i\sin\theta)^n=\cos(n\theta)+i\sin(n\theta). \]
Complex numbers also have multiple roots. For example, the equation \(z^n=1\) has the \(n\) solutions \[ z_k=e^{2\pi i k/n},\qquad k=0,1,\ldots,n-1. \] These are equally spaced around the unit circle. This simple fact is an early example of how algebra and geometry fit together beautifully in the complex plane.
Exercises
Exercise 23.1 (Real and imaginary parts) For each complex number, state its real and imaginary parts.
\(z=3+2i\)
\(z=-4+5i\)
\(z=7\)
\(z=-3i\)
\(z=\frac12-\frac34i\)
Exercise 23.2 (First arithmetic with complex numbers) Compute and write each answer in the form \(a+ib\).
\((2+3i)+(4-i)\)
\((5+2i)-(1+7i)\)
\(3(2-i)\)
\(i(2+3i)\)
\((1+i)(1-i)\)
\((2+i)^2\)
Exercise 23.3 (Powers of \(i\)) Use the repeating pattern of powers of \(i\) to simplify the following.
\(i^2\)
\(i^3\)
\(i^4\)
\(i^5\)
\(i^{10}\)
\(i^{2026}\)
Exercise 23.4 (Conjugates and absolute values) For each number \(z\), find \(\overline z\), \(|z|\), and \(z\overline z\).
\(z=3+4i\)
\(z=1-i\)
\(z=-2i\)
\(z=-5\)
Exercise 23.5 (Finding your way in the complex plane) Sketch a complex plane and mark the following numbers. For each number, also state its distance from the origin.
\(1+i\)
\(-1+i\)
\(-1-i\)
\(1-i\)
\(2\)
\(-2i\)
What geometric operation changes \(z\) into \(\overline z\)?
Exercise 23.6 (Division of complex numbers) Write each quotient in the form \(a+ib\) by multiplying numerator and denominator by the conjugate of the denominator.
\(\displaystyle\frac{1}{1+i}\)
\(\displaystyle\frac{2+i}{1-i}\)
\(\displaystyle\frac{3-2i}{2+i}\)
Show directly that \(\displaystyle\frac{1}{z}=\frac{\overline z}{|z|^2}\) for every \(z\neq0\).
Exercise 23.7 (Working with conjugation) Let \(z,w\in\mathbb C\).
Verify, by writing \(z=a+ib\), that \(z+\overline z=2\operatorname{Re}z\).
Verify that \(z-\overline z=2i\operatorname{Im}z\).
Use these results to express \(\operatorname{Re}z\) and \(\operatorname{Im}z\) using only \(z\) and \(\overline z\).
Show that \(\overline{zw}=\overline z\,\overline w\).
Show that \(|zw|=|z||w|\).
Exercise 23.8 (Cartesian and polar form) For each number, find a modulus \(r\) and an argument \(\theta\), and write the number as \(re^{i\theta}\).
\(1+i\)
\(-1+i\)
\(-i\)
\(-\sqrt{3}+i\)
Convert \(2e^{i\pi/3}\) back to the form \(a+ib\).
Exercise 23.9 (Multiplication as rotation and scaling) Let \[ z=2e^{i\pi/6},\qquad w=3e^{i\pi/4}. \]
Find \(zw\) in polar form.
Find \(z/w\) in polar form.
What happens to the modulus when we multiply by \(w\)?
What happens to the argument when we multiply by \(w\)?
Explain geometrically why multiplication by a complex number can be viewed as a combination of scaling and rotation.
Exercise 23.10 (Roots of unity: algebra becomes geometry) Solve \[ z^4=1. \]
Write \(1\) as \(e^{2\pi i k}\), where \(k\in\mathbb Z\).
Find the four distinct fourth roots of \(1\) in exponential form.
Write them in the form \(a+ib\).
Plot the four roots in the complex plane.
What geometric figure do they form?
Exercise 23.11 (A first glimpse of quantum-mechanical phase) In quantum mechanics, multiplying a state by a complex number of modulus one, \[ e^{i\theta}, \] is called multiplication by a phase factor.
Let \[ z=3+4i. \]
Show that \(|e^{i\theta}|=1\).
Show that \(|e^{i\theta}z|=|z|\).
Compute \(iz\) and locate both \(z\) and \(iz\) in the complex plane.
What rotation takes \(z\) into \(iz\)?
Compute \(e^{i\pi}z\). What geometric operation has occurred?
This preservation of magnitude under multiplication by a phase is one reason complex numbers appear so naturally in quantum mechanics.
Exercise 23.12 (An excursion: the Mandelbrot iteration) Complex arithmetic can produce unexpectedly intricate geometry. Starting from \(z_0=0\), choose a complex number \(c\) and repeatedly calculate \[ z_{n+1}=z_n^2+c. \] The Mandelbrot set consists of those values of \(c\) for which this sequence does not escape to infinity.
For \(c=0\), calculate \(z_0,z_1,\ldots,z_5\).
For \(c=-1\), calculate \(z_0,z_1,\ldots,z_6\). What pattern do you see?
For \(c=1\), calculate terms until \(|z_n|>2\).
Write a short Python function that takes \(c\) and a maximum number of iterations and performs this iteration. Stop if \(|z_n|>2\).
Optional: sample many values \(c=x+iy\) in a rectangle of the complex plane and make an image in which each point is represented by the number of iterations required before \(|z_n|>2\). Explore the boundary of the Mandelbrot set.
Solutions
Solution for Exercise 23.1
\(\operatorname{Re}z=3\), \(\operatorname{Im}z=2\).
\(\operatorname{Re}z=-4\), \(\operatorname{Im}z=5\).
\(\operatorname{Re}z=7\), \(\operatorname{Im}z=0\).
\(\operatorname{Re}z=0\), \(\operatorname{Im}z=-3\).
\(\operatorname{Re}z=\frac12\), \(\operatorname{Im}z=-\frac34\).
Solution for Exercise 23.2
\(6+2i\).
\(4-5i\).
\(6-3i\).
\(2i+3i^2=-3+2i\).
\((1+i)(1-i)=1-i^2=2\).
\((2+i)^2=4+4i+i^2=3+4i\).
Solution for Exercise 23.3
\(-1\).
\(-i\).
\(1\).
\(i\).
Since \(10=4\cdot2+2\), \(i^{10}=i^2=-1\).
Since \(2026=4\cdot506+2\), \(i^{2026}=i^2=-1\).
Solution for Exercise 23.4
\(\overline z=3-4i\), \(|z|=5\), and \(z\overline z=25\).
\(\overline z=1+i\), \(|z|=\sqrt2\), and \(z\overline z=2\).
\(\overline z=2i\), \(|z|=2\), and \(z\overline z=4\).
\(\overline z=-5\), \(|z|=5\), and \(z\overline z=25\).
Solution for Exercise 23.5
The points are \((1,1)\), \((-1,1)\), \((-1,-1)\), \((1,-1)\), \((2,0)\), and \((0,-2)\), respectively. Their distances from the origin are \(\sqrt2,\sqrt2,\sqrt2,\sqrt2,2,2\).
Complex conjugation reflects a point across the real axis: \((a,b)\mapsto(a,-b)\).
Solution for Exercise 23.6
\[ \frac{1}{1+i}=\frac{1-i}{(1+i)(1-i)}=\frac{1-i}{2}=\frac12-\frac12i. \]
\[ \frac{2+i}{1-i}=\frac{(2+i)(1+i)}{2}=\frac{1+3i}{2}. \]
\[ \frac{3-2i}{2+i}=\frac{(3-2i)(2-i)}{5}=\frac{4-7i}{5}. \]
Since \(z\overline z=|z|^2\), \[ \frac1z=\frac{\overline z}{z\overline z}=\frac{\overline z}{|z|^2}. \]
Solution for Exercise 23.7
Write \(z=a+ib\).
\[ z+\overline z=(a+ib)+(a-ib)=2a=2\operatorname{Re}z. \]
\[ z-\overline z=(a+ib)-(a-ib)=2ib=2i\operatorname{Im}z. \]
\[ \operatorname{Re}z=\frac{z+\overline z}{2},\qquad \operatorname{Im}z=\frac{z-\overline z}{2i}. \]
If \(z=a+ib\) and \(w=c+id\), then \[ zw=(ac-bd)+i(ad+bc), \] so \[ \overline{zw}=(ac-bd)-i(ad+bc)=(a-ib)(c-id)=\overline z\,\overline w. \]
\[ |zw|^2=(zw)\overline{zw}=z\overline z\,w\overline w=|z|^2|w|^2. \] Both sides are nonnegative, so \(|zw|=|z||w|\).
Solution for Exercise 23.8
\(r=\sqrt2\), \(\theta=\pi/4\), so \(z=\sqrt2e^{i\pi/4}\).
\(r=\sqrt2\), \(\theta=3\pi/4\), so \(z=\sqrt2e^{3\pi i/4}\).
\(r=1\), \(\theta=-\pi/2\), so \(z=e^{-i\pi/2}\).
\(r=2\), \(\theta=5\pi/6\), so \(z=2e^{5\pi i/6}\).
\[ 2e^{i\pi/3}=2\left(\frac12+i\frac{\sqrt3}{2}\right)=1+i\sqrt3. \]
Solution for Exercise 23.9
\[ zw=6e^{i(\pi/6+\pi/4)}=6e^{5\pi i/12}. \]
\[ \frac zw=\frac23e^{i(\pi/6-\pi/4)}=\frac23e^{-i\pi/12}. \]
Multiplication by \(w\) multiplies the modulus by \(|w|=3\).
It increases the argument by \(\pi/4\).
For \(w=re^{i\theta}\), multiplication by \(w\) changes \(\rho e^{i\phi}\) into \(r\rho e^{i(\phi+\theta)}\). Thus lengths are scaled by \(r\) and angles are rotated by \(\theta\).
Solution for Exercise 23.10
\[ 1=e^{2\pi i k},\qquad k\in\mathbb Z. \]
Taking fourth roots gives \[ z=e^{2\pi i k/4}=e^{i\pi k/2}. \] The four distinct solutions are obtained for \(k=0,1,2,3\): \[ 1,\quad e^{i\pi/2},\quad e^{i\pi},\quad e^{3i\pi/2}. \]
These are \[ 1,\quad i,\quad -1,\quad -i. \]
They lie at \((1,0)\), \((0,1)\), \((-1,0)\), and \((0,-1)\).
They form the vertices of a square centered at the origin.
Solution for Exercise 23.11
Using Euler’s formula, \[ |e^{i\theta}|=|\cos\theta+i\sin\theta|=\sqrt{\cos^2\theta+\sin^2\theta}=1. \]
\[ |e^{i\theta}z|=|e^{i\theta}||z|=|z|. \]
\[ iz=i(3+4i)=-4+3i. \] Thus \(z\) is the point \((3,4)\) and \(iz\) is \((-4,3)\).
Multiplication by \(i=e^{i\pi/2}\) is a counterclockwise rotation by \(\pi/2\).
Since \(e^{i\pi}=-1\), \[ e^{i\pi}z=-z=-3-4i. \] This is a rotation by \(\pi\) about the origin.
Solution for Exercise 23.12
For \(c=0\), every term is zero: \[ z_0=z_1=\cdots=z_5=0. \]
For \(c=-1\), \[ z_0=0,\quad z_1=-1,\quad z_2=0,\quad z_3=-1,\quad z_4=0,\quad z_5=-1,\quad z_6=0. \] The sequence alternates between \(0\) and \(-1\).
For \(c=1\), \[ z_0=0,\quad z_1=1,\quad z_2=2,\quad z_3=5. \] Thus \(|z_3|>2\).
One possible implementation is
A compact visualization is
The most intricate structure appears near the boundary between points that escape rapidly and points that remain bounded for many iterations.
