|q⟩ Bad Qubits

beginner · Physics · Math Foundations: Complex Numbers

Polar Form

Every complex number z=a+biz = a + bi can be written in a second, equally complete way called polar form:

z=reiθ,z = r\,e^{i\theta},

where r=z=a2+b2r = |z| = \sqrt{a^2 + b^2} is the modulus and θ=arg(z)=atan2(b,a)\theta = \arg(z) = \operatorname{atan2}(b, a) is the argument (angle from the positive real axis, measured in radians).

Why two forms?

Rectangular form a+bia + bi is natural for addition: (a+bi)+(c+di)=(a+c)+(b+d)i(a + bi) + (c + di) = (a+c) + (b+d)i. Polar form is natural for multiplication: if z1=r1eiθ1z_1 = r_1 e^{i\theta_1} and z2=r2eiθ2z_2 = r_2 e^{i\theta_2}, then

z1z2=r1r2ei(θ1+θ2).z_1 z_2 = r_1 r_2\,e^{i(\theta_1 + \theta_2)}.

Multiplying two complex numbers multiplies their moduli and adds their arguments — a rotation combined with a rescaling. That geometric picture underlies interference in quantum mechanics, where amplitudes multiply phase factors.

Euler's formula

The bridge between the two forms is Euler's formula:

eiθ=cosθ+isinθ.e^{i\theta} = \cos\theta + i\sin\theta.

This is not a definition — it follows from the Taylor series of exe^x, cosx\cos x, and sinx\sin x evaluated at x=iθx = i\theta:

= \left(1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - \cdots\right) + i\left(\theta - \frac{\theta^3}{3!} + \frac{\theta^5}{5!} - \cdots\right) = \cos\theta + i\sin\theta.$$ Substituting back into $z = re^{i\theta}$ gives $z = r\cos\theta + ir\sin\theta$, which means $$a = r\cos\theta, \qquad b = r\sin\theta.$$ These are the **rectangular-to-polar** and **polar-to-rectangular** conversion formulas. ## A worked example Take $z = 1 + i\sqrt{3}$. **Modulus:** $r = \sqrt{1^2 + (\sqrt{3})^2} = \sqrt{1 + 3} = \sqrt{4} = 2$. **Argument:** $\theta = \operatorname{atan2}(\sqrt{3}, 1) = \dfrac{\pi}{3}$ (since $\cos(\pi/3) = 1/2$ and $2 \cdot 1/2 = 1$, $2\cdot\sqrt{3}/2 = \sqrt{3}$, confirming $a = 1$, $b = \sqrt{3}$). So $1 + i\sqrt{3} = 2\,e^{i\pi/3}$. A quick sanity-check via Euler's formula: $2e^{i\pi/3} = 2(\cos(\pi/3) + i\sin(\pi/3)) = 2(1/2 + i\sqrt{3}/2) = 1 + i\sqrt{3}$. ✓ <Callout type="tip"> In quantum mechanics every state amplitude is a complex number of the form $r e^{i\theta}$. The modulus $r$ determines the probability via the Born rule ($p = r^2$), while the argument $\theta$ — the **phase** — governs interference. Polar form makes both contributions immediately readable. </Callout> ## Converting back to rectangular Given $r$ and $\theta$, recover $a$ and $b$ with $a = r\cos\theta$ and $b = r\sin\theta$. For example, $3\,e^{i\pi/2} = 3(\cos(\pi/2) + i\sin(\pi/2)) = 3(0 + i\cdot 1) = 3i$, which lies on the positive imaginary axis — consistent with a $90°$ rotation. ## Try it This is a numerical exercise — your code should `return` a number, not a circuit. Find the modulus of $z = 1 + i\sqrt{3}$. <RunnableExample />

Sign in on the full site to ask questions and join the discussion.