# de Moivre's theorem

De Moivre's theorem, named after Abraham de Moivre, is a theorem that
links complex numbers and trigonometry.
It states that for any real number *x* and any integer *n*,

(cos *x* + *i*sin *x*)*n* = cos(*nx*) + *i*sin(*nx*)

By expanding the left hand side and then comparing real and imaginary parts,
it is possible to derive useful expressions for cos(*nx*) and sin(*nx*)
in terms of sin(*x*) and cos(*x*). Furthermore, the formula can
be used to find explicit expressions for the *n*th roots
of unity: complex numbers *z* such that *z*^{n} = 1. It can be derived from (but historically preceded) Euler's
formula *e** ^{ix}* = cos

*x*+

*i*sin

*x*and the exponential law (

*e*

*)*

^{ix}*=*

^{n}*e*

*.*

^{inx}