Let $p$ be a prime number. Recall from our previous work that the order of an integer $a$ modulo $p$ (where $\gcd(a,p) = 1$), denoted $\text{ord}_p(a)$, is the smallest positive integer $k$ such that $a^k \equiv 1 \pmod{p}$. By Fermat's Little Theorem, the order always divides $p-1$.
For example, modulo $7$: $\text{ord}_7(2) = 3$ and $\text{ord}_7(3) = 6$.
Notice in the example above that $3$ has order $6 = 7-1$ modulo $7$. Elements with this maximal order have a special name and important properties.
In other words, $a$ is a primitive root modulo $p$ if the smallest positive power of $a$ that is congruent to $1$ modulo $p$ is $a^{p-1}$.
Why are primitive roots important?
If $a$ is a primitive root modulo $p$, then the powers $a^0, a^1, a^2, \ldots, a^{p-2}$ modulo $p$ generate all elements of $\mathbb{Z}_p^\times = \{1, 2, \ldots, p-1\}$. This means every non-zero element modulo $p$ can be expressed as a power of $a$, making primitive roots extremely useful for:
Examples:
Let's verify that primitive roots exist for several primes by checking computationally.
A key property of primitive roots is that their powers generate all non-zero elements modulo $p$.
In other words, the set $\{a^0, a^1, a^2, \ldots, a^{p-2}\}$ modulo $p$ equals the set $\{1, 2, 3, \ldots, p-1\}$ (in some order).
Let's verify this with an example:
The computational evidence above suggests that primitive roots always exist. This is indeed true, and was proven by Gauss.
Here, $\varphi$ is Euler's totient function. For example:
Proof Sketch: The proof uses properties of cyclic groups and polynomial equations over finite fields. The key insight is that the multiplicative group $\mathbb{Z}_p^\times$ is cyclic of order $p-1$, which guarantees the existence of elements of order $p-1$ (i.e., generators of the group). We will cover the full proof in class.