# Fermat's Little Theorem: Proving p-1! ≡ -1 (mod p)

• moonlight310
In summary, for a prime number p, (p-1)! is congruent to -1 mod p because of the existence of inverses in the set {1, 2, ... p-1} under multiplication modulo p, which is a result of p being prime. This can be seen by pairing up each element with its inverse in the group.
moonlight310

## Homework Statement

let p be prime then, (p-1)! is congruent to -1 mod p

## The Attempt at a Solution

I'm not sure where to start

First of all you should try some examples out for small prime.

Since p is prime, the set {1, 2, ... p-1} is a group under multiplication, modulo p. This means that there is a (unique) inverse for each element.

I've tried small numbers and it works. So since it has an inverse it means that it can be mod p ? I'm sorry I don't understand this stuff very well.

The fact there there is an inverse means that for each element x, there is an element y such that xy = 1 mod p - and this is only true because p is a prime (a well known group theory result). The main idea for the proof of this theorem is to try to pair up each element with it's inverse (which is valid since this group is commutative).

## 1. What is Fermat's Little Theorem?

Fermat's Little Theorem states that if p is a prime number, then for any integer a, a^p ≡ a (mod p).

## 2. How is this theorem related to p-1! ≡ -1 (mod p)?

Fermat's Little Theorem can be used to prove that for any prime number p, (p-1)! ≡ -1 (mod p). This is known as Wilson's Theorem.

## 3. What is the significance of p-1! ≡ -1 (mod p)?

This theorem has many applications in number theory and cryptography. It is also used in the proof of the famous Fermat's Last Theorem.

## 4. How is Fermat's Little Theorem proven?

The proof of Fermat's Little Theorem involves using mathematical induction and properties of modular arithmetic.

## 5. Can Fermat's Little Theorem be generalized for non-prime moduli?

Yes, there is a generalization of Fermat's Little Theorem known as Euler's Theorem, which states that for any integer a and positive integer n, a^φ(n) ≡ 1 (mod n), where φ(n) is Euler's totient function.

• Calculus and Beyond Homework Help
Replies
6
Views
2K
• Calculus and Beyond Homework Help
Replies
15
Views
2K
• Calculus and Beyond Homework Help
Replies
4
Views
1K
• Calculus and Beyond Homework Help
Replies
16
Views
1K
• Calculus and Beyond Homework Help
Replies
16
Views
2K
• Calculus and Beyond Homework Help
Replies
6
Views
2K
• Calculus and Beyond Homework Help
Replies
6
Views
1K
• Calculus and Beyond Homework Help
Replies
2
Views
1K
• Calculus and Beyond Homework Help
Replies
4
Views
929
• Calculus and Beyond Homework Help
Replies
27
Views
2K