It comes from Euler's formula - http://en.wikipedia.org/wiki/Euler's_formula

e^(i theta) == cos(theta) + i sin(theta)

e^(i theta) == cos(theta) + i sin(theta)