Roots of Unity in Finite Fields
This article explains what Roots of Unity in a Finite Field are and how they are intertwined with multiplicative subgroups. The reader is expected to be familiar with the prior chapter about the Fundamental Theorem of Cyclic Groups.
That theorem states that, given a multiplicative group of order , there exists a unique subgroup of order when divides . Otherwise, if does not divide , no subgroup of order exists.
It also states that, if is a generator of , then generates the subgroup of order .
In this article, we will show that all elements of this subgroup are what are called -th roots of unity, and that the generator is what is called a primitive -th root of unity.
Motivation and goal for this chapter
The square roots of in a finite field are easy to compute: they are the numbers congruent to and negative (which are and respectively. Remember that, in a field , the number is congruent to ). In other words, . This set is the set of solutions of the equation , where is an element of the finite field.
But what if we want to compute the cube roots of , or more generally, the -th roots of 1, i.e., ? By definition, -th roots of unity are the elements that satisfy the equation . But how can we find them?
We could try all elements one by one — a brute-force approach — but that would be infeasible when the field contains many elements. Fortunately, there is a simple way to find them all. In the finite field , the -th roots of unity are precisely the elements of the multiplicative subgroup of order . This definition assumes divides
To state it in the strongest possible terms: If an element in a finite field is part of a multiplicative subgroup of order , then it is a -th root of unity, and . And if an element is a -th root of unity (meaning , then it is part of a multiplicative subgroup of order k.
Equivalence of terminology
It may seem like we are just adding a new terminology for the same entity (an element in a multiplicative group) and pointing out that raising it to the -th power equals 1.
In a certain sense, yes, we are introducing a new term for the same entity: a -th root of unity is an element in a multiplicative subgroup of order and vice-versa. Normally, giving the same entity two names leads to confusion, so we need to justify introducing the term “root of unity.”
When we speak about cyclic groups of order in the most general sense, we do not have the guarantee that taking an element in that group and applying the binary operator to that element and itself times results in the identity element, i.e., , or more generally for a binary operator :
For cyclic groups in general, the above property is not guaranteed to hold, but for roots of unity in a finite field, it is guaranteed.
Therefore, we can say that roots of unity have all the properties the Fundamental Theorem of Cyclic groups says they should have, and they have the property that
So, to put the reader’s mind at ease, you already know a good bit about roots of unity in a finite group simply because you understand the Fundamental Theorem of Cyclic Groups. Since roots of unity in a finite field are a cyclic subgroup, the Fundamental Theorem of Cyclic Groups applies to them.
However, the added guarantee that unlocks additional properties that efficient ZK algorithms directly leverage. These properties enable us to create efficient algorithms like the Number Theoretic Transform and other Zero-Knowledge Proof algorithms, such as PLONK and ZK-STARKs.
We study these additional properties of roots of unity in later chapters. This chapter focuses on definitions and examples to build the understanding that an element in a finite field has the property if and only if it is part of a multiplicative subgroup of order
Computing k-th roots of unity is the same as finding the multiplicative subgroup of order k
In the article on the Fundamental Theorem of Cyclic Groups, we learned how to find all the elements of a multiplicative subgroup of order . First, we obtain a generator of this subgroup from the generator of the multiplicative group . Then, using this generator, we can find all the elements of the subgroup of order .
Thus, finding the -th roots of unity of is no different from finding the multiplicative subgroup of order , if divides , which we already know how to do.
Our aim in this chapter is to prove this equivalence - between the group of all -th roots of unity and the multiplicative subgroup of order , if divides .
To do this, we need to prove the following two statements:
- Every element within the multiplicative subgroup of order satisfies .
- Suppose divides . Then, every element in that satisfies belongs to the unique subgroup of order .
We will explore these two statements through examples to illustrate that they hold true. Since the formal proofs can be somewhat mathematically demanding, we will defer some of them to the appendix for the interested reader, though we have made the effort to make the proofs as widely understandable as possible.
1. Every element in the subgroup of order satisfies
This first statement shows that all elements of the multiplicative subgroup of order are -th roots of unity.
However, this is NOT sufficient to establish the equivalence between the group of all -th roots of unity and the multiplicative subgroup of order (when divides ) since it does not guarantee that all -th roots of unity belong to this subgroup — which will be discussed in Statement 2.
We will begin this section with a proof of this statement, and then show through examples that this statement holds true.
Proof of Statement 1
Recall from the article on the Fundamental Theorem of Cyclic Groups that a unique subgroup of order is generated by , where is a generator of the multiplicative group . We refer to as the elements generated by taking successive powers of modulo :
Let be an arbitrary element in for some . The goal is to prove that .
The proof below assumes that the generator has the property ; see Appendix A for the proof of this fact.
Let’s compute as follows:
Therefore, every element in the subgroup of order , when raised to the power , equals 1.
Example of Statement 1 in
In this example, we have . Also, the element is a generator of the multiplicative group .
How to find the generator of the multiplicative group will not be covered in this article, but the galois library provides a quick way to do it. Given the field , one way to find the generator is by using the primitive_element property, as shown below.
import galois
GF = galois.GF(7) # define the field
GF.primitive_element # GF(3, order=7)
Subgroup of order 3
Since 3 divides , the Fundamental Theorem of Cyclic Groups guarantees the existence of a unique subgroup of order 3.
This subgroup is generated by . Thus,
Now, we want to verify that every element in satisfies . This is done below:
So, the elements and satisfy . Therefore, the condition is satisfied.
Subgroup of order 2
Since 2 divides , the Fundamental Theorem of Cyclic Groups guarantees the existence of a unique subgroup of order 2.
This subgroup is generated by . Thus,
Now, we want to verify that every element in satisfies .
So, the elements and satisfy . Therefore, the condition is satisfied.
Exercise. Verify that every element in satisfies .
2. If divides , then every element in with belongs to the unique subgroup of order
This statement asserts that ALL -th roots of unity belong to the multiplicative subgroup of order , provided that divides .
In this section, we illustrate this claim through a few examples. The full proof is provided in Appendix B for the interested reader.
Before moving on, let’s consider the case where does not divide . In this situation, the Fundamental Theorem of Cyclic Groups tells us that there is no subgroup of order , and therefore no equivalence can exist.
Example in
In this example, we have . Also, the element is a generator of the multiplicative group .
Subgroup of order
Since 3 divides , there exists a unique subgroup of order 3. This subgroup is generated by . Thus,
We want to verify that every element in satisfying belongs to this unique subgroup of order in . Let’s find all such elements in , as follows:
The elements and satisfy . These three elements are exactly the members of the subgroup of order in . Therefore, every element in with belongs to the unique subgroup of order .
Exercise. Verify that every element in satisfying belongs to the unique subgroup of order .
Example in
In this example, we have . Also, the element is a generator of the multiplicative group , which can be verified using the galois library:
GF = galois.GF(17) # define the field
GF.primitive_element # GF(3, order=17)
Subgroup of order
Since 4 divides , there exists a unique subgroup of order 4. This subgroup is generated by . Thus,
We want to verify that every element in satisfying belongs to this unique subgroup of order in . Let’s find all such elements in , as follows:
The elements and satisfy . These four elements are exactly the members of the subgroup of order in . Therefore, every element in with belongs to the unique subgroup of order .
Exercise. Verify that every element in satisfying belongs to the unique subgroup of order .
Primitive -th root of unity
A primitive -th root of unity is a special -th root of unity: it is a -th root of unity that generates all other -th roots of unity.
Since the group of -th roots of unity we are interested in is the same as the subgroup of order , the primitive -th roots of unity are exactly the generators of this subgroup.
Note: In the case where does not divide (considering finite fields ), there may still be -th roots of unity, but in this case there are NO primitive -th roots of unity.
Thus, finding a primitive -th root of unity is straightforward: it is the same as finding a generator of the subgroup of order , and the Fundamental Theorem of Cyclic Groups tells us how to do this.
A formal definition of a primitive -th root of unity is that it is a -th root of unity with order , where the order of an element is the smallest positive integer greater than zero such that .
For example, is a 6th root of unity in because , but it is not a primitive 6th root because there is a power lower than 6 that makes it , specifically 3, i.e. .
The number of primitive -th roots of unity
Just as a subgroup of order can have more than one generator, there can be more than one primitive -th root of unity. The number of primitive -th roots of unity is the same as the number of generators of the subgroup of order .
The number of primitive -th roots of unity (and generators) is given by Euler’s totient function . The proof of this fact is beyond the scope of this article. For the application we are considering—the Number Theoretic Transform—we only need a primitive -th root of unity, which can be found using the Fundamental Theorem, assuming we know a generator for .
In the rest of this chapter, we will present examples showing how to use the Fundamental Theorem to find a primitive -th root of unity, and then all -th roots of unity for a given .
Example of 4th roots of unity in
A generator of the multiplicative group is the element , which can be found using the galois library.
A generator for the subgroup of order 4 is then .
Based on our discussion, this generator is a primitive 4th root of unity. Let us check that using the definition of a primitive -th root of unity. We need to show that:
- Element is a 4th root of unity. This can be seen by checking that .
- The order of element is 4. This means that 4 is the smallest positive integer such that . Let us check that below:
Therefore, element is a primitive 4th root of unity, and we can use element to generate the subgroup of all 4th roots of unity, as follows:
Example of 8th roots of unity in
Since is a generator of the multiplicative group , a generator for the subgroup of order is .
Let us check that it is also a primitive 8th root of unity. We need to check that:
- Element is a 8th root of unity. This can be seen by checking that .
- The order of element is 8. This means that 8 is the smallest positive integer such that . Let us check that below:
Therefore, element is a primitive 8th root of unity, and we can use element to generate the subgroup of all 8th roots of unity, as follows:
Exercise. Find a primitive 2nd root of unity in and the subgroup of all 2nd roots of unity.
Conclusion and summary
An efficient method is needed to find all -th roots of unity, which is what we studied in this article. In summary, we established that:
- An element of a finite field is a -th root of unity if .
- If divides , then the subgroup of containing all -th roots of unity is the unique subgroup of order guaranteed by the Fundamental Theorem of Cyclic Groups.
- A primitive -th root of unity generates the subgroup of all -th roots of unity. If is a generator of the multiplicative group and divides , then the element is a primitive -th root of unity.
Appendix A
The generator of the subgroup of order satisfies**: **
Let be a generator of the multiplicative group . Recall from the Fundamental Theorem of Cyclic Groups that the element generates the unique subgroup of order . We aim to prove that .
Proof. Fermat’s Little Theorem states that if is a prime number, then for any integer :
For example, if and , then .
If is not divisible by , we can divide both sides of the equation above by . This shows that Fermat’s Little Theorem is equivalent to the statement:
We now compute as follows:
Appendix B
If and then is a member of a unique cyclic subgroup of order .
Let be a generator of . This equivalently means that is a -th root of unity.
Let be a generator for the multiplicative subgroup of order ( is directly from the Fundamental Theorem of Cyclic Groups).
If and then we must prove that there exists an integer such that . The existence of integer in proves that can be generated by and thus is part of the unique subgroup of order .
To find such an , we will substitute with and with to convert into:
Can we come up with an that makes the equation true? If we strategically pick an such that the exponent will cancel and leave we have:
Plugging into the left-hand side of this equation , we obtain
We can see that the and terms cancel, leaving us with .
We can substitute back the original definitions for , , and and see that
Therefore, if , then there does in fact exist an such that . is simply
where is the solution to , is the order of the subgroup, and is the modulus of our finite field.
However, we must still prove that is an integer because generating a value by raising to a fraction doesn’t qualify as being a member of the subgroup generated by .
Showing is an integer
To show that is an integer, we need to show that dividing by has no remainder.
When we carry out the division, we should get a quotient and a remainder . We want to show that is necessarily 0.
A remainder cannot be larger than the divisor (e.g., cannot have a remainder 5 or larger), so we also have the condition that:
We can isolate in by translating it from the form dividend / divisor = quotient + remainder to dividend = quotient⋅divisor + remainder. (To illustrate this re-write, consider that 6/4=1 remainder 2 can be written as 6 = 4⋅1 + 2). In re-written form, we have:
In order to show that , we will set aside for a moment, and derive another property of .
Fact:
can be derived from the following facts:
So by substitution, and by the power of a power rule, .
Substitute into
We now have enough tools to show that the remainder in is zero. We remind the reader that since is a primitive -th root of unity.
We now show that using the definitions
are sufficient to show that :
As a consequence of and , we have that
Since is a primitive -th root of unity, there are only two solutions for :
Recall that is defined as the solution to
We know that any valid division cannot result in a remainder of or higher, specifically, the remainder must be in the range . That range restriction on the remainder implies .
So ruling out the possibility that , the only solution for is (i.e. ).
Since , the result of dividing by is an integer.
Finally, since is defined as
is an integer.
Ready to Get Started?
Join Thousands of Users Today
Start your free trial now and experience the difference. No credit card required.