Skip to main content
Try out the RareSkills ZK AI Tutor!
The RareSkills Book of Zero Knowledge

Orthogonality of Roots of Unity

Last updated on Apr 21, 2026

The sum of powers of the k-th roots of unity generated by a primitive k-th root of unity is either zero or k. We call this property the orthogonality of roots of unity. We will directly leverage this property in the next chapter.

We first illustrate this property through examples, so the reader becomes familiar with it. Then we will prove it in general.

The sum of powers of roots of unity

Consider the k-th roots of unity generated by a primitive k-th root of unity ω:

[1,ω,ω2,...,ωk−1]

If we take this list of elements and raise each element to a power m, we obtain another list:

[1m,ωm,(ω2)m,...,(ωk−1)m]

The goal of this chapter is to show what happens when we sum all the elements of this new list. In other words, we want to calculate the value of the sum s below for any m:

s=1m+ωm+(ω2)m+...+(ωk−1)m

Consider the 4th roots of unity in 𝔽17 (though any field with a primitive 4th root of unity would work). For a primitive root ω, these roots are

[1,ω1,ω2,ω3],

or, using that ω2≡−1 in this case, they are

[1,ω,−1,−ω]

Let us raise these elements to some exponent m, say m=3:

[13,ω3,(−1)3,(−ω)3]

We can simplify some of these elements by noting that (−1)3=−1 and (−ω)3=−ω3.

Thus, the same list can be written as

[1,ω3,−1,−ω3]

The sum of these elements is zero, since

1+ω3+(−1)+(−ω3)=0

As another example, let us start with the 4th roots of unity in 𝔽17 again, but now raise each element to the power of 8.

This yields the following elements:

[18,ω8,(−1)8,(−ω)8]

Since 8 is even, we have (−1)8=1 and (−ω)8=ω8.

Also, remember that for the 4th roots of unity, ω4=1. Thus, ω8=(ω4)2=12=1.

Therefore, our list simplifies to

[18=1,ω8=1,18=1,ω8=1]

The sum of the elements is

s=1+1+1+1=4

In the examples above, when m is not a multiple of k (k=4,m=3), the sum is zero, but when m is a multiple of k (k=4,m=8), the sum is k. This is true in general.

We will show and prove the following:

  1. If the power m is not a multiple of k, the sum is zero.
  2. Otherwise, if m is a multiple of k, the sum is k.

Before proving this fact in general, let us see one more example.

8th roots of unity in 𝔽17

Consider the 8th roots of unity in 𝔽17. They can be written as

[1,ω,ω2,ω3,−1,−ω,−ω2,−ω3],

where we used that ω4≡−1 for a primitive 8th root of unity ω.

If we raise each element of this list to a power m that is not a multiple of 8 and sum all the elements, the result is zero. Otherwise, if m is a multiple of 8, the sum is 8.

The new list is given by

[1m,ωm,(ω2)m,(ω3)m,(−1)m,(−ω)m,(−ω2)m,(−ω3)m]

Let us check the possible cases.

Case 1: m is not a multiple of 8

Let us consider the case m=2. The list is

[12,ω2,(ω2)2,(ω3)2,(−1)2,(−ω)2,(−ω2)2,(−ω3)2]

It can be written as

[1,ω2,ω4,ω6,1,ω2,ω4,ω6]

Using the fact that ω4≡−1, the list becomes

[1,ω2,−1,−ω2,1,ω2,−1,−ω2]

Summing these elements, we obtain

s=1+ω2+(−1)+(−ω2)+1+ω2+(−1)+(−ω2)=(1−1)+(ω2−ω2)+(1−1)+(ω2−ω2)=0

Exercise: Show that the sum vanishes for m=3 and m=4.

Case 2: m is a multiple of 8

Let us consider the case where m=16. Then we obtain the new list

[116,ω16,(ω2)16,(ω3)16,(−1)16,(−ω)16,(−ω2)16,(−ω3)16],

or

[1,ω16,ω32,ω48,1,ω16,ω32,ω48]

We also have that:

ω16=(ω8)2ω32=(ω8)4ω48=(ω8)6

Since we know that ω8≡1 for any primitive 8th root of unity, the list is actually

[1,12,14,16,1,12,14,16]

and the sum of all terms is 8.

Sum of the powers of the k-th roots of unity

Now let us prove in general what we have shown through examples.

Theorem. Consider all the k-th roots of unity generated by a primitive k-th root of unity ω. The sum of the powers of these k-th roots of unity is:

  1. zero if the power is not a multiple of k;
  2. k if the power is a multiple of k.

Below, we will prove the two cases separately.

Case (1): Proof that the sum is zero when the exponent is not a multiple of k

Consider the k-th roots of unity, each raised to a power m that is not a multiple of k:

[(ω0)m,(ω1)m,(ω2)m,...,(ωk−1)m]

We want to calculate the sum

s=(ω0)m+(ω1)m+(ω2)m+...+(ωk−1)m

