On this page
Lagrange's theorem is one of the first results in group theory that does real work. It is a counting argument that fits on one page, and it explains a remainder trick you may already use in JEE problems.
If the word "group" is new, start with our explainer on binary operations, closure, identity and inverses.
What is Lagrange's theorem in group theory?
In Thomas Judson's open textbook, Theorem 6.10 (Lagrange)/06:_Cosets_and_Lagrange's_Theorem/6.02:_Lagrange's_Theorem) says that if H is a subgroup of a finite group G, then |G|/|H| equals the number of distinct left cosets of H, so the number of elements in H divides the number of elements in G.
A left coset gH is what you get by combining one fixed element g with every element of H. Two facts make the proof work. Every element of G lies in exactly one coset, and every coset has exactly |H| elements. So the cosets cut G into equal blocks, and |G| = (number of blocks) × |H|.
The name is a little generous. According to the history section on Wikipedia), Lagrange's 1771 paper only stated a result about permuting the variables of a polynomial. Gauss proved the case of non-zero remainders mod a prime in 1801, Cauchy proved it for the permutation groups Sₙ in 1844, and Camille Jordan for any permutation group in 1861.
How do the cosets of {0, 3} split ℤ₆?
Take ℤ₆ = {0, 1, 2, 3, 4, 5} with addition mod 6, and the subgroup H = {0, 3}. Add each element to H, as Judson's Example 6.1/06:_Cosets_and_Lagrange's_Theorem/6.01:_Cosets) does:
0 + H = 3 + H = {0, 3}
1 + H = 4 + H = {1, 4}
2 + H = 5 + H = {2, 5}
No overlaps, nothing left out: 6 = 3 × 2. Put the six numbers round a clock face and each coset is a pair of opposite points, as in the picture above.
What do the symmetries of a triangle show?
An equilateral triangle has six symmetries: the identity, two rotations (120° and 240°) and three reflections. Each one shuffles the corners 1, 2, 3, and all six shuffles occur, so this is the permutation group S₃.
Judson's Example 6.2 and the discussion after it/06:_Cosets_and_Lagrange's_Theorem/6.01:_Cosets) work out the cosets for two subgroups of S₃, and Example 6.7 gives their counts:
The rotations H = {(1), (123), (132)} have 3 elements and give 2 cosets: the rotations and the reflections. 6 = 2 × 3.
One reflection with the identity, K = {(1), (12)}, has 2 elements and gives 3 cosets. 6 = 3 × 2.
One warning comes from Remark 6.14 and Proposition 6.15 in Judson/06:_Cosets_and_Lagrange's_Theorem/6.02:_Lagrange's_Theorem). The same section gives two corollaries you will use often: the order of any element divides |G|, and a group with a prime number of elements is cyclic.
How does Lagrange's theorem give Fermat's little theorem?
Fermat stated the result in a letter to Frénicle de Bessy dated 18 October 1640, and Euler gave the first published proof in 1736, according to Wikipedia's article on Fermat's little theorem. With groups the proof is short. Judson's section 6.3/06:_Cosets_and_Lagrange's_Theorem/6.03:_Fermat's_and_Euler's_Theorems) proves Euler's theorem with groups and gets Fermat's as the prime case:
Let p be prime. The non-zero remainders {1, 2, ..., p − 1} form a group under multiplication mod p, with p − 1 elements.
If p does not divide a, then a is in this group. The powers of a form a subgroup whose size is the order k of a, so k divides p − 1 by Lagrange.
Write p − 1 = km. Then a^(p−1) = (a^k)^m ≡ 1^m = 1 (mod p).
The same argument with the group of remainders coprime to n gives Euler's theorem, a^φ(n) ≡ 1 (mod n), which is the engine inside RSA encryption, worked with tiny primes.
How do you use it on a problem?
A worked example: find the remainder when 3^100 is divided by 7.
7 is prime and does not divide 3, so 3^6 ≡ 1 (mod 7). Check: 3^6 = 729 = 7 × 104 + 1.
100 = 6 × 16 + 4, so 3^100 = (3^6)^16 × 3^4 ≡ 3^4 = 81 (mod 7).
81 = 7 × 11 + 4, so the remainder is 4.
A quick checklist for group questions:
Asked for a subgroup of size k? Check k divides |G| first. If not, the answer is no.
Asked for the order of an element? It must be a divisor of |G|, so test only those.
|G| is prime? The group is cyclic and has no subgroups except {e} and G.
Found a divisor? Do not assume a subgroup of that size exists. Remember A₄.
If cosets or modular inverses still feel shaky, the Fermi Concept Library gives every concept in mathematics its own lesson and its place in the map, so you can see what an idea builds on. For practice, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
Primes and remainders lead to more surprises; try next which primes are a sum of two squares.



