Roots of complex numbers

Consider $z=a+ib$ a nonzero complex number. The number $z$ can be written in polar form as
$z=r(\cos \theta +i \sin \theta)$
where $r=\sqrt{a^2+b^2}$ and $\theta$ is the angle, in radians, from the positive $x$-axis to the ray connecting the origin to the point $z$.

Now, de Moivre's formula establishes that if $z=r(\cos \theta +i\sin \theta)$ and $n$ is a positive integer, then
$z^n=r^n(\cos n\theta+i\sin n\theta).$
Let $w$ be a complex number. Using de Moivre's formula will help us to solve the equation $z^n=w$ for $z$ when $w$ is given. Suppose that $w=r(\cos \theta +i\sin \theta)$ and $z=\rho (\cos \psi +i\sin \psi)$. Then de Moivre's formula gives $z^n=\rho^n(\cos n\psi+i\sin n\psi)$. It follows that $\rho^n=r=|w|$ by uniqueness of the polar representation and $n\psi = \theta +k(2\pi)$, where $k$ is some integer. Thus
$z=\sqrt[n]{r}\left[\cos\left(\frac{\theta}{n}+\frac{2k\pi}{n}\right)+i\sin\left(\frac{\theta}{n}+\frac{2k\pi}{n}\right) \right]$
Each value of $k=0,1,2,\ldots ,n-1$ gives a different value of $z$. Any other value of $k$ merely repeats one of the values of $z$ corresponding to $k=0,1,2,\ldots ,n-1$. Thus there are exactly $n$th roots of a nonzero complex number.

The complex number $z$ can also be written in exponential form as
$z=re^{i\theta}$
because $e^{i\theta}=\cos \theta +i \sin \theta$.

Thus, the $n$th roots of a nonzero complex number $z$ can also be expressed as
$z=\sqrt[n]{r}\;\mbox{exp}\left[i\left(\frac{\theta}{n}+\frac{2k\pi}{n}\right)\right]$
where $k=0, 1, 2, \ldots , n-1$.

In the following applet you can see a geometrical representation of the $n$th roots for a family of complex numbers. Change the values of the real and imaginary parts of $z$ and the $n$th root. Some examples are:
1. Re(z)=1/2, Im(z)=1.72, n=3;
2. Re(z)=sqrt(2), Im(z)=pi, n=7.

External link to GeoGebra applet: http://tube.geogebra.org/student/m298919