# Math Help - Proof of a congruence problem

1. ## Proof of a congruence problem

Hello ! I'm having this little problem.
Prove that if $m$ is prime, then $(m - 2)! \equiv 1 \pmod{m}$.
I thought it would be possible to state that $(m - 2)! = \frac{(m - 1)!}{m - 1}$, thus we have $\frac{(m - 1)!}{m - 1} \equiv 1 \pmod{m}$. From Wilson's Theorem, since $m$ is prime, $(m - 1)! \equiv m - 1 \pmod{m}$, thus we are left with $\frac{m - 1}{m - 1} \equiv 1 \pmod{m}$, which concludes the proof. But it is actually right ? I am not really confident with division inside $\mathbb{Z}/m \mathbb{Z}$.

2. Originally Posted by Bacterius
Hello ! I'm having this little problem.

I thought it would be possible to state that $(m - 2)! = \frac{(m - 1)!}{m - 1}$, thus we have $\frac{(m - 1)!}{m - 1} \equiv 1 \pmod{m}$. From Wilson's Theorem, since $m$ is prime, $(m - 1)! \equiv m - 1 \pmod{m}$, thus we are left with $\frac{m - 1}{m - 1} \equiv 1 \pmod{m}$, which concludes the proof. But it is actually right ? I am not really confident with division inside $\mathbb{Z}/m \mathbb{Z}$.

Yes, it is right...you can freely divide in $\mathbb{Z}\slash m\mathbb{Z}$ as long as you don't divide by zero, or what is the same: as long as the divisor is not a multiple of m.

Tonio

3. Thanks !