A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Euler's Theorem

Graduate Depth 80 in the knowledge graph ☐ I know this ☆ Set as goal
27topics build on this
383prerequisites beneath it
See this on the map →
Euler's Totient FunctionFermat's Little Theorem+1 more→→Cryptographic Applications: RSAThe RSA Cryptosystem
euler-theorem totient modular-exponentiation

Core Idea

If gcd(a,n) = 1, then a^φ(n) ≡ 1 (mod n). This generalizes Fermat's Little Theorem to any modulus and is fundamental to RSA encryption, where φ(pq) = (p-1)(q-1) plays a central role.

How It's Best Learned

Prove via group theory: (Z/nZ)* has order φ(n). Verify with examples like a=3, n=7, computing φ(7)=6 and checking 36 ≡ 1 (mod 7).

Common Misconceptions

Forgetting the gcd(a,n) = 1 requirement. Confusing φ(n) with p-1 in the general case.

Explainer

Euler's theorem sits at the heart of modern cryptography, but its logic flows naturally from your prerequisite: Euler's totient function φ(n), which counts how many integers from 1 to n share no common factor with n. Those integers form a group under multiplication modulo n — call it (ℤ/nℤ)*. This group has exactly φ(n) elements, and that group structure is the key to everything.

Here's the argument in plain language. Pick any element a in (ℤ/nℤ)* — that is, any integer coprime to n. Multiplying a by itself repeatedly (mod n) cycles through a sequence: a, a², a³, ... This sequence must eventually repeat, because there are only finitely many residues. When it repeats, you've found a subgroup, and by Lagrange's theorem, the order of any subgroup divides the order of the whole group. Since the whole group has order φ(n), the sequence must satisfy a^φ(n) ≡ 1 (mod n).

The theorem generalizes Fermat's Little Theorem, which is the special case where n = p is prime. When n = p, φ(p) = p − 1, so ap−1 ≡ 1 (mod p). Euler's theorem works for any modulus. For example, φ(10) = 4 (the coprimes to 10 are 1, 3, 7, 9), so 34 = 81 ≡ 1 (mod 10). Check: 81 = 8×10 + 1. ✓

The gcd(a, n) = 1 condition is not optional. If a shares a factor with n, then a is not in the group (ℤ/nℤ)* at all — the argument collapses. For instance, gcd(2, 10) = 2, and 24 = 16 ≡ 6 (mod 10), not 1. The coprimality condition defines exactly the elements for which the theorem holds. In RSA encryption, this is precisely why n = pq is chosen with φ(pq) = (p−1)(q−1): it guarantees that encryption and decryption are inverses modulo φ(n), making the entire scheme work.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Set Operations: Union, Intersection, and Complement → Proof by Cases → Proving by Cases and Exhaustion → Vacuous Truth and Trivial Cases → Proof by Cases (Proof by Exhaustion) → Mathematical Induction → Divisibility and Greatest Common Divisor → The Fundamental Theorem of Arithmetic → Divisibility Theory (Formal Treatment) → Fundamental Theorem of Arithmetic (Rigorous Proof) → Arithmetic Functions and Multiplicativity → Euler's Totient Function → Euler's Theorem

Longest path: 81 steps · 383 total prerequisite topics

Prerequisites (3)

Leads To (2)