# Prove that $a^{p-1} \equiv 1$ $\$(mod $p$) [duplicate]

This question already has an answer here:

Consider the equivalence relation $m\sim n$ defined to be $\frac {m-n}p=z$ (i.e., when $m-n$ is divisible by p) where $m,n,p,z\in \mathbb{Z}$ and $p$ is prime. Now suppose that $a$ is some integer not divisible by $p$. Prove that $[a]^{p-1}=[1]$ where [1] denotes the equivalence class of 1. Another common way to write this is $a^{p-1} \equiv 1$ $\$(mod $p$).

I understand that there is some intent to prove multiplicative inverses here, but I'm a bit confused as to how one would approach it.

-

## marked as duplicate by Marc van Leeuwen, Asaf Karagila, Davide Giraudo, Andreas Caranti, Gerry MyersonFeb 19 '13 at 11:58

hint: In a group $a^{|G|} = e$ $\$ for every a in G where $|G|$ is the order of the group and $e$ is the identity. – Vicfred Sep 28 '12 at 1:16
My favorite proof is en.wikipedia.org/wiki/… – lhf Sep 28 '12 at 1:40
This was never asked before? – Graphth Nov 8 '12 at 21:30
@hardmath: And note that this is a very rare answer by B.D. that actually uses italics for variables (at least in the quote). – Marc van Leeuwen Feb 19 '13 at 10:34
@MarcvanLeeuwen: The new duplicate question process seems to have a side effect of removing a comment (pointing to an earlier Q) when the banner is added. In a couple of cases, as here, my comment was slightly more substantive than just a link to the dup, so I'm not entirely happy with the change. – hardmath Feb 19 '13 at 12:27

Hint 1: Consider the group $(\mathbb{Z}/p\mathbb{Z})^{\times}\cong U_{p}$
Hint 2: $\varphi(p)=p-1$ where $\varphi$ is Euler's totient function and $p$ is a prime number
@Casquibaldo: The nonzero elements of $\mathbb{Z}/p\mathbb{Z}$ form a multiplicative group with $p-1$ elements. What does Cauchy's theorem tell us? – hardmath Jan 15 '13 at 11:47