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

The Jacobi Symbol

Graduate Depth 92 in the knowledge graph ☐ I know this ☆ Set as goal
403prerequisites beneath it
See this on the map →
Law of Quadratic Reciprocity→
jacobi-symbol quadratic-reciprocity composite-moduli

Core Idea

The Jacobi symbol (a/n) extends the Legendre symbol to composite odd n via the Chinese Remainder Theorem: (a/n) = ∏(a/p_i)e_i for n = ∏p_ie_i. While not a direct residuosity test, it satisfies quadratic reciprocity and is efficient to compute.

Explainer

Recall that the Legendre symbol (a/p) for an odd prime p answers a yes/no question: is a a quadratic residue mod p? It equals 1 if a ≡ x² (mod p) has a solution, −1 if not, and 0 if p|a. The trouble is that many algorithms want to reason about quadratic residuosity modulo a large number n that may not be prime — and factoring n just to evaluate a Legendre symbol at each prime factor is expensive. The Jacobi symbol solves the computational bottleneck by generalizing the definition multiplicatively.

If n = p₁^e₁ · p₂^e₂ · · · pₖ^eₖ is the prime factorization of any positive odd integer, the Jacobi symbol is defined as the product (a/n) = (a/p₁)e₁ · (a/p₂)e₂ · · · (a/pₖ)eₖ, where each factor is a Legendre symbol. The key insight is that this product can be computed very efficiently — using an analogue of the Euclidean algorithm — without ever finding the prime factors of n. The computation looks like repeated application of the quadratic reciprocity law and a few supplementary rules, reducing (a/n) to smaller and smaller Jacobi symbols until you reach a base case.

The critical warning is that the Jacobi symbol is not a quadratic residuosity test for composite moduli. When n is prime, (a/n) = 1 means a is a quadratic residue, and (a/n) = −1 means it is not. But when n is composite, (a/n) = 1 does not guarantee that a is a quadratic residue mod n — the Legendre symbols at different prime factors could each be −1, and their product would still be 1. For example, if (a/p) = −1 and (a/q) = −1, then (a/pq) = (−1)(−1) = 1, yet a might not be a square mod pq. The implication runs only one way: if (a/n) = −1, then a is definitely not a quadratic residue mod n.

Despite this limitation, the Jacobi symbol is enormously useful. It is the key ingredient in Solovay–Strassen primality testing, where checking (a/n) ≡ a^((n−1)/2) (mod n) for random a quickly certifies compositeness when they disagree. It also enables efficient algorithms for computing square roots mod n in cryptographic contexts. Think of the Jacobi symbol as a fast-to-compute proxy for quadratic reciprocity: it preserves the algebraic laws of the Legendre symbol (multiplicativity, reciprocity) while discarding the exact residuosity meaning — a trade that is computationally cheap and theoretically indispensable.

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 → Law of Quadratic Reciprocity → Quadratic Residues and the Legendre Symbol → Euler's Criterion → Law of Quadratic Reciprocity → The Jacobi Symbol

Longest path: 93 steps · 403 total prerequisite topics

Prerequisites (1)

Leads To (0)

No topics depend on this one yet.