🏠 Home 📘 Track 2: Mathematics for Quantum M04 — The Imaginary Unit M05 — Complex Arithmetic M06 — Polar Form M07 — Euler's Formula
M06 §1 · Complex Numbers ~15 min

Every complex number is a length and an angle

Cartesian form $a + bi$ tells you where a complex number lives on a grid. Polar form $r\,e^{i\theta}$ tells you how far it is from the origin and which direction it points. For quantum gates — which are rotations — polar is the natural language.

✦ Central Idea Any complex number $z = a + bi$ can equivalently be described by its magnitude $r = \sqrt{a^2 + b^2}$ and angle $\theta = \arg(z)$. Written: $z = r(\cos\theta + i\sin\theta)$.
polar form magnitude phase angle Cartesian ↔ polar unit circle
Section 1

Two people give directions to the same place. They're both right — but one of them is much easier to work with.

Imagine someone tells you to find a park bench. The first person says: "Walk 3 blocks east and 3 blocks north." That's Cartesian — two coordinates on a grid. The second person says: "Walk about 4.2 blocks at a 45° angle from east." That's polar — one distance, one direction.

Both descriptions land you on the same bench. But if someone asks you to rotate your path by 30°, the polar person just changes one number. The Cartesian person has to recalculate both components from scratch.

⚛️
This is exactly what quantum gates do

A single-qubit gate is a rotation of the complex plane. The Hadamard gate sends every amplitude through a rotation and a scaling. The phase gate adds an angle $\theta$ to an amplitude without touching its magnitude. All of these operations — rotations — are trivial to describe in polar form, and ugly to describe in Cartesian form.

You already know how to write a complex number as $a + bi$. This lesson adds a second vocabulary for the same object: $(r, \theta)$ — magnitude and angle. By the end you'll convert fluently between the two, and you'll understand why every quantum gate is most naturally described in polar form.

Section 2

Magnitude is how far. Angle is which direction. Together they locate every point on the plane.

Picture the complex plane. Every complex number $z = a + bi$ is a point: $a$ steps along the real axis, $b$ steps along the imaginary axis. Now draw a line from the origin (0, 0) to that point.

That line has exactly two properties:

📏
The two polar coordinates

Magnitude $r$ — the length of the line from the origin to the point. By Pythagoras: $r = |z| = \sqrt{a^2 + b^2}$. It is always non-negative.

Angle $\theta$ — the angle the line makes with the positive real axis, measured counter-clockwise. Written $\theta = \arg(z)$. Conceptually: $\theta = \arctan(b/a)$ (with care for the quadrant). Measured in radians or degrees.

Once you have $r$ and $\theta$, you can recover $a$ and $b$ using the unit circle. At angle $\theta$ on the unit circle, the point is $(\cos\theta,\, \sin\theta)$. Scale it by $r$ and you get $(r\cos\theta,\, r\sin\theta)$. So:

$$z = r(\cos\theta + i\sin\theta)$$

This is the polar form of a complex number. Every $a + bi$ has a unique polar representation (for $r > 0$), and every $(r, \theta)$ pair corresponds to a unique point on the plane.

💡
The connection to $e^{i\theta}$

You may have seen the notation $z = r\,e^{i\theta}$. The expression $e^{i\theta}$ is shorthand for exactly $\cos\theta + i\sin\theta$ — this comes from Euler's formula, which M07 derives from first principles. For now, treat $e^{i\theta}$ as a convenient label for "the unit-circle point at angle $\theta$."

The key insight: phase is $\theta$. It is the angle — nothing more. When a quantum gate is said to "add a phase," it means it increases $\theta$ while leaving $r$ unchanged. Cartesian coordinates hide this completely. Polar coordinates make it visible.

⚡ Instinct Check What θ actually controls Advisory — won't block you
If $\theta$ increases from 0° to 90° while $r$ stays fixed, what changes about the complex number $z = r(\cos\theta + i\sin\theta)$?

