You are on page 1of 8

Lagrange’s Theorem

Mathmdmb
April 19, 2011

Lagrange’s theorem is amongst the most useful theorems in number theory,


specially in divisibility or congruence. Here, we shall prove this and with the
help of this theorem, we shall prove some other famous theorems like Fermat’s
little theorem, Wilson’s theorem, Wolstenholme’s theorem. All of them can be
proved in a more elegant approach. Yet, we shall prove them using Lagrange’s
theorem. In the last section, we shall prove this in an alternative way.

1 Notations
• N = {1, 2, 3, . . . , n, . . .} : the set of positive integers.

• nk = (n−k)!k!
n!

: n choose k.

• a ∈ A : a is an element of the set A.


• a | b : b is divisible by a.
• gcd(a, b) : the Greatest Common Divisor of a and b.
• a and b are coprime : gcd(a, b) = 1.

• a ≡ b (mod n) : a and b leaves the same remainder upon division by n,


i.e. n|a − b.
• ∀x : for all x.
• Cp : the set {1, 2, · · · , p − 1} i.e. a complete set of residue class modulo p.

1
2 Proof Of Theorem
Theorem. If f (x) = (x + 1)(x − 2) · · · (x + p − 1) = xp−1 + a1 xp−2 + · · · +
ap−2 x + (p − 1)!, then the coefficients a1 , ....., ap−2 are divisible by p where p odd
prime.

Proof. Before starting the proof,we need to prove a key lemma.

Lemma. If p is a prime and 0 < i < p, then


 
p
p|
i

Proof. Re-call the famous identity :


   
n n n−1
= , ∀k, n ∈ N, k ≤ n
k k k−1

Let’s apply this for a prime p and i ∈ N, 0 < i < p. It follows that
   
p p p−1
=
i i i−1
p

But gcd(p, i) = 1∀i, 0 < i < p since p is co-prime to p − 1, ....,
 1. Also, i is
p
obviously a positive integer. Therefore, we conclude that p| i .
Thus, the lemma is proven.
Come back to the theorem. Note that :

f (x + 1) = (x + 2)......(x + p)

So,
(x + p)f (x) = (x + 1)f (x + 1)
=⇒ pf (x) = (x + 1)f (x + 1) − xf (x)
Hence, it follows that :

pxp−1 + pa1 xp−2 + ..... + pap−2 x + p!

= (x+1)p +a1 (x+1)p−1 +......+ap−2 (x+1)2 +(x+1)(p−1)!−(xp +a1 xp−1 +.....+ap−2 x2 +x(p−1)!)

= (x+1)p −xp +a1 ((x+1)p−1 −xp−1 )+.......+ap−2 ((x+1)2 −x2 )+(x+1−x)(p−1)!

Let’s equate the coefficients of xp−2 , xp−3 , ......, x.


We get,    
p p−1
pa1 = + a1
2 1

2
     
p p−1 p−2
pa2 = + a1 + a2
3 2 1
···············
     
p p−1 2
pap−2 = + a1 + ..... + ap−2
p−1 p−2 1
So, applying the lemma above, from the first equation p|a1 .
Likewise, it easily follows that :

p|a1 , a2 , ...., ap−2

Thus, we have proven the theorem.

Let’s note a special property of the theorem (which we shall apply to prove
Wolstenholme’s Theorem).
a1 = 1 + 2 + ...... + p − 1

a2 = sum of the products of the numbers 1, 2, ....., p − 1 taken two at a time.

·····················
ap−2 = sum of the product of the numbers 1, 2, ......., p−1 taken p−2 at a time.

3
3 Applications
It’s the time to see some applications. Actually these proofs will be a bit straight
forward. The Lagrange’s theorem is in fact an identity. So, we shall set different
values of x in the identity and see what happen.

Wilson’s Theorem :
This is another useful theorem in congruence.
Theorem. For any prime p,

(p − 1)! ≡ −1 (mod p)

Proof. First see the case p = 2, then 1! ≡ −1 (mod 2). Consider p odd.
Plug x = 1, we get,
p! = 1 + a1 + ...... + (p − 1)!
Of-course, p|p! and also from the theorem, p|a1 , · · · , ap−2 . So, we must have

p|(p − 1)! + 1

(p − 1)! ≡ −1 (mod p)
Fermat’s Little Theorem :
Probably, Fermat’s little theorem is the most important theorem in congruence
or divisibility. In fact, it is the first non-trivial theorem in congruence. The
word ‘little’ is only to distinguish this from Fermat’s Last theorem.

Theorem. Let p be a prime and a be a positive integer such that

ap ≡ a (mod p)

If gcd(a, p) = 1, then,
ap−1 ≡ 1 (mod p)
Proof. We shall only consider gcd(a, p) = 1.
Since a, a + 1, ......, a + p − 1 are p consecutive integers, one of them is divisible
by p. We also have p 6 |a. According to the theorem,

(a + 1)......(a + p − 1) = ap−1 + (p − 1)! + a multiple of p

Then, p|ap−1 + (p − 1)!. Using Wilson’s theorem we have proved above, gives
us p|ap−1 − 1.

4
Wolstenholme’s Theorem :

Theorem. If p > 3 a prime, the numerator of the fraction 1 + 21 + · · · · · · + p−1


1

2
is divisible by p .
Proof. From the property we noted in section 2, the numerator of the fraction
ap−2
is actually (p−1)! .
Put, x = −p in the identity and we obtain

(−1)p−1 (p − 1)! = pp−1 − a1 pp−2 + · · · · · · + ap−3 p2 − ap−2 p + (p − 1)!

