logo

Proof of the Primitive Element Theorem 📂Number Theory

Proof of the Primitive Element Theorem

Definition 1

If 1ap1 \le a \le p satisfies ordp(a)=p1\text{ord}_{p} (a) = p-1, it is defined as a primitive root modulo pp.


Theorem

Every prime number pp has ϕ(p1)\phi ( p - 1) primitive roots.


Explanation

The reason why aa satisfying ordp(a)=p1\text{ord}_{p} (a) = p-1 is called a primitive root is because, by Fermat’s little theorem, it is guaranteed that ap11(modp)a^{p-1} \equiv 1 \pmod{ p }, so if exactly ordp(a)=p1\text{ord}_{p} (a) = p-1, it means that all numbers between 11 and pp can be represented by powers of aa.

For example, consider the primitive root a=3a = 3 of p=7p=7 130(mod7)232(mod7)331(mod7)434(mod7)535(mod7)633(mod7) \begin{align*} 1 \equiv & 3^{0} \pmod{ 7 } \\ 2 \equiv & 3^{2} \pmod{ 7 } \\ 3 \equiv & 3^{1} \pmod{ 7 } \\ 4 \equiv & 3^{4} \pmod{ 7 } \\ 5 \equiv & 3^{5} \pmod{ 7 } \\ 6 \equiv & 3^{3} \pmod{ 7 } \end{align*}

Now focusing on aa for p=7p=7, 111(mod7)231(mod7)361(mod7)431(mod7)561(mod7)621(mod7) \begin{align*} 1^{1} \equiv & 1 \pmod{ 7 } \\ 2^{3} \equiv & 1 \pmod{ 7 } \\ 3^{6} \equiv & 1 \pmod{ 7 } \\ 4^{3} \equiv & 1 \pmod{ 7 } \\ 5^{6} \equiv & 1 \pmod{ 7 } \\ 6^{2} \equiv & 1 \pmod{ 7 } \end{align*}

Here, the number of primitive roots of p=7p=7 is two, 3,53,5, ϕ(71)=ϕ(6)=ϕ(3)ϕ(2)=(31)(21)=2 \phi (7-1) = \phi (6) = \phi (3) \phi (2) = (3-1)(2-1) = 2 which exactly matches. On the other hand, ϕ(p1)\phi ( p - 1) is at least 11, so it’s okay to use just for mentioning existence, not the exact number. This totient function ϕ\phi might seem to appear out of nowhere but it is an essential element in the proof process.

Proof

Part 1.

According to the properties of order, for all 1a(p1)1 \le a \le (p-1), now for all divisors dd that divide (p1)(p-1), let’s define the function ψ\psi as ψ(d):={a  1a<pordp(a)=d} \psi ( d ) := \left| \left\{ a \ | \ 1 \le a < p \land \text{ord}_{p} (a) = d \right\} \right| In Part 4, we will show that this ψ\psi is essentially the same function as the totient function ϕ\phi.


Part 2.

Let’s call the divisors that divide (p1)(p-1) as nn, then (p1)=nk(p-1) = nk, and factoring out (Xp11)\left( X^{p-1} - 1 \right) results in

Xp11=Xnk1=(Xn)k1=(Xn1)((Xn)k1+(Xn)k2++(Xn)2+(Xn)1+1) \begin{align*} X^{p-1} - 1 =& X^{nk} - 1 \\ =& \left( X^{n} \right)^{k} - 1 \\ =& \left( X^{n} - 1 \right) \left( \left( X^{n} \right)^{k-1} + \left( X^{n} \right)^{k-2} + \cdots + \left( X^{n} \right)^{2} + \left( X^{n} \right)^{1} + 1 \right) \end{align*}

By Fermat’s little theorem, Xp110(modp) X^{p-1} - 1 \equiv 0 \pmod{p} has X=1,2,,(p1)X=1,2,\cdots,(p-1) as a root, and by the fundamental theorem of algebra for congruences, Xn10(modp)X^{n} -1 \equiv 0 \pmod{p} has at most nn roots therefore (Xn)k1+(Xn)k2++(Xn)2+(Xn)1+10(modp) \left( X^{n} \right)^{k-1} + \left( X^{n} \right)^{k-2} + \cdots + \left( X^{n} \right)^{2} + \left( X^{n} \right)^{1} + 1 \equiv 0 \pmod{p} has at most n(k1)n(k-1) roots. Thinking again about Xp11(Xn1)((Xn)k1+(Xn)k2++(Xn)2+(Xn)1+1)(modp) X^{p-1} - 1 \equiv \left( X^{n} - 1 \right) \left( \left( X^{n} \right)^{k-1} + \left( X^{n} \right)^{k-2} + \cdots + \left( X^{n} \right)^{2} + \left( X^{n} \right)^{1} + 1 \right) \pmod{p}

  • The left side has exactly (p1)=nk(p-1) = nk roots
  • The right side has at most nn roots and at most n(k1)n(k-1) roots.