Magnitude and angle are completely independent. Changing $\theta$ sweeps the point around a circle of radius $r$. Changing $r$ moves it closer or further from the origin along the same direction. A quantum phase gate changes $\theta$ only — it's a pure rotation, and $r$ (and therefore the probability) is untouched.

Section 3

Drag $r$ and $\theta$. Watch the Cartesian form update live.

The two sliders below control the polar coordinates of a complex number. As you drag, the point moves on the complex plane, and the Cartesian form $a + bi$ updates instantly. Notice: changing $\theta$ spins the point around the origin. Changing $r$ scales the distance. The two coordinates are completely independent.

Things to try
Try 1: Set $r = 1$ and drag $\theta$ from 0° to 360°. Watch the point trace the unit circle. Notice that $a$ goes from 1 → 0 → −1 → 0 → 1, and $b$ goes from 0 → 1 → 0 → −1 → 0.

Try 2: Set $\theta = 90°$. What is the Cartesian form? What about $\theta = 180°$? These should match your instincts about $i$ and $-1$.

Try 3: Set $r = \sqrt{2}$ (≈ 1.41) and $\theta = 45°$. The display should show $a \approx 1.00$, $b \approx 1.00$. That's $z = 1 + i$ — the prediction battle example.
🔬 Polar Explorer Magnitude $r$ and angle $\theta$ → Cartesian form $a + bi$
Complex plane
Blue arrow = $z$ (from origin to point)
Gold arc = angle $\theta$
Green dashes = $a$ (real part)
Violet dashes = $b$ (imaginary part)
Magnitude $r$  (0 → 2) 1.00
Angle $\theta$  (0° → 360°)
Polar form: $z = r(\cos\theta + i\sin\theta)$ 1.00(cos 0° + i sin 0°)
Cartesian form: $a = r\cos\theta$ 1.00
Cartesian form: $b = r\sin\theta$ 0.00
Cartesian: $z = a + bi$ 1.00 + 0.00i
Enter Cartesian → See Polar (step-by-step)
Real part $a$
Imaginary part $b$
Step 1
Step 2
Result
Please enter valid numbers for $a$ and $b$.
⚡ Instinct Check Reading the unit circle Advisory — won't block you
With $r = 1$ and $\theta = 90°$, what is the Cartesian form $a + bi$?
Section 4

The formulas are simple. The skill is converting fluently in both directions.

You now have two ways to write any complex number. The conversion rules are just two equations each way:

Polar → Cartesian

Given $r$ and $\theta$:
$a = r\cos\theta$    $b = r\sin\theta$    so $z = a + bi$

Cartesian → Polar

Given $a$ and $b$:
$r = \sqrt{a^2 + b^2}$    $\theta = \arctan(b/a)$ (adjust for quadrant)

The $\arctan(b/a)$ step needs care: the arctangent function only returns angles in $(-90°, 90°)$, but $\theta$ can be anywhere in $[0°, 360°)$. In practice, use the signs of $a$ and $b$ to determine the correct quadrant. The explorer above does this automatically.

⚔️ Prediction Battle Work it out before revealing the answer
Given $z = 1 + i$, predict the polar form: what are $r$ and $\theta$?
Write down your guess, then reveal the solution below.
Your guess: $r =$
Your guess: $\theta =$
$z = 1 + i$

Step 1 — Magnitude: $r = \sqrt{a^2 + b^2} = \sqrt{1^2 + 1^2} = \sqrt{2} \approx 1.414$

Step 2 — Angle: $\theta = \arctan(b/a) = \arctan(1/1) = \arctan(1) = 45°$

Polar form: $z = \sqrt{2}\,(\cos 45° + i\sin 45°)$

Verify: $a = \sqrt{2}\cos 45° = \sqrt{2} \cdot \tfrac{1}{\sqrt{2}} = 1$ ✓   $b = \sqrt{2}\sin 45° = 1$ ✓

