Cyclotomic Polynomials
Cyclotomic Polynomials
Cyclotomic Polynomials
These notes prove the existence of primitive elements in a very different way than
the treatment in the textbook. Along the way we develop the theory of cyclotomic
polynomials and prove some nice statements about quadratic residues.
Introduction to Fields
Here we briefly review the definition of a field, and we extend the notion of the order
of an element to arbitrary fields.
Recall that a binary operation on a set S is a function S × S → S, i.e. a
function that takes two elements of S as input and outputs an element of S. Some
binary operations have certain special properties:
(x ∗ y) ∗ z = x ∗ (y ∗ z)
for all x, y, z ∈ S.
x∗y = y∗x
for all x, y ∈ S.
x∗e = e∗x = x
for all x ∈ S.
Fields and Cyclotomic Polynomials 2
Definition: Field
A field is a set F with at least two elements having two binary operations:
For any field F, we will let F× denote the set F − {0}. Thus every element of F×
has a multiplicative inverse.
For those familiar with group theory, axiom (1) says that a field forms an abelian
group under addition, and axiom (2) implies that F× forms an abelian group under
multiplication. Axiom (3) says that these two group structures are in a certain sense
compatible with one another.
Some examples of fields include:
• The rational numbers Q, under the usual operations of addition and multipli-
cation.
• The real numbers R, under the usual operations of addition and multiplication.
• The algebraic numbers A, under the usual operations of addition and multipli-
cation.
Fields and Cyclotomic Polynomials 3
• The complex numbers C, under the usual operations of addition and multipli-
cation.
• For any prime p, the set Zp = {0, 1, . . . , p − 1}, under the operations of addition
and multiplication modulo p.
Of these examples, only Zp is a finite field, meaning that it has a finite number of
elements.
We now offer a few additional examples of fields.
Note here that a2 − 2b2 can never be 0 if a and b are rational numbers.
EXAMPLE 2 Note that −1 (= 2) has no square root in the field Z3 . Consider the
set
Here we have added a new element i to Z3 whose square is −1, in the same way that
one adjoins a square root of −1 to R to obtain C. The result is a set with exactly 9
elements (since there are three choices each for a and b).
We can define an addition operation on Z3 (i) by
It is easy to check that these operations are associative and commutative, and have
identity elements. Each element a + bi has an additive inverse −a − bi. It is less
obvious that every element Z3 (i)× has a multiplicative inverse, but indeed
Though we will not be able to prove it here, finite fields have been completely
classified.
1. For each prime p and each n ≥ 1, there exists a finite field with exactly pn
elements.
2. Any two finite fields with the same number of elements are isomorphic.
Here two fields are isomorphic if the only difference between them is the names of
the elements, i.e. if there exists a bijection between them that preserves the algebraic
operations. For example, let Z5 = {0, 1, 2, 3, 4}, and let F = {−2, −1, 0, 1, 2} under
the operations of addition and multiplication modulo 5. Then F is isomorphic to Z5 ,
with the corresponding bijection being
0 7→ 0, 1 7→ 1, 2 7→ 2, −2 7→ 3, −1 7→ 4.
Indeed, according to the theorem above, any field with exactly 5 elements must be
isomorphic to Z5 .
Though the above theorem states that there is a finite field with pn elements
for any prime power pn , the only finite fields we have seen so far are the fields Zp ,
which have a prime number of elements, and the field Z3 (i), which has 9 elements.
In general, if p is prime and a ∈ Zp is not a quadratic residue, then one can obtain a
field with p2 elements by adjoining a square root of a to Zp . For example:
• Z7 (i) is a field with 72 = 49 elements, and Z11 (i) is a field with 112 = 121
elements. However, the field with 25 elements cannot be described as Z5 (i),
since −1 already has a square root in Z5 .
√
• The field with 25 elements can be described as Z5 2 , since 2 has no square
√
root in Z5 . Similarly, Z13 2 is a field with 132 = 169 elements.
Fields and Cyclotomic Polynomials 5
Orders of Elements
The idea of the order of an element can be extended to any field.
For example, the only elements of R× that have finite order are 1 and −1, with
ordR (1) = 1 and ordR (−1) = 2.
By the way, in the case of Zp , we use the same notation is the textbook and write
ordp (a) instead of ordZp (a) for the order of an element a ∈ Z×
p.
Let F be a field, let a ∈ F× , and let n ≥ 1. Then an = 1 if and only if ordF (a) | n.
Fields and Cyclotomic Polynomials 6
an = amk = (ak )m = 1m = 1.
im + jk = gcd(m, k)
Then
agcd(m,k) = aim+jk = (am )i (ak )j = 1i 1j = 1.
Then gcd(m, k) must be greater than or equal to k, so it follows that gcd(m, k) = k,
and hence k | m.
Let F be a field, let a ∈ F, and suppose that ordF (a) = k. Then for any n ≥ 1,
k
ordF (an ) = .
gcd(n, k)
PROOF By the previous proposition, (an )m = 1 if and only if k | mn. This occurs
if and only if m is a multiple of k/ gcd(n, k).
One of the most important properties of Zp is Fermat’s little theorem, which states
that ap−1 = 1 for every a ∈ Z×p . By Proposition 3, the order of any element of Zp
×
must be a divisor of p − 1.
The following proposition generalizes Fermat’s little theorem to any finite field.
am−1 = 1
for every a ∈ F× .
Fields and Cyclotomic Polynomials 7
PROOF This follows from Lagrange’s theorem in group theory. Specifically, the
group F× has |F| − 1 elements, so the multiplicative order of each element must be a
divisor of |F| − 1.
For example, recall that the field Z7 (i) has 49 elements. According to the above
theorem,
(a + bi)48 = 1
for any element a + bi ∈ Z7 (i).
Corollary 6
Roots of Unity
ζ n = 1.
For example, 1 is the only first root of unity, and 1 and −1 are the only square
roots of unity. It is easy to check that
1, i, −1, and −i
are fourth roots of unity, and indeed these are the only possibilities.
For any positive integer n, there are exactly n different nth roots of unity, namely
the numbers
2kπi/n 2kπ 2kπ
e = cos + i sin
n n
for 0 ≤ k < n.
Fields and Cyclotomic Polynomials 8
PROOF Note first that the n different numbers e2kπi/n for 0 ≤ k < n are all distinct,
since they lie on the unit circle in the complex plane at angles of 2kπ/n from the origin.
Each of these numbers is an nt root of unity, since
n
e2kπi/n = e2kπi = 1
for all k. But since any nth root of unity is a root of the polynomial z n − 1, which
has degree n, there can be at most n different nth roots of unity, and therefore the
numbers e2kπi/n for 0 ≤ k < n are the only possibilities.
EXAMPLE 1 The cube roots of unity consist of the number 1 together with
√ √
2πi/3 −1 + i 3 2 4πi/3 −1 − i 3
ω = e = and ω = e = .
2 2
Note that ω and ω 2 lie on the unit circle in the complex plane at angles of 2π/3 = 120◦
and 4π/3 = 240◦ , respectively.
We saw in the last example that the sixth roots of unity include elements of orders
1, 2, 3, and 6. The following proposition generalizes this observation.
Let ζ ∈ C and let n ≥ 1. Then ζ is an nth root of unity if and only if ordC (ζ) | n.
ζ = ωk
be an nth root of unity. Then ζ is a primitive nth root of unity if and only if
gcd(k, n) = 1.
For each n ≥ 1, there are exactly φ(n) primitive nth roots of unity.
Combining this with Corollary 9, we obtain the following interesting formula in-
volving the totient function.
For example,
φ(1) + φ(2) + φ(4) = 1 + 1 + 2 = 4
and
φ(1) + φ(2) + φ(3) + φ(6) = 1 + 1 + 2 + 2 = 6.
Fields and Cyclotomic Polynomials 11
Cyclotomic Polynomials
where P (n) denotes the set of all primitive nth roots of unity.
For example:
• Since P (1) = {1} and P (2) = {−1}, the first and second cyclotomic polynomials
are respectively
Φ4 (x) = (x − i)(x + i) = x2 + 1.
In general, since there are exactly φ(n) primitive nth roots of unity, the nth cyclo-
tomic polynomial always has degree φ(n). Table 1.1 shows the first ten cyclotomic
polynomials.
The following proposition is fundamental to the theory of cyclotomic polynomials.
n Φn (x) n Φn (x)
1 x−1 6 x2 − x + 1
2 x+1 7 x6 + x5 + x4 + x3 + x2 + x + 1
3 x2 + x + 1 8 x4 + 1
4 x2 + 1 9 x6 + x3 + 1
5 x4 + x3 + x 2 + x + 1 10 x4 − x3 + x 2 − x + 1
Table 1.1: The first ten cyclotomic polynomials.
Fields and Cyclotomic Polynomials 12
PROOF The roots of xn − 1 are precisely the nth roots of unity. But every nth
root of unity is a primitive dth root of unity for some divisor d of n, and these are
precisely the roots of the product on the right.
For example,
• x2 − 1 = Φ1 (x) Φ2 (x) = (x − 1)(x + 1).
• x3 − 1 = Φ1 (x) Φ3 (x) = (x − 1) x2 + x + 1 .
• x4 − 1 = Φ1 (x) Φ2 (x) Φ4 (x) = (x − 1)(x + 1) x2 + 1 .
• x5 − 1 = Φ1 (x) Φ5 (x) = (x − 1) x4 + x3 + x2 + x + 1 .
• x6 − 1 = Φ1 (x) Φ2 (x) Φ3 (x) Φ6 (x) = (x − 1)(x + 1) x2 + x + 1 x2 − x + 1 .
We can use the fundamental relation to compute the cyclotomic polynomials induc-
tively. The following example illustrates this technique.
In addition to being useful for computation, the fundamental relation also al-
lows us to prove things about the cyclotomic polynomials inductively. The following
proposition illustrates this technique.
Since the cyclotomic polynomials are monic and have integer coefficients, it follows
immediately that their roots (i.e. the roots of unity) are algebraic integers.
Regarding the coefficients, you may have noticed that each of the cyclotomic
polynomials in Table 1.1 has the property that all of its coefficients are either 0, 1,
or −1. It turns out that this pattern holds for Φn (x) whenever n has at most two
odd prime factors, but in general the coefficients of Φn (x) can be arbitrary integers.
Since 3 × 5 × 7 = 105, the first such example is Φ105 (x), which has two coefficients
of −2.
Incidentally, it is a theorem of Gauss that every cyclotomic polynomial is actually
irreducible over Q, meaning that it cannot be factored into polynomials of smaller
degree that have rational coefficients. It follows that the fundamental relation
Y
xn − 1 = Φd (x).
d|n
and
Φ2p (x) = xp−1 − xp−2 + · · · − x + 1.
xp − 1 xp − 1
Φp (x) = = = xp−1 + xp−2 + · · · + x + 1.
Φ1 (x) x−1
Moreover,
x2p − 1 x2p − 1
Φ2p (x) = = p
Φ1 (x) Φ2 (x) Φp (x) (x − 1) Φ2 (x)
x2p − 1 xp + 1
= = = xp−1 − xp−2 + · · · − x + 1.
(xp − 1) (x + 1) x+1
For example,
and
Φ14 (x) = x6 − x5 + x4 − x3 + x2 − x + 1.
nk nk
ordF (ak ) = = = n.
gcd(k, nk) k
Fields and Cyclotomic Polynomials 15
For the converse, suppose that ordF (ak ) = n, and let m = ordF (a). By Corollary 4,
we know that
m
ordF (ak ) =
gcd(m, k)
so
m
= n.
gcd(m, k)
Since k | n and m = n gcd(m, k), we know that k | m, and therefore gcd(m, k) = k.
It follows that m = nk.
and
Φ64 (x) = Φ8 (x8 ) = (x8 )4 + 1 = x32 + 1.
Primitive Elements
The notion of a primitive element makes perfect sense over any finite field.
We shall now use cyclotomic polynomials to prove the existence of primitive ele-
ments. We begin with the following theorem.
Fields and Cyclotomic Polynomials 16
Let F be a field, let a ∈ F× , and suppose that ordF (a) = n. Then Φn (a) = 0.
But for d < n, the polynomial Φd (x) is also a factor of xd − 1. Since a is not a
root of xd − 1 for any d < n, it follows that Φd (a) 6= 0 for any d < n, and therefore
Φn (a) = 0.
Φ3 (4) = 42 + 4 + 1 ≡ 0 (mod 7)
as well. Indeed,
x2 + x + 1 ≡ (x − 2)(x − 4) (mod 7).
By the way, the converse of the previous theorem does not hold in general. For
example,
Φ2 (1) ≡ 0 (mod 2),
but 1 does not have order two in Z2 . Similarly,
PROOF For each divisor d of m − 1, let R(d) be the set of all roots of Φd (x) in F× .
By the previous proposition, if a ∈ F× has order d, then d ∈ R(d). By Lagrange’s
theorem for finite fields, we know that the order of a divides m − 1 for all a ∈ F× ,
and hence [
R(d) = F× .
d | m−1
But since each Φd (x) has degree φ(d), we know that |R(d)| ≤ φ(d) for each d. By
Corollary 12, we have X
φ(d) = m − 1 = |F× |,
d | m−1
so indeed |R(d)| = φ(d) for each d | m − 1, Moreover, these sets must all be disjoint,
so each element a ∈ F× of order d lies only in R(d), and therefore each element of
R(d) must have order d.
Let F be a finite field with m elements. Then F has exactly φ(m − 1) primitive
elements.
Indeed, these primitive elements are precisely the roots of Φm−1 (x) in F. For
example, the primitive elements of Z7 are 3 and 5, and these are precisely the roots
of the polynomial Φ6 (x) = x2 − x + 1 in Z7 . Indeed, it is easy to check that
x2 ≡ k (mod n)
has at least one solution. That is, k is a quadratic residue modulo n if k has a square
root modulo n.
p ≡ 1 (mod 4).
PROOF Observe that −1 is the only root of Φ2 (x) = x + 1, so it is the only element
of Zp of order 2. Then −1 has a square root in Zp if and only if Zp has elements
of order 4, i.e. if and only if 4 | p − 1. This is equivalent to the condition that
p ≡ 1 (mod 4).
PROOF Observe that if n is any even integer, then every prime divisor of n2 + 1
must be congruent to 1 modulo 4. For if p is a prime divisor of n2 + 1, then p 6= 2
since n is even, and since n2 ≡ −1 (mod p) it follows that p ≡ 1 (mod 4).
Now suppose there are only finitely many primes p1 , . . . , pm congruent to 1 mod-
ulo 4, and let n = 2p1 · · · pm . Then n2 + 1 is not divisible by any of the pi , but every
prime factor of n2 + 1 is congruent to 1 modulo 4, a contradiction.
Fields and Cyclotomic Polynomials 19
The following theorem is based on an interesting trick. Recall that the primitive
cube roots of unity are the numbers
√ √
−1 + i 3 2 −1 − i 3
ω = and ω = .
2 2
Then √
ω − ω2 = i 3
is a square root of −3. This suggests a possible way of making square roots of −3 in
any field: if we can find an element a in the field of order 3, then perhaps a − a2 will
be a square root of −3.
p ≡ 1 (mod 3).
PROOF Observe that if n is any even integer and n is not a multiple of 3, then
every prime factor of n2 + 3 is congruent to 1 modulo 3. For neither 2 nor 3 can be a
prime factor of n2 + 3, and if p > 3 is a prime factor of n2 + 3 then n2 ≡ −3 (mod p)
and hence p ≡ 1 (mod 3).
Now suppose that there are only finitely many primes p1 , . . . , pm congruent to 1
modulo 3, and let n = 2p1 · · · pm . Then n is even and is not a multiple of 3, so every
prime factor of n2 + 3 is congruent to 1 modulo 3. But none of the primes p1 , . . . , pm
divide n2 + 3, a contradiction.
(ab)2 = a2 b2 = (−1)(−3) = 3,
so 3 is a quadratic residue.
Note that the converse of this last corollary is false. That is, there exist prime
numbers p with p 6≡ 1 (mod 12) for which 3 is a quadratic residue. A simple example
is 11, for which
52 ≡ 3 (mod 11).
Indeed, it is a consequence of quadratic reciprocity that 3 is a quadratic residue
modulo p if and only if p ≡ ±1 (mod 12).