# How many n-th roots of unity are there in a finite field?

Fix a finite field $$\mathbb{F}_{p^k}$$. Since its multiplicative group $$\mathbb{F}_{p^k}^\times$$ is cyclic,the primitive $$(p^k-1)^{th}$$ roots of unity are precisely the generators of $$\mathbb{F}_{p^k}^\times$$ of which there are $$\varphi(p^k-1)$$, where $$\varphi$$ is the Euler totient function. This makes sense so far.

From this mathoverflow answer, the number of $$n$$-th roots equals $$\gcd{(n,p^k-1)}$$. I am struggling to understand why. Letting $$g$$ be a generator for $$\mathbb{F}_{p^k}^\times$$, the first step in justifying the claim is

For an element $$x$$ of the group $$x^n=1$$ holds iff $$x=g^m$$ with $$nm$$ divisble by $$p^k-1$$

Why is this the case? I'm probably missing something super basic.

• In a cyclic group of order $\ell$ the equation $x^r=1$ has $d=\gcd(r,\ell)$ solutions. This is because $x$ can be written as a power of the generator $g$, $x=g^i$. And $x^r=1$ if and only if $\ell\mid ri$. This happens if and only if $i$ is divisible by $\ell/d$. Nov 3, 2022 at 5:15
• Start from here. Nov 3, 2022 at 5:45

As you said, the group $$\mathbb{F}_q^*$$ ($$q=p^k$$) is cyclic of order $$q-1$$, so every element is of the form $$g^m$$ for some generator $$g$$. Of course, $$g$$ has order $$q-1$$. If $$x=g^m$$ is an $$n$$th root of unity, that is the same as saying $$x^n=g^{mn}=1$$ which is the same as $$q-1\mid mn$$.