Prove Wilson's Theorem, i.e. (p-1)! = -1 (mod p) for any prime number p.

Claim: For any prime p: (p-1)! = -1 (mod p)Proof: For p=2: 1! = 1 so the equality obviously holds. Therefore, we need to consider cases when p is odd.
Let's consider set: {1, ... , p-1}. With operation * multiplication, this set clearly forms a group. The neutral element is 1. The cardinality of this group is p-1. For now, let's forget about first and last element (which are congruent 1 and -1 to p). Therefore we are left with p-3 (so even) number of elements and we know that for each e in this subset, there exists also its inverse within this subset. This is true, because we know that inverse of 1 is 1, inverse of p-1 is p-1 and there is only 1 inverse for each e, so they must be inside our subset. Therefore product of all numbers in subset is:12...(p-2) = 1 * ... * 1 = 1Finally we need to multiply this result by 1 and by (p-1) to obtain (p-1)! mod p. But (p-1)=-1 mod p, so our final result is 11*(-1) = -1 mod p, which was to be demonstrated.

Answered by Mateusz P. Maths tutor

2105 Views

See similar Maths University tutors

Related Maths University answers

All answers ▸

Differentiate f(x)= 3y^2 + ln (x) + sin x


What is the difference between a Supremum and a Maximum of a sequence?


Find the cross product between two unit vectors a and b.


How do I integrate a Fraction ?


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2024

Terms & Conditions|Privacy Policy