Polar form of a complex number (source code)

= Polar form of a complex number
{title2=$z=re^{i\theta}$}

= Polar form
{synonym}

A nonzero <complex number> has <polar form>
$$
z=r(\cos\theta+i\sin\theta)=re^{i\theta},\qquad r=|z|>0,
$$
where $r$ is its <modulus> and $\theta$ is an <argument>. The equality uses <Euler's formula>; <sine> and <cosine> recover the <imaginary part> and <real part> from <polar coordinates>. For $z=3+4i$, take $r=5$ and $\theta=\arctan(4/3)\approx0.927295$ <radians>, so $\cos\theta=3/5$ and $\sin\theta=4/5$.

If $w=se^{i\phi}\ne0$, then
$$
zw=rs e^{i(\theta+\phi)},\qquad \frac zw=\frac rs e^{i(\theta-\phi)}.
$$
Thus <multiplication> multiplies <moduli> and adds <arguments> modulo $2\pi$; <division> divides <moduli> and subtracts <arguments> modulo $2\pi$. Since $1+i=\sqrt2 e^{i\pi/4}$, multiplying $3+4i$ by $1+i$ gives $-1+7i$, of <modulus> $5\sqrt2$ and <argument> $\theta+\pi/4\approx1.712693$ <radians>. One formula simultaneously describes its new size and direction.

\Image[/complex-polar-multiplication.png]
{title=Complex multiplication rotates every direction and scales every length equally}

Repeated <multiplication> now becomes especially simple: $(re^{i\theta})^n=r^n e^{in\theta}$ for a positive <integer> $n$. This explains the evenly spaced <arguments> of the <roots of a complex number>. For example, $(3+4i)^2=-7+24i$ has <modulus> $25$ and principal <argument> $2\theta\approx1.854590$ <radians>. The Cartesian calculation and the <polar form> provide independent checks on both its location and its size. Choose <polar form> when the task concerns <multiplication>, <division>, or repeated turns; use <real parts> and <imaginary parts> for <addition>.