TExcelTAD
Home › Pre-Calculus, Geometry & Trigonometry › Complex Numbers in Polar Form

Complex Numbers in Polar Form

A complex number a+bia + bi is a point in the plane, so like any point it can be described by a distance and an angle. In that polar form, multiplication becomes beautifully simple: multiply the lengths and add the angles. This lesson converts between the forms, explains why multiplying by a complex number is a rotation plus a scaling, and uses De Moivre's theorem to find powers and roots, with Python's built-in complex type and cmath module.

The complex plane

A complex number z=a+biz = a + bi has a real part aa and an imaginary part bb, where i2=−1i^2 = -1 (see Complex Numbers for a first introduction). Plot it as the point (a,b)(a, b): the horizontal axis is real, the vertical axis imaginary. Then, exactly as in polar coordinates:

modulus∣z∣=r=a2+b2argumentarg⁡z=θ=atan2⁡(b,a)polar formz=r(cos⁡θ+isin⁡θ)=reiθ\begin{aligned} &\text{modulus} && \lvert z \rvert = r = \sqrt{a^2 + b^2} \\ &\text{argument} && \arg z = \theta = \operatorname{atan2}(b, a) \\ &\text{polar form} && z = r(\cos\theta + i\sin\theta) = re^{i\theta} \end{aligned}

The short form reiθre^{i\theta} comes from Euler's formula eiθ=cos⁡θ+isin⁡θe^{i\theta} = \cos\theta + i\sin\theta, which you can check by putting iθi\theta into the series for exe^x: the even powers give cos⁡θ\cos\theta and the odd powers give isin⁡θi\sin\theta.

Python writes ii as j:

python · try it yourself
import cmath
import math

z = 1 + 1j * math.sqrt(3)           # 1 + √3 i
r, theta = cmath.polar(z)
print("z =", z)
print("r =", round(r, 6), " θ =", round(theta, 6), "=", round(math.degrees(theta), 4), "degrees")
print("back:", cmath.rect(r, theta))
print("Euler: e^(iπ) + 1 =", cmath.exp(1j * math.pi) + 1)
z = (1+1.7320508075688772j)
r = 2.0  θ = 1.047198 = 60.0 degrees
back: (1+1.732050807568877j)
Euler: e^(iπ) + 1 = 1.2246467991473532e-16j

eiπ+1=0e^{i\pi} + 1 = 0 holds exactly in mathematics; the tiny leftover is floating-point rounding of π\pi.

Multiplication is rotation

Multiply two numbers in polar form:

z1z2=r1eiθ1⋅r2eiθ2=(r1r2)ei(θ1+θ2)z_1 z_2 = r_1 e^{i\theta_1} \cdot r_2 e^{i\theta_2} = (r_1 r_2) e^{i(\theta_1 + \theta_2)}

Multiply the moduli, add the arguments. So multiplying by a number with ∣w∣=1\lvert w \rvert = 1 rotates by arg⁡w\arg w and keeps lengths; multiplying by ii (r=1r = 1, θ=90∘\theta = 90^\circ) rotates a quarter turn: i⋅(3+2i)=−2+3ii \cdot (3 + 2i) = -2 + 3i. Division divides the moduli and subtracts the arguments.

This is the 2D rotation formula in disguise. Rotating (x,y)(x, y) by θ\theta gives (xcos⁡θ−ysin⁡θ, xsin⁡θ+ycos⁡θ)(x\cos\theta - y\sin\theta,\ x\sin\theta + y\cos\theta), which is exactly the real and imaginary parts of (x+yi)(cos⁡θ+isin⁡θ)(x + yi)(\cos\theta + i\sin\theta).

python · try it yourself
import cmath
import math

point = 3 + 2j
w = cmath.exp(1j * math.radians(30))     # rotate 30° (|w| = 1)
print("rotated 30°:", point * w)

x, y, th = 3, 2, math.radians(30)
print("matrix form:", (x * math.cos(th) - y * math.sin(th), x * math.sin(th) + y * math.cos(th)))

print("times i    :", point * 1j)          # quarter turn
print("times 2i   :", point * 2j, " |z| grows from", round(abs(point), 4), "to", round(abs(point * 2j), 4))
rotated 30°: (1.598076211353316+3.232050807568877j)
matrix form: (1.598076211353316, 3.232050807568877)
times i    : (-2+3j)
times 2i   : (-4+6j)  |z| grows from 3.6056 to 7.2111

Powers and roots: De Moivre

Multiplying zz by itself nn times multiplies rr nn times and adds θ\theta nn times:

