In mathematics, a complex number z is called an nth root of unity if zn = 1 (here, n is a positive integer).
For every positive integer n, there are n different nth roots of unity. For example, the third roots of unity are 1, -1/2 +i√3 /2 and -1/2 - i√3 /2. In general, the n-th roots of unity can be written as:
for j = 0, ..., n-1; this is a consequence of Euler's identity. Geometrically, the n-th roots of unity are located on the unit circle in the complex plane, forming the corners of a regular n-gon.
The n-th roots of unity form a group under multiplication of complex numbers. This group is cyclic. A generator of this group is called a primitive nth root of unity. The primitive nth roots of unity are precisely the numbers of the form exp(2πij/n) where j and n are coprime. Therefore, there are φ(n) different primitive nth roots of unity, where φ(n) denotes Euler's phi function.
The nth roots of unity are precisely the zeros of the polynomial p(X) = Xn - 1; the primitive nth roots of unity are precisely the zeros of the nth cyclotomic polynomial
where the product extends over all primitive nth roots of unity. Φn(x) has integer coefficients and is irreducible over the real field (i.e., cannot be written as a product of two positive-degree polynomials with real coefficients).