1. ## Proof question

Recall the definition of n! (read n factorial"):
n! = (n)(n-1)(n-2) ….(2)(1) =∏(k)
In both (a) and (b) below, suppose p≥3 is prime.
(a) Prove that if x∈ Zpx is a solution to x square ≡1 (mod p), then x ≡±1 (mod p).
(b) Prove that (p-1)!≡±1 (mod p)

Zpx x shoud be above p

2. Okay, Correct me if I'm wrong, but the two question are
Let p be prime.
1) If $x\in\mathbb{Z}_{p}$ and $x^{2}\equiv\\1$ (mod p) then $x\equiv\pm\\1$ (mod p)
2) $(p - 1)!\equiv\pm\\1$ (mod p)

For 1 we get
$x^{2}\equiv\\1$ (mod p)
$\Rightarrow\\x^{2} -1\equiv\\0$ (mod p)
$\Rightarrow\\(x-1)(x+1)\equiv\\0$ (mod p)
$\Rightarrow\\p|(x-1)(x+1)$
$\Rightarrow\\p|(x-1)$ or $p|(x+1)$
$\Rightarrow\\x\equiv\\1$ (mod p) or $x\equiv\\-1$ (mod p)
$\Rightarrow\\x\equiv\pm\\1$ (mod p)

2) is wrong. The correct version is $(p - 1)!\equiv\\1$ (mod p), the result is known as Wilson's Theorem
$(p-1)! = 1*2*3........(p-2)(p-1)$
Now 1 and p-1 are the only numbers modulo p that are their own inverses.
For any other number x such that $1 there exists $x^{-1}$ such that $1 and $x*x^{-1}\equiv\\1$ (mod p).
So we match up each x with its inverse and we get:
$(p-1)!\equiv\\1*2*3........(p-2)(p-1)\equiv\\1*1*1.......(p-1)\equiv\\p-1\equiv\\-1$ (mod p)
Now we have the desired result.