3.2.15

We first prove the following lemma: Let k be a nonzero element of $$ \mathbb{F}_p$$ which is its own multiplicative inverse, i.e. k satisfies $$k^2 \equiv 1 \ mod \ p $$. Then either $$k \equiv (p-1) \ mod \ p $$ or $$k \equiv 1 \ mod \ p $$.

To see this is true, note that if $$ k^2 \equiv 1 \ mod \ p$$, then there is some integer n such that $$ k^2 - 1 = np$$, so we have $$(k+1)(k-1) = np $$, or $$(k+1)(k-1) \equiv 0 \ mod \ p $$. Now if $$k+1 $$ is a multiple of p, then we have $$k = -1 + mp $$ for some integer m, so that $$k \equiv (p-1 )\ mod \ p $$. If k+1 is not a multiple of p, then $$k+1 \not\equiv 0 \ mod \ p $$, so there exists a multiplicative inverse $$ (k+1)^{-1}$$ for $$ k+1$$ in $$\mathbb{F}_p $$ (since it is a field). Then, multiplying $$(k+1)(k-1) \equiv 0 \ mod \ p $$ on both sides by the multiplicative inverse, we have that $$k-1 \equiv 0 \ mod \ p  $$, so $$k \equiv 1 \ mod \ p $$. This proves the lemma.

a) Consider the field $$\mathbb{F}_p $$, where p is a prime number. Let P be the product of all the nonzero elements of the field, $$ P = 1*2*...*p-1$$. By the lemma above, the only elements which are their own multiplicative inverses are 1 and p-1, so that on performing the multiplication in $$\mathbb{F}_p $$, all the elements which are not 1 and p-1 are paired off with their inverses and multiply to become 1, thus we have P = 1*p-1 = p-1, or alternately P = -1 mod p.

b) Viewing P as the product of elements in the field $$\mathbb{R} $$, we have P = (p-1)!. But on the other hand, performing the multiplication in the field $$\mathbb{F}_p $$ tells us that P = p-1, by part a). Lemma 2.9.6 then lets us relate these two products, telling us that $$(p-1)! \equiv (p-1) \equiv -1 \ mod \ p $$. This proves Wilson's theorem.