Number Theory

p-adic Numbers

ℚₚ — completion of ℚ where small means highly divisible by p, not "near zero"

The p-adic numbers ℚₚ (for prime p) form an alternative completion of the rational numbers ℚ — one where two numbers are "close" if their difference is highly divisible by p. The p-adic absolute value is |x|ₚ = p^(-vₚ(x)), where vₚ is the p-adic valuation. Discovered by Kurt Hensel in 1897 (looking for a non-archimedean way to study power series in number theory). Every rational has a unique p-adic expansion x = aₙp^n + aₙ₊₁p^(n+1) + …, like a base-p number with infinitely many digits to the *left*. Used extensively in modern number theory (Wiles's proof of Fermat's Last Theorem heavily uses p-adic L-functions and étale cohomology), local-global principles (Hasse-Minkowski), and cryptography.

  • Notationℚₚ
  • ConstructedHensel 1897
  • Norm|x|ₚ = p^(-vₚ(x))
  • Non-archimedeanultrametric
  • Wiles's FLTuses p-adic methods
  • Local-globalHasse-Minkowski theorem

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Why p-adic numbers matter

  • Wiles's proof of Fermat's Last Theorem (1995). The modularity theorem identifies Galois representations of elliptic curves with Galois representations of modular forms — both realised in p-adic vector spaces. The deformation theory, p-adic L-functions, and p-adic Hodge theory used in the proof live in the p-adic universe; without ℚₚ, the proof has no language to be stated.
  • Local-global principles. The Hasse-Minkowski theorem reduces solving quadratic equations over ℚ to solving them over ℝ and every ℚₚ — a finite check (only finitely many primes matter). Failure of local-global for cubic and higher forms is measured by Tate-Shafarevich groups, central in the Birch-Swinnerton-Dyer conjecture.
  • Class field theory. Local class field theory describes abelian extensions of ℚₚ via the multiplicative group ℚₚ*. Global class field theory glues local data into a coherent picture. Artin reciprocity is stated in this language.
  • Iwasawa theory. Studies how arithmetic invariants (class groups, units, L-values) behave in towers of number fields where Galois groups are p-adic Lie groups. Mazur-Wiles theorem settled deep questions about cyclotomic fields using p-adic methods.
  • p-adic L-functions. Analytic objects living in ℚₚ that interpolate special values of complex L-functions. The Iwasawa main conjecture relates p-adic L-functions to algebraic invariants — proved for many cases, deeply influences modern arithmetic geometry.
  • Cryptography and coding theory. p-adic algorithms (Hensel lifting) factorise polynomials over ℤ in polynomial time; the LLL algorithm and lattice-based cryptography use p-adic-related ideas. Some post-quantum proposals use p-adic reductions.
  • Geometry of numbers and dynamical systems. p-adic dynamics, Berkovich spaces, and rigid analytic geometry have become core tools in arithmetic dynamics, Mazur's torsion theorem, and the Mochizuki framework.

Common misconceptions

  • "p-adic numbers are just base-p numerals." Every p-adic integer can be written aₙp^n + aₙ₊₁p^(n+1) + … with digits 0 ≤ aᵢ < p, like a base-p numeral with infinitely many digits to the left. But ℚₚ contains more than this: the field structure, square roots, exponentials, and analytic functions are all genuinely new objects — not just a re-spelling of integers.
  • "Ultrametric is weird and unnatural." Ultrametricity is the natural geometry for a valuation. Distances measured by "how divisible by p" inherit ultrametricity for free, and the resulting topology — totally disconnected, locally compact, ball-isoceles — is exactly what arithmetic asks for. Far from weird, it is the ambient geometry whenever divisibility is the relevant notion of "size".
  • "p-adic numbers are only theoretical." The Berlekamp-Hensel polynomial factorisation algorithm — implemented in every CAS and used in coding theory and computer algebra — is purely p-adic. Lattice-based cryptography uses LLL with p-adic-flavoured ideas. p-adic numbers ship in real software.
  • "ℚₚ is a subfield of ℂ." No. ℚₚ and ℂ are both completions of ℚ but for incompatible absolute values; there is no canonical embedding ℚₚ ↪ ℂ. The algebraic closures ℚ̄ₚ and ℂ̄ = ℂ are abstractly isomorphic as fields (both algebraically closed of characteristic zero with cardinality continuum) but no canonical map exists, and the natural topologies disagree.
  • "Each ℚₚ is isomorphic to all the others." No. ℚ₂ and ℚ₃ are non-isomorphic — for instance ℚ₂ contains square roots that ℚ₃ does not. They are distinct local fields with distinct arithmetic.
  • "p must be small." p ranges over all primes; ℚ_(2^256-189) is a perfectly good local field used in cryptography. Algorithms are typically polynomial in log p, so primes of cryptographic size are routine.