This sum can be written as

s=∑i=0k−1(ωi)m

We can use the fact that (ωi)m=(ωm)i to rewrite the sum as

s=∑i=0k−1(ωm)i

The formula above is a geometric series, that is, a sum of successive powers of the same element:

s=(ωm)0+(ωm)1+(ωm)2+...+(ωm)k−1

A geometric series of this form satisfies

s=(ωm)0+(ωm)1+(ωm)2+...+(ωm)k−1=(ωm)k−1ωm−1

To prove that the above fraction equals zero, we must first show that the denominator is non-zero and then that the numerator equals zero.

The fact that m is not a multiple of k is crucial here. Recall the definition of a primitive k-th root of unity: it is an element ω such that ωk≡1, but ωr≠1 for any 0≤r<k.

Thus, for primitive k-th roots of unity ω, only powers of ωk are equal to 1, such as (ωk)0,(ωk)1,(ωk)2, and so on.

Since m is not a multiple of k, ωm is not of the form ωnk for any integer n, and therefore ωm≠1. Thus, the denominator ωm−1 of the fraction above is nonzero.

Let us now consider the numerator (ωm)k−1. It can be written as (ωk)m−1.

Since ω is a primitive k-th root of unity, we have ωk=1, and the numerator becomes

(ωk)m−1=(1)m−1=1−1=0

Since the numerator is zero and the denominator is nonzero, the entire sum is zero.

In the next section, we will study the case where the exponent m is a multiple of k.

Case (2): Raising each element by an exponent that is a multiple of k

In this section, we will show that the sum of the k-th roots of unity raised to a power m that is a multiple of k is not zero, but rather k.

Consider the k-th roots of unity

[ω0,ω1,ω2,...,ωk−1]

Let us raise each element in this list to some power m:

[(ω0)m,(ω1)m,(ω2)m,...,(ωk−1)m]

Since (ab)c=(ac)b , we can rearrange each term above as follows:

[(ωm)0,(ωm)1,(ωm)2,...,(ωm)k−1]

Now consider the case in which m is a multiple of k, that is, m=kn for some n. Thus, our list can be written as

[(ωnk)0,(ωnk)1,(ωnk)2,...,(ωnk)k−1]

Since ωnk=(ωk)n, we obtain the list

[(ωk)0n,(ωk)1n,(ωk)2n,...,(ωk)(k−1)n]

Using ωk≡1, the list consists of the number 1 raised to some power:

[(1)0n,(1)1n,(1)2n,...,(1)(k−1)n]

or simply

[1,1,1,...,1]

Since there are k elements in the list, the sum is

1+1+1+⋯+1⏟k times=k

Combining the two properties

An elegant and convenient way to express both properties is the following:

∑i=0k−1(ωi)m={k,if m is a multiple of k,0,otherwise.

Here the summation ranges from the first term, ω0, to the last, ωk−1.

The inner product of two lists of k-th roots of unity

In this section, we will rewrite our relation obtained above in a form that is more suitable for use in the following chapters.

More precisely, we will write it as

∑i=0k−1(ωi)r−s={k,if r≡s(modk),0,otherwise.

First, let us show that these two forms are the same, and then motivate the second one.

The two forms are equivalent

If r is congruent to s mod k (second form), then r−s=nk for some integer n.

Thus, we are saying that r−s, which in the first form is written as m, is a multiple of k. This is the same as stating that m is a multiple of k.

The reason for using r and s in the second form is that we will consider the inner product of two vectors, each consisting of powers of the roots of unity.

The inner product of two vectors of roots of unity

Let us consider two vectors of k-th roots of unity. The first vector, A, is raised to the power r and has the form

A=[(ω0)r,ωr,(ω2)r,...,(ωk−1)r]

The second vector, B, is raised to the negative exponent −s and has the form

B=[(ω0)−s,ω−s,(ω2)−s,...,(ωk−1)−s]

Note: Raising the primitive k-th root of unity to a negative power is not a problem. We can write ω−s=(ω−1)s, where ω−1 is the multiplicative inverse of ω.

Since ωk=1, multiplying both sides by ω−1 gives ω−1=ωk−1. Raising both sides to the power s, we obtain ω−s=ω(k−1)s .

The inner product of vectors A and B is

A⋅B=(ω0)r⋅(ω0)−s+ωr⋅ω−s+...+(ωk−1)r(ωk−1)−s

Equivalently, this can be written as

A⋅B=(ω0)r−s+ωr−s+...+(ωk−1)r−s

In a compact notation, the inner product of A and B can be written as

A⋅B=∑i=0k−1(ωi)r−s

Therefore, the formula

∑i=0k−1(ωi)r−s={k,if r≡s(modk),0,otherwise.

can be understood as follows: the inner product of two vectors whose entries are powers of k-th roots of unity is either k or zero, depending on whether the exponents r and s are congruent modulo k. We will use this fact in the following chapters.

This article is part of a series on the Number Theoretic Transform in our ZK Book