# Root of unity

In mathematics, a **root of unity**, occasionally called a de Moivre number, is any complex number that gives 1 when raised to some positive integer power n. Roots of unity are used in many branches of mathematics, and are especially important in number theory, the theory of group characters, and the discrete Fourier transform.

In field theory and ring theory the notion of root of unity also applies to any ring with a multiplicative identity element. Any algebraically closed field has exactly n nth roots of unity if n is not divisible by the characteristic of the field.

## General definition

An **nth root of unity**, where n is a positive integer (i.e. *n* = 1, 2, 3, …), is a number z satisfying the equation^{[1]}^{[2]}

Traditionally, z is assumed to be a complex number, and subsequent sections of this article will comply with this usage. Generally, *z* ∈ *R* can be considered for any field R, or even for a unital ring. In this general formulation, an nth root of unity is just an element of the group of units of order n. Interesting cases are finite fields and modular arithmetics, for which the article root of unity modulo n contains some information.

An nth root of unity is **primitive** if it is not a kth root of unity for some smaller k:

## Elementary properties

Every *n*th root of unity *z* is a primitive *a*th root of unity for some *a* where 1 ≤ *a* ≤ *n*. In fact, if *z*^{1} = 1 then *z* is a primitive first root of unity, otherwise if *z*^{2} = 1 then *z* is a primitive second (square) root of unity, otherwise, ..., and, as *z* is a root of unity, one eventually finds a first *a* such that *z*^{a} = 1.

If *z* is an *n*th root of unity and *a* ≡ *b* (mod *n*) then *z*^{a} = *z*^{b}. In fact, by the definition of congruence, *a* = *b* + *kn* for some integer *k*, and

Therefore, given a power *z*^{a} of *z*, it can be assumed that 1 ≤ *a* ≤ *n*. This is often convenient.

Any integer power of an *n*th root of unity is also an *n*th root of unity:

Here *k* may be negative. In particular, the reciprocal of an *n*th root of unity is its complex conjugate, and is also an *n*th root of unity:

Let *z* be a primitive *n*th root of unity. Then the powers *z*, *z*^{2}, ..., *z*^{n−1}, *z*^{n} = *z*^{0} = 1 are all distinct. Assume the contrary, that *z*^{a} = *z*^{b} where 1 ≤ *a* < *b* ≤ *n*. Then *z*^{b−a} = 1. But 0 < *b* − *a* < *n*, which contradicts *z* being primitive.

Since an *n*th-degree polynomial equation can only have *n* distinct roots, this implies that the powers of a primitive root *z*, *z*^{2}, ..., *z*^{n−1}, *z*^{n} = *z*^{0} = 1 are all of the *n*th roots of unity.

From the preceding, it follows that if *z* is a primitive *n*th root of unity:

If *z* is not primitive there is only one implication:

An example showing that the converse implication is false is given by:

Let *z* be a primitive *n*th root of unity and let *k* be a positive integer. From the above discussion, *z*^{k} is a primitive *a*th root of unity for some *a*. Now if *z*^{ka} = 1, *ka* must be a multiple of *n*. The smallest number that is divisible by both *n* and *k* is their least common multiple, denoted by lcm(*n*, *k*). It is related to their greatest common divisor, gcd(*n*, *k*), by the formula:

i.e.

Therefore, *z*^{k} is a primitive *a*th root of unity where

Thus, if *k* and *n* are coprime, *z ^{k}* is also a primitive

*n*th root of unity, and therefore there are

