Orthogonality of Roots of Unity

The sum of powers of the kk-th roots of unity generated by a primitive kk-th root of unity is either zero or kk. 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 kk-th roots of unity generated by a primitive kk-th root of unity ω\omega:

[1,ω,ω2,...,ωk−1][ 1, \omega, \omega^2, ..., \omega^{k-1} ]

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

[1m,ωm,(ω2)m,...,(ωk−1)m][ 1^m, \omega^m, (\omega^2)^m, ..., (\omega^{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 ss below for any mm:

s=1m+ωm+(ω2)m+...+(ωk−1)ms = 1^m + \omega^m + (\omega^2)^m + ... + (\omega^{k-1})^m

Consider the 44th roots of unity in F17\mathbb{F}_{17} (though any field with a primitive 44th root of unity would work). For a primitive root ω\omega, these roots are

[1,ω1,ω2,ω3],[1, \omega^1, \omega^2, \omega^3],

or, using that ω2≡−1\omega^2 \equiv -1 in this case, they are

[1,ω,−1,−ω][ 1, \omega, -1, -\omega ]

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

[13,ω3,(−1)3,(−ω)3][ 1^3, \omega^3, (-1)^3, (-\omega)^3 ]

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

Thus, the same list can be written as

[1,ω3,−1,−ω3][ 1, \omega^3, -1, -\omega^3 ]

The sum of these elements is zero, since

1+ω3+(−1)+(−ω3)=01 + \omega^3 + (-1) + (-\omega^3) = 0

As another example, let us start with the 4th roots of unity in F17\mathbb{F}_{17} again, but now raise each element to the power of 8.

This yields the following elements:

[18,ω8,(−1)8,(−ω)8][ 1^8, \omega^8, (-1)^8, (-\omega)^8 ]

Since 88 is even, we have (−1)8=1(-1)^8 = 1 and (−ω)8=ω8(-\omega)^8 = \omega^8.

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

Therefore, our list simplifies to

[18=1,ω8=1,18=1,ω8=1][ 1^8=1, \omega^8=1, 1^8=1, \omega^8=1 ]

The sum of the elements is

s=1+1+1+1=4s=1 + 1+1+1=4

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

We will show and prove the following:

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

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

8th roots of unity in F17\mathbb{F}_{17}

Consider the 88th roots of unity in F17\mathbb{F}_{17}. They can be written as

[1,ω,ω2,ω3,−1,−ω,−ω2,−ω3],[ 1, \omega, \omega^2, \omega^3, -1, -\omega, -\omega^2, - \omega^3 ],

where we used that ω4≡−1\omega^4 \equiv -1 for a primitive 88th root of unity ω\omega.

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

The new list is given by

[1m,ωm,(ω2)m,(ω3)m,(−1)m,(−ω)m,(−ω2)m,(−ω3)m][1^m, \omega^m, (\omega^{2})^m, (\omega^3)^m, (-1)^m, (-\omega)^m, (-\omega^{2})^m, (-\omega^3)^m ]

Let us check the possible cases.

Case 1: mm is not a multiple of 88

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

[12,ω2,(ω2)2,(ω3)2,(−1)2,(−ω)2,(−ω2)2,(−ω3)2][ 1^2, \omega^2, (\omega^2)^2, (\omega^3)^2, (-1)^2, (-\omega)^2,(-\omega^2)^2, (-\omega^3)^2 ]

It can be written as

[1,ω2,ω4,ω6,1,ω2,ω4,ω6][1, \omega^2, \omega^4, \omega^6, 1, \omega^2, \omega^4, \omega^6 ]

Using the fact that ω4≡−1\omega^4 \equiv -1, the list becomes

[1,ω2,−1,−ω2,1,ω2,−1,−ω2][1, \omega^2, -1, -\omega^2, 1, \omega^2, -1, -\omega^2 ]

Summing these elements, we obtain

s=1+ω2+(−1)+(−ω2)+1+ω2+(−1)+(−ω2)=(1−1)+(ω2−ω2)+(1−1)+(ω2−ω2)=0\begin{aligned} s &= 1 + \omega^2 + (-1) + (-\omega^2) + 1 + \omega^2 + (-1) + (-\omega^2) \\ &= (1 - 1) + (\omega^2 - \omega^2) + (1 - 1) + (\omega^2 - \omega^2) \\ &= 0 \end{aligned}

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

Case 2: mm is a multiple of 8

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

[116,ω16,(ω2)16,(ω3)16,(−1)16,(−ω)16,(−ω2)16,(−ω3)16],[1^{16}, \omega^{16}, (\omega^2)^{16}, (\omega^3)^{16}, (-1)^{16}, (-\omega)^{16}, (-\omega^2)^{16}, (-\omega^3)^{16} ],

or

[1,ω16,ω32,ω48,1,ω16,ω32,ω48][1, \omega^{16}, \omega^{32}, \omega^{48}, 1, \omega^{16}, \omega^{32}, \omega^{48} ]

We also have that:

ω16=(ω8)2ω32=(ω8)4ω48=(ω8)6\begin{aligned} \omega^{16} &= (\omega^8)^2 \\ \omega^{32} &= (\omega^8)^4 \\ \omega^{48} &= (\omega^8)^6 \end{aligned}

Since we know that ω8≡1\omega^{8} \equiv 1 for any primitive 8th root of unity, the list is actually

[1,12,14,16,1,12,14,16][1,1^2,1^4,1^6,1,1^2,1^4,1^6]

and the sum of all terms is 88.

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

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

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

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

Below, we will prove the two cases separately.

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

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

[(ω0)m,(ω1)m,(ω2)m,...,(ωk−1)m][ (\omega^0)^m, (\omega^1)^m, (\omega^2)^m, ..., (\omega^{k-1})^m ]

We want to calculate the sum

s=(ω0)m+(ω1)m+(ω2)m+...+(ωk−1)ms = (\omega^0)^m + (\omega^1)^m + (\omega^2)^m + ... + (\omega^{k-1})^m

This sum can be written as

s=∑i=0k−1(ωi)ms = \sum_{i=0}^{k-1} (\omega^{i})^m

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

s=∑i=0k−1(ωm)is = \sum_{i=0}^{k-1} (\omega^{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−1s = (\omega^m)^0 + (\omega^m)^1 + (\omega^m)^2 + ... + (\omega^m)^{k-1}

A geometric series of this form satisfies

s=(ωm)0+(ωm)1+(ωm)2+...+(ωm)k−1=(ωm)k−1ωm−1s = (\omega^m)^0 + (\omega^m)^1 + (\omega^m)^2 + ... + (\omega^m)^{k-1} = \frac{(\omega^m)^k - 1}{\omega^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 mm is not a multiple of kk is crucial here. Recall the definition of a primitive kk-th root of unity: it is an element ω\omega such that ωk≡1\omega^k \equiv 1, but ωr≠1\omega^r \neq 1 for any 0≤r<k0 \leq r <k.

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

Since mm is not a multiple of kk, ωm\omega^m is not of the form ωnk\omega^{nk} for any integer nn, and therefore ωm≠1\omega^m \neq 1. Thus, the denominator ωm−1\omega^m-1 of the fraction above is nonzero.

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

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

(ωk)m−1=(1)m−1=1−1=0\begin{align*} (\omega^k)^m -1 &=(1)^m-1 \\ &= 1 - 1 \\ &= 0 \end{align*}

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 mm is a multiple of kk.

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

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

Consider the kk-th roots of unity

[ω0,ω1,ω2,...,ωk−1][ \omega^0, \omega^1, \omega^2, ..., \omega^{k-1} ]

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

[(ω0)m,(ω1)m,(ω2)m,...,(ωk−1)m][ (\omega^0)^m, (\omega^1)^m, (\omega^2)^m, ..., (\omega^{k-1})^m ]

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

[(ωm)0,(ωm)1,(ωm)2,...,(ωm)k−1][ (\omega^m)^0, (\omega^m)^1, (\omega^m)^2, ..., (\omega^m)^{k-1} ]

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

[(ωnk)0,(ωnk)1,(ωnk)2,...,(ωnk)k−1][ (\omega^{nk})^0, (\omega^{nk})^1, (\omega^{nk})^2, ..., (\omega^{nk})^{k-1} ]

Since ωnk=(ωk)n\omega^{nk} = (\omega^k)^n, we obtain the list

[(ωk)0n,(ωk)1n,(ωk)2n,...,(ωk)(k−1)n][ (\omega^{k})^{0n}, (\omega^{k})^{1n}, (\omega^{k})^{2n},..., (\omega^{k})^{(k-1)n}]

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

[(1)0n,(1)1n,(1)2n,...,(1)(k−1)n][ (1)^{0n}, (1)^{1n}, (1)^{2n},..., (1)^{(k-1)n}]

or simply

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

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

1+1+1+⋯+1⏟k times=k\underbrace{1 + 1 + 1 + \dots + 1}_{k \text{ 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.\sum_{i=0}^{k-1} (\omega^{i})^{m}=\begin{cases}k, & \text{if } m \text{ is a multiple of } k,\\[6pt]0, & \text{otherwise}.\end{cases}

Here the summation ranges from the first term, ω0\omega^0, to the last, ωk−1\omega^{k-1}.

The inner product of two lists of kk-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.\sum_{i=0}^{k-1} (\omega^{i})^{r-s}=\begin{cases}k, & \text{if } r\equiv s \pmod{k},\\[6pt]0, & \text{otherwise}.\end{cases}

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

The two forms are equivalent

If rr is congruent to ss mod kk (second form), then r−s=nkr-s = nk for some integer nn.

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

The reason for using rr and ss 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 kk-th roots of unity. The first vector, AA, is raised to the power rr and has the form

A=[(ω0)r,ωr,(ω2)r,...,(ωk−1)r]A =[ (\omega^0)^r, \omega^r, (\omega^2)^r, ..., (\omega^{k-1})^r ]

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

B=[(ω0)−s,ω−s,(ω2)−s,...,(ωk−1)−s]B = [ (\omega^0)^{-s}, \omega^{-s}, (\omega^2)^{-s}, ..., (\omega^{k-1})^{-s} ]

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

Since ωk=1\omega^{k} = 1, multiplying both sides by ω−1\omega^{-1} gives ω−1=ωk−1\omega^{-1} = \omega^{k-1}. Raising both sides to the power ss, we obtain ω−s=ω(k−1)s\omega^{-s} = \omega^{(k-1)s} .

The inner product of vectors AA and BB is

A⋅B=(ω0)r⋅(ω0)−s+ωr⋅ω−s+...+(ωk−1)r(ωk−1)−sA \cdot B = (\omega^0)^r \cdot (\omega^0)^{-s} + \omega^r \cdot \omega^{-s} + ... + (\omega^{k-1})^r (\omega^{k-1})^{-s}

Equivalently, this can be written as

A⋅B=(ω0)r−s+ωr−s+...+(ωk−1)r−sA \cdot B = (\omega^0)^{r-s} + \omega^{r-s} + ... + (\omega^{k-1})^{r-s}

In a compact notation, the inner product of AA and BB can be written as

A⋅B=∑i=0k−1(ωi)r−sA \cdot B = \sum_{i=0}^{k-1} (\omega^{i})^{r-s}

Therefore, the formula

∑i=0k−1(ωi)r−s={k,if r≡s(modk),0,otherwise.\sum_{i=0}^{k-1} (\omega^{i})^{r-s}=\begin{cases}k, & \text{if } r\equiv s \pmod{k},\\[6pt]0, & \text{otherwise}.\end{cases}

can be understood as follows: the inner product of two vectors whose entries are powers of kk-th roots of unity is either kk or zero, depending on whether the exponents rr and ss are congruent modulo kk. 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

Ready to Get Started?Join Thousands of Users Today

Start your free trial now and experience the difference. No credit card required.

© 2026 Better-Start. All rights reserved.