Does the multiplicative group of integers modulo $p$ have $p-1$ generators

abstract-algebragroup-theory

This is probably a simple question, but I came across this video that said group of order $p$ have $p-1$ generators.

But then I thought about the multiplicative group of integers modulo $p$, the set $G = \{0,1,2,…p-1\}$. Shouldn't the element $0$ and $1$ both not be considered as generators, since $0^k=0, 1^k=1$, where $k\in \mathbb Z$? Thus it won't encounter every element of the group.

Best Answer

Assume $p$ is prime.

The additive group $\{0,...,p-1\}$ of integers mod $p$ is a cyclic group of order $p$, and has exactly $p-1$ generators (all nonzero elements are generators).

The multiplicative group $\{1,...,p-1\}$ of integers mod $p$ has $p-1$ elements, not $p$ elements, and if $p\ne 2$, then (as you noted) $1$ is not a generator, so there are less than $p-1$ generators. In fact, it can be shown that it's a cyclic group (of order $p-1$), and has exactly $\phi(p-1)$ generators, where $\phi$ is Euler's totient function.

Recall: If $n$ is a positive integer, $\phi(n)$ is the number of positive integers which are less than or equal to $n$, and relatively prime to $n$. If $n > 1$, $n$ is not relatively prime to itself, hence it's immediate that for $n > 1$, we have $\phi(n) < n$. In particular, if $p\ne 2$, we have $\phi(p-1) < p-1$.