The key insight from this example: $z = 1 + i$ sits exactly on the 45° line, equidistant from both axes. Its distance from the origin is $\sqrt{2}$ — the diagonal of a unit square. Once you see the geometry, the algebra just confirms what you can picture.

Same point — two descriptions
a = 1 b = 1 1+i Cartesian
r=√2 45° Polar

Both diagrams show the same point ($z = 1 + i$). Cartesian describes it with components. Polar describes it with distance and direction.

Quick Check 4 questions — polar form, magnitude, angle, and conversion
Micro Practice

Three checks before you move on

✓ Micro Practice Quick intuition checks — no heavy math
CHECK 01 — Concept
If $\theta$ increases from 0° to 180°, what changes visually about the point $z = r(\cos\theta + i\sin\theta)$ on the complex plane?
The point rotates counter-clockwise along a circle of radius $r$. At $\theta = 0°$ it sits on the positive real axis. At $\theta = 90°$ it's on the positive imaginary axis. At $\theta = 180°$ it's on the negative real axis. The magnitude $r$ — and therefore the probability $r^2$ — never changes. Only the direction changes.
CHECK 02 — Quick prediction
Without calculating, predict: what is the polar form of $z = -1$ (a real number on the negative axis)?
$r = 1$ (it's one unit from the origin), and $\theta = 180°$ (it points directly left along the negative real axis). So $z = 1 \cdot (\cos 180° + i\sin 180°) = -1 + 0i$ ✓. This is why $e^{i\pi} = -1$ — polar form at angle 180° on the unit circle.
CHECK 03 — Insight
In a quantum system, the amplitude of a state is $\alpha = r\,e^{i\theta}$. What does $\theta$ represent physically, and why does it matter?
$\theta$ is the phase — the angle of the amplitude on the complex plane. It doesn't affect the probability of measurement ($|\alpha|^2 = r^2$ depends only on $r$). But it determines how the amplitude interferes with other amplitudes. Two amplitudes with the same magnitude but different phases can add constructively (same $\theta$) or cancel destructively (phases 180° apart). Phase is what quantum gates manipulate to bias outcomes toward correct answers.
Lesson Summary

Polar form in four precise statements

  • 📐
    Every complex number has a magnitude and an angle
    Given $z = a + bi$: magnitude $r = \sqrt{a^2 + b^2}$ and angle $\theta = \arg(z)$. These two numbers locate the same point as $a$ and $b$ — they're two different coordinate systems for the complex plane.
  • 🔁
    Polar form: $z = r(\cos\theta + i\sin\theta)$
    The Cartesian components follow directly: $a = r\cos\theta$ and $b = r\sin\theta$. Going the other way: $r = \sqrt{a^2+b^2}$ and $\theta = \arctan(b/a)$ adjusted for quadrant.
  • Changing $\theta$ is a rotation; changing $r$ is a scaling
    The two polar coordinates are fully independent. Increasing $\theta$ sweeps the point around a circle at fixed radius. Changing $r$ moves it along the same direction. Quantum phase gates change $\theta$ only — a pure rotation that leaves probability $r^2$ intact.
  • $\theta$ is phase — the hidden variable behind interference
    Measurement probability is $|z|^2 = r^2$ — angle-blind. But interference depends on the relative $\theta$ between two amplitudes. Polar form makes the phase visible; Cartesian hides it. That's why every quantum algorithm is easier to understand in polar form.
How fluent do you feel converting between Cartesian and polar?

Polar form: $z = r(\cos\theta + i\sin\theta)$.
There's a shorter way to write this.
It involves $e$, $i$, and $\theta$ —
and it's the most useful equation in quantum computing.

→ Euler's formula $e^{i\theta} = \cos\theta + i\sin\theta$ — M07
Sources & Further Reading
← Previous
The Complex Plane
M05 — Adding, multiplying, conjugates