A surprising p-adic identity

In ℚ₅, the series 1 + 5 + 25 + 125 + … converges (to 1/(1-5) = -1/4) because the terms are increasingly divisible by 5 — 5-adic small. Numerically: partial sums 1, 6, 31, 156, 781 mod 5^k all agree mod 5^k with -1/4 = …4444444. Verify: 4 · (1 - 5^k)/(1 - 5) ≡ 1 (mod 5^k) for k = 1, 2, 3, … since (1 - 5^k) ≡ 1 (mod 5^k). The "divergent" geometric series of real analysis is a convergent identity in ℚ₅ — a tiny example of how 5-adic geometry rearranges intuition.

Ostrowski's theorem and the choice of completion

A natural question: how many essentially different absolute values does ℚ have? Ostrowski (1916) answered: every nontrivial absolute value on ℚ is equivalent to either the standard archimedean |·|_∞ or to one of the p-adic |·|ₚ for some prime p. So the completions of ℚ — up to topological equivalence — are exactly ℝ and the family of ℚₚ. The "places" of ℚ are the primes plus one archimedean place; the product formula ∏_v |x|_v = 1 over all places binds them together. p-adic numbers are not exotic; they are one of two natural kinds of completion of the rationals.

Frequently asked questions

What does "close" mean in p-adic?

Two rationals are p-adically close if their difference is highly divisible by p. Formally, |x - y|ₚ = p^(-vₚ(x-y)) where vₚ(z) is the largest power of p dividing z (with vₚ(0) = +∞). So |3 - 3|ₚ = 0, |1 - (1 + p^10)|ₚ = p^(-10) (very small), and |1 - 2|ₚ = 1 (large). The number 1000000 is very close to 0 in the 5-adic metric because 5^6 divides it.

How is ℚₚ different from ℝ?

Both are completions of ℚ, but for different absolute values. ℝ completes ℚ for the standard archimedean |·| where larger magnitude means farther from 0. ℚₚ completes ℚ for the non-archimedean |·|ₚ where higher divisibility by p means closer to 0. ℝ is connected, totally ordered, archimedean. ℚₚ is totally disconnected, locally compact, ultrametric, and has no compatible total order. Different metric, different topology, different geometric flavour.

What is Hensel's lemma?

A p-adic version of Newton's method that lifts solutions of polynomial congruences from F_p to ℤₚ. If f(x) is a polynomial with p-adic integer coefficients, a is a root mod p, and f'(a) ≢ 0 (mod p), then there exists a unique p-adic integer α with f(α) = 0 and α ≡ a (mod p). The key tool for solving polynomial equations in ℚₚ — converts a single mod-p check into a full p-adic solution.

Why are p-adic numbers ultrametric?

Because the valuation satisfies vₚ(x + y) ≥ min(vₚ(x), vₚ(y)), giving |x + y|ₚ ≤ max(|x|ₚ, |y|ₚ) — the ultrametric inequality, strictly stronger than the triangle inequality. Geometric consequences: every triangle is isoceles; every point of a ball is its centre; balls are either disjoint or one contains the other; the topology is totally disconnected. These features make p-adic geometry feel alien at first, then natural for arithmetic.

How did Wiles use them in FLT?

Wiles's modularity theorem matches Galois representations attached to elliptic curves over ℚ with those attached to modular forms. The Galois representations are realised in p-adic vector spaces: the p-adic Tate module of an elliptic curve, and the p-adic representations on étale cohomology of modular curves. The proof uses p-adic Hodge theory, deformation rings, and p-adic L-functions. Without the p-adic framework, the proof's machinery does not exist.

What is the local-global principle?

The principle that a Diophantine equation should have a rational solution if and only if it has solutions in ℝ and in every ℚₚ. Hasse-Minkowski (1923) proves it for quadratic forms: a quadratic form represents 0 over ℚ iff it does so over ℝ and over every ℚₚ. For higher-degree forms, it can fail (Selmer's curve 3x³ + 4y³ + 5z³ = 0 has solutions everywhere locally but none rationally). Tate-Shafarevich groups measure the failure for elliptic curves.