math/number theory

The product of all primitive roots modulo m is either 1 or -1.

finding wangdo 2025. 11. 22. 19:38

The product of all primitive roots modulo $m$ is either 1 or -1.

If $m=2$, then the product of all primitive roots is 1.

If $r$ is a primitive root, then the inverse $\bar{r}$ is also a primitive root.
When calculating the product of all primitive roots, we can pair each one with its inverse, so that the product of each pair becomes 1. Now we are left with one element(not known if it exists or not), of which the inverse is itself.

Now, if such element exists, say $t$, then $t^2\equiv1\ (\text{mod} \ m)$. A primitive root cannot be 1, so $t\equiv-1\ (\text{mod} \ m)$. (See https://wangdo.tistory.com/87) The order of $t$, the primitive root, is 2, meaning that $\phi(m)=2$. The inverse also holds: if $\phi(m)=2$, then -1 is a primitive root.

Case 1: $m=3, 4,6$. These are the only integers where $\phi(m)=2$. So the product of all primitive roots modulo $m$ is -1.
Case 2: All other case. Then such element does not exist, so the product of all primitive roots modulo $m$ is 1.

We can simplify: the product of all primitive roots modulo $m$ is 1 if $\phi(m)\not=2$ and -1 if $\phi(m)=2$.

The special case of this is Wilson's Theorem (when $m$ is a prime number)

(https://en.wikipedia.org/wiki/Wilson%27s_theorem)