## You are here

Homeproof of Wilson's theorem

## Primary tabs

# proof of Wilson’s theorem

We first show that, if $p$ is a prime, then $(p-1)!\equiv-1\;\;(\mathop{{\rm mod}}p).$ Since $p$ is prime, $\mathbb{Z}_{p}$ is a field and thus, pairing off each element with its inverse in the product $(p-1)!=\prod_{{x=1}}^{{p-1}}x,$ we are left with the elements which are their own inverses (i.e. which satisfy the equation $x^{2}\equiv 1\;\;(\mathop{{\rm mod}}p)$), $1$ and $-1$, only. Consequently, $(p-1)!\equiv-1\;\;(\mathop{{\rm mod}}p).$

To prove that the condition is necessary, suppose that $(p-1)!\equiv-1\;\;(\mathop{{\rm mod}}p)$ and that $p$ is not a prime. The case $p=1$ is trivial. Since $p$ is composite, it has a divisor $k$ such that $1<k<p$, and we have $(p-1)!\equiv-1\;\;(\mathop{{\rm mod}}k)$. However, since $k\leqslant p-1$, it divides $(p-1)!$ and thus $(p-1)!\equiv 0\;\;(\mathop{{\rm mod}}k),$ a contradiction.

## Mathematics Subject Classification

11-00*no label found*

- Forums
- Planetary Bugs
- HS/Secondary
- University/Tertiary
- Graduate/Advanced
- Industry/Practice
- Research Topics
- LaTeX help
- Math Comptetitions
- Math History
- Math Humor
- PlanetMath Comments
- PlanetMath System Updates and News
- PlanetMath help
- PlanetMath.ORG
- Strategic Communications Development
- The Math Pub
- Testing messages (ignore)

- Other useful stuff
- Corrections

## Comments

## looks good

the proof looks good to me.

## Re: looks good

thanks for checking =)

apk