15.4 Complex Numbers
The numbers you are most familiar with are called real numbers. These include numbers like 4, 275, -200, 10.7, ½, π, and so forth. All these real numbers can be plotted on a number line. For example, if we wanted to show the number 3, we plot a point:

To solve certain problems like , it became necessary to introduce imaginary numbers.
To plot a complex number like , we need more than just a number line since there are two components to the number. To plot this number, we need two number lines, crossed to form a complex plane.
Because this is analogous to the Cartesian coordinate system for plotting points, we can think about plotting our complex number as if we were plotting the point in Cartesian coordinates. Sometimes people write complex numbers as to highlight this relation.
Arithmetic on Complex Numbers
Before we dive into the more complicated uses of complex numbers, let’s make sure we remember the basic arithmetic involved. To add or subtract complex numbers, we simply add the like terms, combining the real parts and combining the imaginary parts.
When we add complex numbers, we can visualize the addition as a shift, or translation, of a point in the complex plane.
We can also multiply complex numbers by a real number, or multiply two complex numbers.
To understand the effect of multiplication visually, we’ll explore three examples.
In general, multiplication by a complex number can be thought of as a scaling, changing the distance from the origin, combined with a rotation about the origin.
import cmath
import math
import matplotlib.pyplot as plt
Z = complex(1, 2) # EDIT: the starting point, 1 + 2i
W = complex(1, 1) # EDIT: what we keep multiplying by, 1 + i
STEPS = 4 # EDIT
def show(c):
a, b = c.real, c.imag
sign = "+" if b >= 0 else "-"
return f"{a:g} {sign} {abs(b):g}i"
print(f"start z = {show(Z)}, multiplier w = {show(W)}")
print(f"|w| = {abs(W):.4f} so every multiplication stretches distance by {abs(W):.4f}")
print(f"arg(w) = {math.degrees(cmath.phase(W)):.1f} degrees so every multiplication turns "
f"the point by that angle\n")
print(f"{'k':>3}{'z * w^k':>18}{'distance from 0':>18}{'angle (deg)':>14}")
points = [Z]
for k in range(STEPS + 1):
p = points[-1] if k == 0 else points[-1] * W
if k:
points.append(p)
print(f"{k:>3}{show(p):>18}{abs(p):>18.4f}{math.degrees(cmath.phase(p)):>14.1f}")
print(f"\naddition instead of multiplication - a slide, not a turn:")
shift = complex(-1, 5) # EDIT
print(f" ({show(Z)}) + ({show(shift)}) = {show(Z + shift)}"
f" (moved {shift.real:g} across and {shift.imag:g} up)")
fig, ax = plt.subplots(figsize=(6.0, 5.4))
xs = [p.real for p in points]
ys = [p.imag for p in points]
ax.plot(xs, ys, "o-", color="#b03a2e")
for k, p in enumerate(points):
ax.annotate(f" w^{k}", (p.real, p.imag), fontsize=10)
ax.plot([0, p.real], [0, p.imag], ":", color="gray", lw=0.8)
ax.axhline(0, color="black", lw=1); ax.axvline(0, color="black", lw=1)
ax.set_xlabel("real axis"); ax.set_ylabel("imaginary axis")
ax.set_title(f"multiplying {show(Z)} by {show(W)}, over and over")
ax.set_aspect("equal"); ax.grid(alpha=0.3)
plt.show()
# Try it: set W = complex(0, 1). Pure rotation - the distance never changes.
Adapted from Math in Society by David Lippman, hosted on LibreTexts (math.libretexts.org) and licensed under CC BY-SA 3.0. Changes were made. License: CC-BY-SA-3.0.