*φ*(

*n*) (where

*φ*is Euler's totient function) distinct primitive

*n*th roots of unity. (This implies that if

*n*is a prime number, all the roots except +1 are primitive.)

In other words, if R(*n*) is the set of all *n*th roots of unity and P(*n*) is the set of primitive ones, R(*n*) is a disjoint union of the P(*n*):

where the notation means that *d* goes through all the divisors of *n*, including 1 and *n*.

Since the cardinality of R(*n*) is *n*, and that of P(*n*) is *φ*(*n*), this demonstrates the classical formula

## Group properties

### Group of all roots of unity

The product and the multiplicative inverse of two roots of the unity are also roots of unity. In fact, if and then and where *k* is the least common multiple of *m* and *n*.

Therefore, the roots of unity form an abelian group under multiplication. This group is the torsion subgroup of the circle group

### Group of *n*th roots of unity

The product and the multiplicative inverse of two *n*th roots of the unity are also *n*th roots of unity. Therefore, the *n*th roots of unity form a group under multiplication.

Given a primitive *n*th root of unity the other *n*th roots are powers of . This means that the group of the *n*th roots of unity is a cyclic group. It is worth to remark that the term of *cyclic group* originated from the fact that this group is a subgroup of the circle group.

### Galois group of the primitive *n*th roots of unity

Let be the field extension of the rational numbers by a primitive *n*th root of unity. As every *n*th root of unity is a power of the field contains all *n*th roots of unity.

If *k* is an integer, is a primitive *n*th root of unity if and only if *k* and *n* are coprime. In this case, the map

induces an automorphism of which maps every *n*th root of unity to its *n*th power. Every automorphism of is obtained in this way, and these automorphisms form the Galois group of over the field of the rationals.

The rules of exponentiation imply that the composition of two such automorphisms is obtained by multiplying the exponents. It follows that the map

defines a group isomorphism of the units in the ring of integers modulo *n* onto the group of automorphisms of As the group of units in the integers modulo *n* is cyclic, the same is true for the Galois group of over the field of the rationals.

## Trigonometric expression

De Moivre's formula, which is valid for all real x and integers n, is

Setting *x* = 2π/*n* gives a primitive nth root of unity:

but for *k* = 1, 2, ⋯ , *n* − 1,

This formula shows that on the complex plane the nth roots of unity are at the vertices of a regular n-sided polygon inscribed in the unit circle, with one vertex at 1. (See the plots for *n* = 3 and *n* = 5 on the right.) This geometric fact accounts for the term "cyclotomic" in such phrases as cyclotomic field and cyclotomic polynomial; it is from the Greek roots "cyclo" (circle) plus "tomos" (cut, divide).

which is valid for all real x, can be used to put the formula for the nth roots of unity into the form

It follows from the discussion in the previous section that this is a primitive nth-root if and only if the fraction *k*/*n* is in lowest terms, i.e. that k and n are coprime.

## Algebraic expression

The *n*th roots of unity are, by definition, the roots of the polynomial and are thus algebraic numbers. As this polynomial is not irreducible (except for *n* = 1), the primitive *n*th roots of unity are roots of an irreducible polynomial of lower degree, called cyclotomic polynomial, and often denoted The degree of is the Euler's totient function, which counts (among other things) the number of primitive *n*th roots of unity. The roots of are exactly the primitive *n*th roots of unity.

Galois theory can be used to show that cyclotomic polynomials may be solved in terms of radicals, and thus that the roots of unity may be expressed as expressions involving integers and the operations of addition, subtraction, multiplication, division, and the extraction of roots. (For more details see § Cyclotomic fields, below.)

For *n* = 1, the cyclotomic polynomial is Therefore, the only primitive first root of unity is 1, which is a non-primitive *n*th root of unity for every *n* greater than 1.

We have Thus −1 is the only primitive second (square) root of unity, which is also a non-primitive *n*th root of unity for every even *n* greater than 2.

The only real roots of unity are 1 and −1; all the others are non-real complex numbers.

We have Thus the primitive third (cube) roots of unity are the roots of this quadratic equation and are

As the two primitive fourth roots of unity are *i* and −*i*.

As the four primitive fifth roots of unity are the roots of this quartic polynomial, which may be explicitly solved in terms of radicals, giving the roots

As there are two primitive sixth roots of unity, which are the negatives (and also the square roots) of the two primitive cube roots:

Gauss proved that a primitive nth root of unity can be expressed using only square roots, additions, subtractions multiplications and division, if and only if it is possible to construct with compass and straightedge the regular n-gon. This is the case if and only if *n* is either a power of two or the product of a power of two and Fermat primes that are all different.

As 7 is not a Fermat prime, the 7th roots of unity are the first that require cube roots. There are six primitive 7th roots of unity; thus their computation involves solving a cubic polynomial, and therefore computing a cube root. The three real parts of these primitive roots are the roots of a cubic polynomial; thus they may be expressed in terms of square and cube roots. However, as these three roots are real, we are in the case of casus irreducibilis, and any expression of these real parts in terms of radicals involves necessarily some nonreal complex number.

As , the four primitive eighth roots of unity are the square roots of the primitive fourth roots, ±*i*. They are thus

See heptadecagon for the real part of a 17th root of unity.

## Periodicity

If z is a primitive nth root of unity, then the sequence of powers

- … ,
*z*^{−1},*z*^{0},*z*^{1}, …

is n-periodic (because *z*^{ j + n} = *z*^{ j}⋅*z*^{ n} = *z*^{ j}⋅1 = *z*^{ j} for all values of j), and the n sequences of powers

*s*: … ,_{k}*z*^{ k⋅(−1)},*z*^{ k⋅0},*z*^{ k⋅1}, …

for *k* = 1, … , *n* are all n-periodic (because *z*^{ k⋅(j + n)} = *z*^{ k⋅j}). Furthermore, the set {*s*_{1}, … , *s _{n}*} of these sequences is a basis of the linear space of all n-periodic sequences. This means that

*any*n-periodic sequence of complex numbers

- … ,
*x*_{−1},*x*_{0},*x*_{1}, …

can be expressed as a linear combination of powers of a primitive nth root of unity:

for some complex numbers *X*_{1}, … , *X*_{n} and every integer j.

This is a form of Fourier analysis. If j is a (discrete) time variable, then k is a frequency and *X*_{k} is a complex amplitude.

Choosing for the primitive nth root of unity

*z*=*e*^{2πi/n}= cos(2π/*n*) +*i*⋅sin(2π/*n*)

allows *x*_{j} to be expressed as a linear combination of cos and sin:

*x*_{j}= ∑_{k}*A*_{k}⋅cos(2π⋅*j*⋅*k*/*n*) + ∑_{k}*B*_{k}⋅sin(2π⋅*j*⋅*k*/*n*).

This is a discrete Fourier transform.

## Summation

Let SR(*n*) be the sum of all the nth roots of unity, primitive or not. Then

For *n* = 1 there is nothing to prove. For *n* > 1, it is "intuitively obvious" from the symmetry of the roots in the complex plane. For a rigorous proof, let z be a primitive nth root of unity. Then the set of all roots is given by *z*^{k}, *k* = 0, 1, … , *n* − 1, and their sum is given by the formula for a geometric series:

Let SP(*n*) be the sum of all the primitive nth roots of unity. Then

where μ(*n*) is the Möbius function.

In the section Elementary facts, it was shown that if R(*n*) is the set of all nth roots of unity and P(*n*) is the set of primitive ones, R(*n*) is a disjoint union of the P(*n*):

This implies

Applying the Möbius inversion formula gives

In this formula, if *d* < *n*, then SR(*n*/*d*) = 0, and for *d* = *n*: SR(*n*/*d*) = 1. Therefore, SP(*n*) = *μ*(*n*).

This is the special case *c*_{n}(1) of Ramanujan's sum *c*_{n}(*s*), defined as the sum of the sth powers of the primitive nth roots of unity:

## Orthogonality

From the summation formula follows an orthogonality relationship: for *j* = 1, … , *n* and *j′* = 1, … , *n*

where δ is the Kronecker delta and z is any primitive nth root of unity.

The *n* × *n* matrix U whose (*j*, *k*)th entry is

defines a discrete Fourier transform. Computing the inverse transformation using gaussian elimination requires *O*(*n*^{3}) operations. However, it follows from the orthogonality that U is unitary. That is,

and thus the inverse of U is simply the complex conjugate. (This fact was first noted by Gauss when solving the problem of trigonometric interpolation). The straightforward application of U or its inverse to a given vector requires *O*(*n*^{2}) operations. The fast Fourier transform algorithms reduces the number of operations further to *O*(*n* log *n*).

## Cyclotomic polynomials

The zeroes of the polynomial

are precisely the nth roots of unity, each with multiplicity 1. The nth **cyclotomic polynomial** is defined by the fact that its zeros are precisely the *primitive* nth roots of unity, each with multiplicity 1.

where *z*_{1}, *z*_{2}, *z*_{3}, … ,*z*_{φ(n)} are the primitive nth roots of unity, and φ(*n*) is Euler's totient function. The polynomial Φ_{n}(*z*) has integer coefficients and is an irreducible polynomial over the rational numbers (i.e., it cannot be written as the product of two positive-degree polynomials with rational coefficients). The case of prime n, which is easier than the general assertion, follows by applying Eisenstein's criterion to the polynomial

and expanding via the binomial theorem.

Every nth root of unity is a primitive dth root of unity for exactly one positive divisor d of n. This implies that

This formula represents the factorization of the polynomial *z*^{n} − 1 into irreducible factors.

*z*^{1}− 1 =*z*− 1*z*^{2}− 1 = (*z*− 1)⋅(*z*+ 1)*z*^{3}− 1 = (*z*− 1)⋅(*z*^{2}+*z*+ 1)*z*^{4}− 1 = (*z*− 1)⋅(*z*+ 1)⋅(*z*^{2}+ 1)*z*^{5}− 1 = (*z*− 1)⋅(*z*^{4}+*z*^{3}+*z*^{2}+*z*+ 1)*z*^{6}− 1 = (*z*− 1)⋅(*z*+ 1)⋅(*z*^{2}+*z*+ 1)⋅(*z*^{2}−*z*+ 1)*z*^{7}− 1 = (*z*− 1)⋅(*z*^{6}+*z*^{5}+*z*^{4}+*z*^{3}+*z*^{2}+*z*+ 1)*z*^{8}− 1 = (*z*− 1)⋅(*z*+ 1)⋅(*z*^{2}+ 1)⋅(*z*^{4}+ 1)

Applying Möbius inversion to the formula gives

where *μ* is the Möbius function.

So the first few cyclotomic polynomials are

- Φ
_{1}(*z*) =*z*− 1 - Φ
_{2}(*z*) = (*z*^{2}− 1)⋅(*z*− 1)^{−1}=*z*+ 1 - Φ
_{3}(*z*) = (*z*^{3}− 1)⋅(*z*− 1)^{−1}=*z*^{2}+*z*+ 1 - Φ
_{4}(*z*) = (*z*^{4}− 1)⋅(*z*^{2}− 1)^{−1}=*z*^{2}+ 1 - Φ
_{5}(*z*) = (*z*^{5}− 1)⋅(*z*− 1)^{−1}=*z*^{4}+*z*^{3}+*z*^{2}+*z*+ 1 - Φ
_{6}(*z*) = (*z*^{6}− 1)⋅(*z*^{3}− 1)^{−1}⋅(*z*^{2}− 1)^{−1}⋅(*z*− 1) =*z*^{2}−*z*+ 1 - Φ
_{7}(*z*) = (*z*^{7}− 1)⋅(*z*− 1)^{−1}=*z*^{6}+*z*^{5}+*z*^{4}+*z*^{3}+*z*^{2}+*z*+ 1 - Φ
_{8}(*z*) = (*z*^{8}− 1)⋅(*z*^{4}− 1)^{−1}=*z*^{4}+ 1

If p is a prime number, then all the pth roots of unity except 1 are primitive pth roots, and we have

Substituting any positive integer ≥ 2 for z, this sum becomes a base z repunit. Thus a necessary (but not sufficient) condition for a repunit to be prime is that its length be prime.

Note that, contrary to first appearances, *not* all coefficients of all cyclotomic polynomials are 0, 1, or −1. The first exception is Φ_{105}. It is not a surprise it takes this long to get an example, because the behavior of the coefficients depends not so much on n as on how many odd prime factors appear in n. More precisely, it can be shown that if n has 1 or 2 odd prime factors (e.g., *n* = 150) then the nth cyclotomic polynomial only has coefficients 0, 1 or −1. Thus the first conceivable n for which there could be a coefficient besides 0, 1, or −1 is a product of the three smallest odd primes, and that is 3⋅5⋅7 = 105. This by itself doesn't prove the 105th polynomial has another coefficient, but does show it is the first one which even has a chance of working (and then a computation of the coefficients shows it does). A theorem of Schur says that there are cyclotomic polynomials with coefficients arbitrarily large in absolute value. In particular, if *n* = *p*_{1}⋅*p*_{2}⋅ ⋯ ⋅*p*_{t}, where *p*_{1} < *p*_{2} < ⋯ < *p*_{t} are odd primes, *p*_{1} + *p*_{2} > *p*_{t}, and *t* is odd, then 1 − *t* occurs as a coefficient in the nth cyclotomic polynomial.^{[3]}

Many restrictions are known about the values that cyclotomic polynomials can assume at integer values. For example, if p is prime and *d* ∣ Φ_{p}(*d*), then either *d* ≡ 1 (mod *p*), or *d* ≡ 0 (mod *p*).

Cyclotomic polynomials are solvable in radicals, as roots of unity are themselves radicals. Moreover, there exist more informative radical expressions for nth roots of unity with the additional property^{[4]} that every value of the expression obtained by choosing values of the radicals (for example, signs of square roots) is a primitive nth root of unity. This was already shown by Gauss in 1797.^{[5]} Efficient algorithms exist for calculating such expressions.^{[6]}

## Cyclic groups

The nth roots of unity form under multiplication a cyclic group of order n, and in fact these groups comprise all of the finite subgroups of the multiplicative group of the complex number field. A generator for this cyclic group is a primitive nth root of unity.

The nth roots of unity form an irreducible representation of any cyclic group of order n. The orthogonality relationship also follows from group-theoretic principles as described in character group.

The roots of unity appear as entries of the eigenvectors of any circulant matrix, i.e. matrices that are invariant under cyclic shifts, a fact that also follows from group representation theory as a variant of Bloch's theorem.^{[7]} In particular, if a circulant Hermitian matrix is considered (for example, a discretized one-dimensional Laplacian with periodic boundaries^{[8]}), the orthogonality property immediately follows from the usual orthogonality of eigenvectors of Hermitian matrices.

## Cyclotomic fields

By adjoining a primitive nth root of unity to **Q**, one obtains the nth cyclotomic field **Q**(exp(2π*i*/*n*)). This field contains all nth roots of unity and is the splitting field of the nth cyclotomic polynomial over **Q**. The field extension **Q**(exp(2π*i*/*n*))/**Q** has degree φ(*n*) and its Galois group is naturally isomorphic to the multiplicative group of units of the ring **Z**/*n***Z**.

As the Galois group of **Q**(exp(2π*i*/*n*))/**Q** is abelian, this is an abelian extension. Every subfield of a cyclotomic field is an abelian extension of the rationals. It follows that every *n*th root of unity may be expressed in term of *k*-roots, with various *k* not exceeding *φ(n)*. In these cases Galois theory can be written out explicitly in terms of Gaussian periods: this theory from the *Disquisitiones Arithmeticae* of Gauss was published many years before Galois.^{[9]}

Conversely, *every* abelian extension of the rationals is such a subfield of a cyclotomic field – this is the content of a theorem of Kronecker, usually called the *Kronecker–Weber theorem* on the grounds that Weber completed the proof.

## Relation to quadratic integers

For *n* = 1, 2, both roots of unity 1 and −1 belong to **Z**.

For three values of n, the roots of unity are quadratic integers:

- For
*n*= 3, 6 they are Eisenstein integers (*D*= −3). - For
*n*= 4 they are Gaussian integers (*D*= −1): see imaginary unit.

For four other values of n, the primitive roots of unity are not quadratic integers, but the sum of any root of unity with its complex conjugate (also a nth root of unity) is a quadratic integer.

For *n* = 5, 10, neither of non-real roots of unity (which satisfy a quartic equation) is a quadratic integer, but the sum *z* + *z* = 2 Re*z* of each root with its complex conjugate (also a 5th root of unity) is an element of the ring **Z**[1 + √5/2] (*D* = 5). For two pairs of non-real 5th roots of unity these sums are inverse golden ratio and minus golden ratio.

For *n* = 8, for any root of unity *z* + *z* equals to either ±2, 0, or ±√2 (*D* = 2).

For *n* = 12, for any root of unity, *z* + *z* equals to either 0, ±1, ±2 or ±√3 (*D* = 3).

## See also

- Argand system
- Circle group, the unit complex numbers
- Group scheme of roots of unity
- Primitive root modulo
*n* - Dirichlet character
- Ramanujan's sum
- Kummer ring
- Witt vector
- Teichmüller character

## Notes

- ↑ Hadlock, Charles R. (2000).
*Field Theory and Its Classical Problems, Volume 14*. Cambridge University Press. pp. 84–86. ISBN 978-0-88385-032-9. - ↑ Lang, Serge (2002). "Roots of unity".
*Algebra*. Springer. pp. 276–277. ISBN 978-0-387-95385-4. - ↑ Emma Lehmer,
*On the magnitude of the coefficients of the cyclotomic polynomial*, Bulletin of the American Mathematical Society 42 (1936), no. 6, pp. 389–392. - ↑ Landau, Susan; Miller, Gary L. (1985). "Solvability by radicals is in polynomial time".
*Journal of Computer and System Sciences*.**30**(2): 179–208. doi:10.1016/0022-0000(85)90013-3. - ↑ Gauss, Carl F. (1965).
*Disquisitiones Arithmeticae*. Yale University Press. pp. §§359–360. ISBN 0-300-09473-6. - ↑ Weber, Andreas; Keckeisen, Michael. "Solving Cyclotomic Polynomials by Radical Expressions" (PDF). Retrieved 2007-06-22.
- ↑ T. Inui, Y. Tanabe, and Y. Onodera,
*Group Theory and Its Applications in Physics*(Springer, 1996). - ↑ Gilbert Strang, "The discrete cosine transform,"
*SIAM Review***41**(1), 135–147 (1999). - ↑ The
*Disquisitiones*was published in 1801, Galois was born in 1811, died in 1832, but wasn't published until 1846.

## References

- Lang, Serge (2002),
*Algebra*, Graduate Texts in Mathematics,**211**(Revised third ed.), New York: Springer-Verlag, ISBN 978-0-387-95385-4, Zbl 0984.00001, MR 1878556 - Milne, James S. (1998). "Algebraic Number Theory".
*Course Notes*. - Milne, James S. (1997). "Class Field Theory".
*Course Notes*. - Neukirch, Jürgen (1999).
*Algebraic Number Theory*. Grundlehren der mathematischen Wissenschaften.**322**. Berlin: Springer-Verlag. ISBN 978-3-540-65399-8. Zbl 0956.11021. MR 1697859. - Neukirch, Jürgen (1986).
*Class Field Theory*. Berlin: Springer-Verlag. ISBN 3-540-15251-2. - Washington, Lawrence C. (1997).
*Cyclotomic fields*(2nd ed.). New York: Springer-Verlag. ISBN 0-387-94762-0. - Derbyshire, John (2006). "Roots of Unity".
*Unknown Quantity*. Washington, D.C.: Joseph Henry Press. ISBN 0-309-09657-X.

## Further reading

- Storer, Thomas (1967).
*Cyclotomy and difference sets*. Chicago: Markham Publishing Company. Zbl 0157.03301.