# Advanced Number Theory Note #10: The Möbius function as a sum of primitive roots of unity

In this short note (intended mainly as a technical memo for myself) I want to give a careful and fully explicit proof of the fact that the Möbius function $\mu(k)$ is the sum of the primitive kth roots of unity. This result is important because it can be regarded as a special case of other more general sums, such as Ramanujan’s sums and Gauss sums, which I will study closely in subsequent notes. The present note will therefore serve as a useful ‘base case’ for future reference.

The Möbius function $\mu(k)$ and its basic properties were discussed in Advanced Number Theory Note #1. The Möbius inversion formula for Dirichlet convolutions was also discussed there, and plays a key role here. It says that

$g(n) = \sum_{d \mid n} f(d)$

if and only if

$f(n) = \sum_{d \mid n} g(d) \mu(\frac{n}{d})$

Also relevant is the result that every nth root of unity is a primitive dth root of unity for some divisor d of n. I constructed an explicit proof of this in an earlier note.

Let

$f(d) = \sum_{\substack{1 \le a \le d \\ gcd(a,d)=1}} e^{2\pi ia/d}$

and

$g(k) = \sum_{1 \le m \le k} e^{2\pi im/k}$

Since $gcd(a, d) = 1$, $f(d)$ is the sum of all the primitive dth roots of unity, while $g(k)$ is just the sum of all the kth roots of unity, primitive and non-primitive.

Since every kth root of unity is a primitive dth root of unity for some divisor d of k, it follows that adding up all the primitive dth roots of unity for each divisor d of k gives us all the kth roots of unity. Therefore we must have

$g(k) = \sum_{d \mid k} f(d)$                                       (1)

Example: For example, considering the 6th roots of unity we have

$w = e^{2\pi i/6}$     (primitive 6th root of unity)

$w^ 2 = e^{2\pi i2/6}$ = $e^{2\pi i/3}$     (primitive 3rd root of unity)

$w^3 = e^{2\pi i3/6}$ = $e^{2\pi i/2}$     (primitive 2nd root of unity)

$w^4 = e^{2\pi i4/6}$ = $e^{2\pi i2/3}$     (primitive 3rd root of unity)

$w^5 = e^{2\pi i5/6}$     (primitive 6th root of unity)

$w^6 = e^{2\pi i6/6} = 1$     (primitive 1st root of unity)

The divisors of 6 are 1, 2, 3, and 6, and we see that all the primitive dth roots of unity for each of these divisors d of 6 are represented in the above list. Therefore adding up all the primitive dth roots of unity for each divisor d of 6 would give us all the 6th roots of unity, which is what (1) states. END

Now we can apply the Möbius inversion formula for Dirichlet convolutions to (1) to get

$f(k) = \sum_{d \mid k}g(d)\mu(\frac{k}{d}) = \sum_{d \mid k}\mu(\frac{k}{d})\sum_{1 \le m \le d} e^{2\pi im/d}$

But by Theorem 1 in Advanced Number Theory Note #9, with $n = 1$, the last sum on the right hand side is zero unless $d = 1$, so we get

$f(k) = \mu(k)$

which is what we set out to prove. QED