This is reduced to

ap−2 = pp−2 − a1 pp−3 + · · · · · · + ap−3 p

Obviously, p2 |pp−j ∀1 < j < p − 1, p > 3 and since p|ap−i ∀1 < i < p − 1, it
follows that,
p2 |ap−2 ∀p > 3.
The theorem is therefore proved.

Note. This also shows why the condition p > 3 is necessary.

5
4 Alternative Proof Of Lagrange’s Theorem
For this alternative proof, we shall use Fermat’s little theorem and Wilson’s
theorem. So, definitely, we need to prove this in another way first. Let’s proceed
on.
Fermat’s Little Theorem :
Let, a be a positive integer and p prime. If p|a, we are done since p|ap − a. Let’s
see the case when gcd(a, p) = 1.
Lemma. If Cp = {a1 , a2 , · · · , ap−1 } is a complete set of residue class modulo
p, then {aa1 , aa2 , · · · , aap−1 } is a permutation of Cp i.e. it is also a complete
set of residue class modulo p.
Proof. For the sake of contradiction, let’s assume that there exists i, j ∈ Cp
such that i 6= j and ai ≡ aj (mod p). Since gcd(a, p) = 1, we can divide this
congruence relation by a. Then i ≡ j (mod p). But |i − j| < p which would
imply that i = j, contradiction!
Now, according to the lemma, for Cp , aCp is a complete set of residue class
modulo p. We have,

a · 2a · · · · (p − 1)a ≡ 1 · 2 · · · (p − 1) (mod p)

=⇒ ap−1 · (p − 1)! ≡ (mod p)


Since gcd(p, (p − 1)!) = 1, it follows that ap−1 ≡ 1 (mod p).

Wilson’s Theorem :
Since 1! ≡ −1 (mod 2), we may assume that p odd prime.
In this case, we prove the lemma below first.
Lemma. For all 1 < x < p − 1, there exists a unique 1 < y < p − 1 such that
xy ≡ 1 (mod p)
Proof. Since gcd(x, p) = 1, from Bezout’s identity, there exists integers y, w such
that xy − pw = 1. Taking modulo p in the equation, we have xy ≡ 1 (mod p).
Now, let’s prove that this y is unique. If y is not unique, then say there exists
y1 , y2 ∈ Cp such that
xy1 ≡ xy2 (mod p)
=⇒ x(y1 − y2 ) ≡ 0 (mod p)
=⇒ y1 − y2 ≡ 0 (mod p)
Since |y1 − y2 | < p, y1 − y2 must be 0 or y1 = y2 . Also, note that x 6= y.
Otherwise, we would have p|(x + 1)(x − 1). Here, p|x + 1 or p|x − 1. Because, if
p|x + 1 and p|x − 1, then p|x + 1 − (x − 1) = 2 too. But p odd. Contradiction!
Therefore, the lemma is true.
Now, we may pair up all p − 3 elements of Cp ( i.e. except 1, p − 1 ) into p−3
2

6
pairs such the product of every pair yields a remainder 1 upon division by p.
So, it is obvious that we shall finally get,
p−3
1 · 2 · · · · (p − 1) ≡ 1 · 1 2 · (p − 1) (mod p)

=⇒ (p − 1)! ≡ −1 (mod p)
The proof is complete.

Lemma. The congruence

xp−1 ≡ 1 (mod p) (††)

has exactly p − 1 solutions in Cp namely x = {1, 2, · · · , p − 1}.


Proof. It is actually straightforward after considering the complete set of residue
class of p. Because, from Fermat’s little theorem, since gcd(i, p) = 1 ∀i ∈ Cp , ev-
ery element of Cp will be a solution of (††). Thus, we have exactly p−1 solutions.

Back to the proof.


Proof. From the lemma 2, we infer that (††) has p−1 solutions namely 1, 2, · · · , p−
1. So, it is identically true that

xp−1 − 1 ≡ (x − 1) · (x − 2) · · · · · · · · · (x − p + 1) (mod p)

Let,

(x + 1)(x − 2) · · · (x + p − 1) = xp−1 + a1 xp−2 + · · · + ap−2 x + (p − 1)!

Since this is an identical congruence, using both Fermat’s theorem and Wilson’s
theorem, we must have
p|a1 , a2 , · · · , ap−2

A Corollary Of Lagrange’s Theorem :


If xd ≡ 1 (mod p) with d|p − 1, then it has exactly d solutions in Cp .

Proof. Since d|p − 1, we conclude that xp−1 − 1 = (xd − 1) · g(x) where g(x) is
a polynomial of degree p − 1 − d. Then,

xp−1 − 1 ≡ (xd − 1) · g(x) (mod p) (?)

has exactly p − 1 solutions, and because g(x) has degree p − 1 − d, the number
of possible values for which (?) has solutions is of-course p − 1 − (p − 1 − d) = d.

So, we get the following theorem.

7
Theorem. If f (x) is a polynomial of degree k < p, then f (x) ≡ 0 (mod p) can
have at most k mutually in-congruent solutions.
Proof. It is almost obvious now.
Note. Here it is assumed that f (x) is not identically congruent to 0 modulo p.

References
[1] AoPS topic #389013, Coefficient of Polynomial, posted by vladimir92.
http://www.artofproblemsolving.com/Forum/viewtopic.php?f=56t=389013

[2] AoPS blog #85314, The Law Of Nature Number Theory, posted by
mathmdmb.
http://www.artofproblemsolving.com/Forum/blog.php?u=85314b=47593

You might also like