= Solution
For a <prime number> $p$, the nonzero <residue classes> form the multiplicative <group> of the <finite field> $\mathbb F_p$. Every class has a unique <multiplicative inverse>. A class equals its own inverse precisely when $x^2=1$, so $(x-1)(x+1)=0$ in the <field> and $x=1$ or $x=-1$.
For an <odd prime>, pair each remaining class with its distinct inverse. Each pair contributes one to the product, leaving
$$
\boxed{(p-1)!\equiv1\cdot(-1)=-1\pmod p.}
$$
For $p=2$, the same congruence is $1\equiv-1\pmod2$. This proves <Wilson's theorem>.
Back to article page