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

Euler's Criterion for Quadratic Residues

Graduate Depth 87 in the knowledge graph ☐ I know this ☆ Set as goal
7topics build on this
397prerequisites beneath it
See this on the map →
Quadratic Residues and the Legendre SymbolFermat's Little Theorem→→Law of Quadratic Reciprocity
quadratic-residues legendre-symbol fermat-little-theorem

Core Idea

Euler's criterion states that a^((p−1)/2) ≡ (a/p) (mod p) for odd prime p and integer a. This provides an efficient computational method to evaluate the Legendre symbol and connects Fermat's Little Theorem to quadratic character theory.

Explainer

Your prerequisites give you two key tools. The Legendre symbol (a/p) tells you whether a is a quadratic residue mod p: it equals 1 if a ≡ b² (mod p) for some b, −1 if no such b exists, and 0 if p divides a. Fermat's Little Theorem says ap−1 ≡ 1 (mod p) whenever gcd(a, p) = 1. Euler's criterion connects these two results through a single computation.

The key observation is that a^((p−1)/2) is a square root of ap−1 ≡ 1 (mod p). The only square roots of 1 modulo a prime are 1 and −1 (since x²≡1 means p | (x−1)(x+1), forcing x≡1 or x≡−1). So a^((p−1)/2) must be either 1 or −1 mod p. The criterion asserts the value matches the Legendre symbol exactly: +1 when a is a quadratic residue, −1 when it is a non-residue.

To see why the residue case works: if a ≡ b² (mod p), then a^((p−1)/2) ≡ bp−1 ≡ 1 (mod p) by Fermat's Little Theorem. For non-residues, the argument uses the fact that the multiplicative group mod p is cyclic: if g is a primitive root, then non-residues are odd powers of g. An odd power raised to (p−1)/2 gives g^(odd·(p−1)/2), which is an odd multiple of (p−1)/2, necessarily ≡ −1 (mod p).

A concrete example makes this tangible. Take p = 7. Is 2 a quadratic residue mod 7? Check: 1²=1, 2²=4, 3²=2, 4²=2, 5²=4, 6²=1 — yes, 2≡3² (mod 7), so (2/7)=1. Euler's criterion confirms: 23 = 8 ≡ 1 (mod 7). Now try a = 3: 33 = 27 ≡ 6 ≡ −1 (mod 7), so (3/7) = −1 and 3 is a non-residue. The computational payoff is significant: evaluating (a/p) via a^((p−1)/2) mod p takes O(log p) multiplications using fast exponentiation, far more efficient than checking all squares manually.

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 → Dirichlet Series and L-Functions → Primes in Arithmetic Progressions (Dirichlet's Theorem) → Distribution of Primes → Introduction to the Riemann Zeta Function → Dirichlet Series and L-Functions → Primes in Arithmetic Progressions (Dirichlet's Theorem) → Wilson's Theorem → Fermat's Little Theorem → Euler's Criterion for Quadratic Residues

Longest path: 88 steps · 397 total prerequisite topics

Prerequisites (2)

Leads To (1)