# proof of Wilson’s theorem

We first show that, if $p$ is a prime, then $(p-1)!\equiv -1\phantom{\rule{veryverythickmathspace}{0ex}}(modp).$ 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\phantom{\rule{veryverythickmathspace}{0ex}}(modp)$), $1$ and $-1$, only. Consequently, $(p-1)!\equiv -1\phantom{\rule{veryverythickmathspace}{0ex}}(modp).$

To prove that the condition is necessary, suppose that $(p-1)!\equiv -1\phantom{\rule{veryverythickmathspace}{0ex}}(modp)$ and that $p$ is not a prime. The case $p=1$ is trivial. Since $p$ is composite, it has a divisor $k$ such that $$, and we have $(p-1)!\equiv -1\phantom{\rule{veryverythickmathspace}{0ex}}(modk)$. However, since $k\u2a7dp-1$, it divides $(p-1)!$ and thus $(p-1)!\equiv 0\phantom{\rule{veryverythickmathspace}{0ex}}(modk),$ a contradiction^{}.

Title | proof of Wilson’s theorem |
---|---|

Canonical name | ProofOfWilsonsTheorem |

Date of creation | 2013-03-22 12:09:09 |

Last modified on | 2013-03-22 12:09:09 |

Owner | CWoo (3771) |

Last modified by | CWoo (3771) |

Numerical id | 9 |

Author | CWoo (3771) |

Entry type | Proof |

Classification | msc 11-00 |