To satisfy this, Xn10(modp)X^{n} -1 \equiv 0 \pmod{p} must have at least, that is, exactly nn roots. In summary, if n(p1)n | (p-1) then Xn10(modp) X^{n} -1 \equiv 0 \pmod{p} has exactly nn solutions in 0X<p0 \le X < p.


Part 3. i=1rψ(di)=n\displaystyle \sum_{i=1}^{r} \psi (d_{i}) = n

Let’s denote all divisors of nn as d1,,drd_{1} , \cdots , d_{r}.

If the divisor dd of nn satisfies d=ordp(a)d = \text{ord}_{p} (a), then from the definition of order ad=aordp(a)1(modp) a^{d} = a^{\text{ord}_{p} (a)} \equiv 1 \pmod{p} is obtained. Here, the number of aa satisfying the given dd is ψ(d)\psi (d).

However, since anad(nd)1(nd)1(modp) a^{n} \equiv a^{d \cdot \left( {{n} \over {d}} \right)} \equiv 1^{ \left( {{n} \over {d}} \right)} \equiv 1 \pmod{p} Thus, ψ(d)\psi (d) of X=aX = a becomes a solution of Xn10(modp)X^{n} -1 \equiv 0 \pmod{p}.

Summarizing, the number of solutions of Xn10(modp)X^{n} -1 \equiv 0 \pmod{p} is dnψ(d)=ψ(d1)+ψ(d2)++ψ(dr) \sum_{d \mid n} \psi (d) = \psi (d_{1} ) + \psi (d_{2} ) + \cdots + \psi (d_{r} ) Since we stated in Part 2 that the number of solutions of Xn10(modp)X^{n} -1 \equiv 0 \pmod{p} is nn, dnψ(d)=ψ(d1)+ψ(d2)++ψ(dr)=n \sum_{d \mid n} \psi (d) = \psi (d_{1} ) + \psi (d_{2} ) + \cdots + \psi (d_{r} ) = n This is similar to the totient sum formula.


Part 4. ϕ(n)=ψ(n)\phi (n) = \psi (n)

We need to show that for all natural numbers nn, ϕ(n)=ψ(n)\phi (n) = \psi (n) holds true.

Calculations for ψ\psi are obtained using i=1rψ(di)=n\displaystyle \sum_{i=1}^{r} \psi (d_{i}) = n unless otherwise mentioned.

  • Case 1. n=1n=1
    ϕ(1)=1\phi (1) = 1 and ψ(1)=1\psi (1) = 1, therefore ϕ(1)=ψ(1)\phi (1) = \psi (1)
  • Case 2. For prime qq when n=qn=q
    ϕ(q)=q1\phi (q) = q - 1 and ψ(q)+ψ(1)=q\psi (q) + \psi (1) = q, therefore ϕ(q)=q1=ψ(q)\phi (q) = q - 1 = \psi (q)
  • Case 3. For prime qq when n=q2n=q^2
    The divisor of q2q^2 is only 1,q,q21, q, q^2, hence ϕ(q2)+ϕ(q)+1=q2=ψ(q2)+ψ(q)+1\phi (q^2) + \phi (q) + 1 = q^{2} = \psi (q^2) + \psi (q) + 1 After subtracting the terms for Case 1 and 2 from both sides, ϕ(q2)=ψ(q2)\phi (q^2) = \psi (q^2)
  • Case 4. For different primes q1,q2q_{1}, q_{2} when n=q1q2n=q_{1} q_{2}
    The divisor of q1q2q_{1} q_{2} is only 1,q1,q2,q1q21, q_{1}, q_{2}, q_{1} q_{2}, hence ϕ(q1q2)+ϕ(q1)+ϕ(q2)+1=q1q2=ψ(q1q2)+ψ(q1)+ψ(q2)+1\phi ( q_{1} q_{2}) + \phi (q_{1}) + \phi (q_{2}) + 1 = q_{1} q_{2} = \psi ( q_{1} q_{2}) + \psi (q_{1} ) + \psi (q_{2} ) + 1 After subtracting the terms for Case 1 and 2 from both sides, ϕ(q1q2)=ψ(q1q2)\phi ( q_{1} q_{2} ) = \psi ( q_{1} q_{2} )
  • Otherwise.
    In other cases, by breaking down the terms as in Cases 3 and 4, we obtain ϕ(n)=ψ(n)\phi (n) = \psi (n).

Part 5.

In Parts 2 and 3, we confirmed that for all nn satisfying n(p1)n | (p-1), there are ϕ(n)\phi (n) number of aa satisfying ordp(a)=n\text{ord}_{p} (a) = n. Here, if k=1k=1, that is, n=p1n = p-1, then ordp(a)=p1\text{ord}_{p} (a) = p-1, hence aa is a primitive root modulo pp. Therefore, prime number pp has ϕ(p1)\phi (p-1) primitive roots.


  1. Silverman. (2012). A Friendly Introduction to Number Theory (4th Edition): p213. ↩︎