Proof of Wilson's Theorem using concept of group.

Your first question: If $a^2=1$ then $a^2-1=(a-1)(a+1)=0$. Since $\mathbb{Z}/(p)$ is a field, this implies that either $a-1=0$ or $a+1=0$ or that $a=\pm 1$.

For the next one. The only numbers between $0$ and $p-1$, that satisfy $a=\pm 1$ are $1$ and $p-1$, this is clear since $a=-1=p-1$ mod $p$.

Lastly, if we think of $(p-1)!$, this is the product of all the elements of the multiplicative group together. Group theoretically, consider $\prod_{g\in G} g$. Then, for each $g$, we can find the $g^{-1}\in G$ in the product and cancel. This aurgument only breaks down if $g^{-1}=g$, so in the product we are left with $\prod_{g\in G, g^2=1}g$. In the case of $G=\mathbb{Z}/(p)^*$, we have just shown that the only such elements at $p-1$ and $1$, so that $(p-1)!=\prod_{g\in \mathbb{Z}/(p)^*}g=\prod_{g\in \mathbb{Z}/(p)^*, g^2=1}g=(p-1)1=-1$ mod $p$. This is probably what they mean by pairing.


Let's do it for odd primes:

The multiplicative group of a finite field is cyclic. In this case the cyclic group is $\mathbb Z_{p-1}$.

We know a lot of things about groups, we know each element has a unique inverse, we know even more about cyclic groups, we know there are $\varphi(d)$ elements of order $d$ when $d$ divides the order of the group. Of course $2|(p-1)$ so we deduce there are $\varphi(2)=1$ elements of order $2$, in other words there are exactly two self inverses, $1$ and $-1$.

So when you take the product of all numbers what happens is that all of the pairs of inverses cancel out and you are only left with $1\cdot (-1)=-1$