zn=rn(cos⁡nθ+isin⁡nθ)(De Moivre’s theorem)z^n = r^n(\cos n\theta + i\sin n\theta) \qquad \text{(De Moivre's theorem)}

For example (1+i)8(1 + i)^8: r=2r = \sqrt{2}, θ=π/4\theta = \pi/4, so (1+i)8=(2)8ei⋅2π=16(1 + i)^8 = (\sqrt{2})^8 e^{i \cdot 2\pi} = 16. No expansion needed.

Roots go the other way. The equation zn=wz^n = w has exactly nn solutions: take the nn-th root of the modulus and divide the angle by nn, and add the nn different turns 2πk/n2\pi k/n:

zk=r1/n⋅ei(θ+2πk)/n,k=0,1,…,n−1z_k = r^{1/n} \cdot e^{i(\theta + 2\pi k)/n}, \qquad k = 0, 1, \ldots, n - 1

The nn-th roots of 1 (the roots of unity) are nn points evenly spaced on the unit circle: a regular polygon.

python · try it yourself
import cmath
import math

print("(1+i)^8 =", (1 + 1j)**8)

n = 6
roots = [cmath.exp(2j * math.pi * k / n) for k in range(n)]
for k, z in enumerate(roots):
    print(f"k = {k}: {z.real:+.4f} {z.imag:+.4f}i   angle {360 * k / n:5.1f}°   z^6 ≈ 1: {abs(z**6 - 1) < 1e-12}")
(1+i)^8 = (16+0j)
k = 0: +1.0000 +0.0000i   angle   0.0°   z^6 ≈ 1: True
k = 1: +0.5000 +0.8660i   angle  60.0°   z^6 ≈ 1: True
k = 2: -0.5000 +0.8660i   angle 120.0°   z^6 ≈ 1: True
k = 3: -1.0000 +0.0000i   angle 180.0°   z^6 ≈ 1: True
k = 4: -0.5000 -0.8660i   angle 240.0°   z^6 ≈ 1: True
k = 5: +0.5000 -0.8660i   angle 300.0°   z^6 ≈ 1: True

In software

  • 2D rotation. Some engines and many quick scripts store a 2D orientation as a unit complex number: composing rotations is one complex multiply, and normalising it keeps rounding errors from creeping in. Quaternions extend the same idea to 3D (Quaternions).
  • Signal processing. The Fourier transform writes a signal as a sum of eiωte^{i\omega t} terms; the roots of unity are the frequencies sampled by the FFT. Sound, images and radio all rely on it (Signals and Fourier).
  • AC circuits and fractals. Electrical engineers use complex numbers for voltages with a phase; the Mandelbrot set iterates z→z2+cz \to z^2 + c.
  • Rotary position embeddings. Some LLMs encode a token's position by rotating pairs of numbers, which is multiplication by eiθe^{i\theta} applied to pairs of coordinates.

Exercises

Exercise 1: To polar form

Write z=−2+2iz = -2 + 2i in polar form.

Answer

z=22 ei⋅3π/4z = 2\sqrt{2}\, e^{i \cdot 3\pi/4} (r≈2.828r \approx 2.828, θ=135∘\theta = 135^\circ).

Solution
r=4+4=22θ=atan2⁡(2,−2)=3π/4(second quadrant)\begin{aligned} r &= \sqrt{4 + 4} = 2\sqrt{2} \\ \theta &= \operatorname{atan2}(2, -2) = 3\pi/4 && \text{(second quadrant)} \end{aligned}

Exercise 2: Multiply in polar form

z1=3eiπ/6z_1 = 3e^{i\pi/6} and z2=2eiπ/3z_2 = 2e^{i\pi/3}. Find z1z2z_1 z_2 and z1/z2z_1/z_2 in polar form, and z1z2z_1 z_2 as a+bia + bi.

Answer

z1z2=6eiπ/2=6iz_1 z_2 = 6e^{i\pi/2} = 6i; z1/z2=1.5e−iπ/6z_1/z_2 = 1.5e^{-i\pi/6}.

Solution
z1z2:r=3⋅2=6,θ=π/6+π/3=π/2  →  6(cos⁡90∘+isin⁡90∘)=6iz1/z2:r=3/2,θ=π/6−π/3=−π/6\begin{aligned} z_1 z_2&: \quad r = 3 \cdot 2 = 6,\quad \theta = \pi/6 + \pi/3 = \pi/2 \;\to\; 6(\cos 90^\circ + i\sin 90^\circ) = 6i \\ z_1/z_2&: \quad r = 3/2,\quad \theta = \pi/6 - \pi/3 = -\pi/6 \end{aligned}

Exercise 3: A big power

Compute (3+i)6(\sqrt{3} + i)^6 with De Moivre, then check in Python.

Answer

−64

Solution
r=2,θ=π/6(3+i)6=26eiπ=64⋅(−1)=−64\begin{aligned} &r = 2, \quad \theta = \pi/6 \\ &(\sqrt{3} + i)^6 = 2^6 e^{i\pi} = 64 \cdot (-1) = -64 \end{aligned}
python · try it yourself
import math

z = (math.sqrt(3) + 1j)**6
print(round(z.real, 9), round(z.imag, 9) + 0.0)   # + 0.0 turns -0.0 into 0.0
-64.0 0.0

Exercise 4: Spin a shape

Rotate the square with corners 1+1j, -1+1j, -1-1j, 1-1j by 45° using one complex multiplication per corner. Where do the corners end up?

Answer

On the axes at distance 2\sqrt{2}: (0,2)(0, \sqrt{2}), (−2,0)(-\sqrt{2}, 0), (0,−2)(0, -\sqrt{2}), (2,0)(\sqrt{2}, 0).

Solution

Each corner has modulus 2\sqrt{2} and argument 45°, 135°, 225°, 315°. Adding 45° gives 90°, 180°, 270°, 360°.

python · try it yourself
import cmath
import math

w = cmath.exp(1j * math.pi / 4)
for c in [1 + 1j, -1 + 1j, -1 - 1j, 1 - 1j]:
    z = c * w
    print(round(z.real, 4) + 0.0, round(z.imag, 4) + 0.0)
0.0 1.4142
-1.4142 0.0
0.0 -1.4142
1.4142 0.0

Test yourself

What does multiplying a complex number by ii do to its point in the plane?

  1. Reflects it in the real axis
  2. Rotates it 90° counter-clockwise
  3. Doubles its length
  4. Rotates it 180°

If ∣z1∣=3\lvert z_1 \rvert = 3 and ∣z2∣=4\lvert z_2 \rvert = 4, what is ∣z1z2∣\lvert z_1 z_2 \rvert?

  1. 7
  2. 5
  3. 12
  4. 1

How many solutions does z5=1z^5 = 1 have among the complex numbers?

  1. 5
  2. 1
  3. 2
  4. Infinitely many