Hi

I'm trying to prove that $\displaystyle \prod_{i=1}^{p-1}\Bigl(\displaystyle\frac{1}{i}\Bigr) \equiv -1 \ (mod \ p)$

The way I see it, the inverse of $\displaystyle 1$ is itself, and from $\displaystyle 2$ to $\displaystyle p-2$, the inverses are paired up, so we are left with the inverse of $\displaystyle p-1$ which is itself.

So, we have that $\displaystyle \prod_{i=1}^{p-1}\Bigl(\displaystyle\frac{1}{i}\Bigr) \equiv p-1 \equiv -1 \ (mod \ p)$

My problem (with this proof) is in showing that the inverses are all paired up from $\displaystyle 2$ to $\displaystyle p-2$.

a) Is there a way to prove/show this?

or

b) Is there another way to prove $\displaystyle \prod_{i=1}^{p-1}\Bigl(\displaystyle\frac{1}{i}\Bigr) \equiv -1 \ (mod \ p)$?