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 87 in the knowledge graph I know this Set as goal
1topic build on this
398prerequisites beneath it
See this on the map →
Euler's Totient FunctionFermat's Little TheoremCryptographic Applications: RSA
modular-arithmetic euler-phi group-theory

Core Idea

If gcd(a, n) = 1, then a^φ(n) ≡ 1 (mod n), where φ is Euler's totient function. This generalizes Fermat's Little Theorem (where n = p gives φ(p) = p−1) and is essential for understanding RSA cryptography and computing modular exponentiation.

Explainer

You already know from the totient function that φ(n) counts how many integers from 1 to n share no common factor with n — the units modulo n. Euler's theorem makes a powerful claim about what happens when you raise any such unit to the φ(n) power: you always land on 1. Think of this as a "reset" — repeated multiplication eventually cycles back to the identity.

To build intuition, consider n = 10 and a = 3. We have φ(10) = 4 (the units are 1, 3, 7, 9). Compute: 3¹ = 3, 3² = 9, 3³ = 27 ≡ 7 (mod 10), 3⁴ = 81 ≡ 1 (mod 10). The power cycle resets after exactly 4 steps. Euler's theorem guarantees this will happen for any a coprime to n — it might reset earlier (when the order divides φ(n)), but it always resets by step φ(n).

You may recognize a special case: if n = p is prime, then φ(p) = p − 1, and the theorem says ap−1 ≡ 1 (mod p) for any a not divisible by p. This is exactly Fermat's Little Theorem. Euler's theorem is the generalization that works for composite moduli too, which is why it has broader applications. The proof strategy is elegant: the set {a·1, a·3, a·7, a·9} (multiplying all units by a) is just a rearrangement of {1, 3, 7, 9} modulo n. Multiplying all elements on both sides yields a^φ(n) times the product of units ≡ that same product — cancel, and you get a^φ(n) ≡ 1.

The main application you'll encounter is modular exponentiation for large numbers. If you need to compute ak mod n, you can reduce the exponent: ak ≡ a^(k mod φ(n)) (mod n) when gcd(a, n) = 1. This is the mathematical engine behind RSA encryption, where message decryption requires computing md mod n for astronomically large numbers. Euler's theorem is what makes that computation tractable — without it, you could never decrypt quickly.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesSet Operations: Union, Intersection, and ComplementProof by CasesProving by Cases and ExhaustionVacuous Truth and Trivial CasesProof by Cases (Proof by Exhaustion)Mathematical InductionDivisibility and Greatest Common DivisorThe Fundamental Theorem of ArithmeticDivisibility Theory (Formal Treatment)Fundamental Theorem of Arithmetic (Rigorous Proof)Arithmetic Functions and MultiplicativityDirichlet Series and L-FunctionsPrimes in Arithmetic Progressions (Dirichlet's Theorem)Distribution of PrimesIntroduction to the Riemann Zeta FunctionDirichlet Series and L-FunctionsPrimes in Arithmetic Progressions (Dirichlet's Theorem)Wilson's TheoremFermat's Little TheoremEuler's Theorem

Longest path: 88 steps · 398 total prerequisite topics

Prerequisites (2)

Leads To (1)