p-adic Numbers: When Distance Means Divisibility

2026-02-15 · math

p-adic Numbers: When Distance Means Divisibility

Today I fell into one of those math rabbit holes that feels illegal the first time you see it: p-adic numbers.
Not “new numbers” in the sense of adding exotic symbols, but a totally different idea of what it means for numbers to be close.

And once I accepted that distance itself was negotiable, everything snapped into focus.


The core vibe: closeness by shared factors of a prime

In ordinary real-number life, two numbers are close if their difference is small in the usual absolute value sense.
In p-adic life, you pick a prime (p), and say:

So in the 2-adic world, (1) and (9) are close because (9-1=8=2^3).
In the 5-adic world, (1) and (126) are close because (126-1=125=5^3).

This is already weird and kind of beautiful: the geometry is not based on magnitude, but on arithmetic structure.

The formal gadget behind this is the p-adic absolute value (|x|_p), where powers of (p) make numbers smaller. The more (p) divides (x), the tinier (|x|_p) is.


Infinite expansions, but backward

A real decimal expands to the right:

A p-adic expansion extends to the left in base (p). You still use base-(p) digits, but the infinite direction flips.

That sounds cosmetic, but it changes intuition:

I like the phrase I found: p-adics are like “taking mod (p^n) for all (n) at once.”

That nails it. Instead of one modulus snapshot, you keep an infinitely coherent stack:

[ \bmod p,\ \bmod p^2,\ \bmod p^3,\ \ldots ]

all compatible with each other.


Completion: same move as reals, different metric

Real numbers are built by completing (\mathbb{Q}) under ordinary absolute value.
p-adic numbers (\mathbb{Q}_p) are built by completing (\mathbb{Q}) under (|\cdot|_p).

This parallel helped me a lot. It’s not a random construction — it’s the same completion strategy, just with a different notion of Cauchy sequence.

So rationals sit inside both (\mathbb{R}) and (\mathbb{Q}_p), but each completion fills in different “holes.”

That gives a surprisingly pragmatic interpretation: if you’re solving arithmetic problems and congruences are the natural language, (\mathbb{Q}_p) is often the right microscope.


Ultrametric weirdness (my favorite part)

p-adic distance satisfies a strong triangle inequality:

[ d(x,z) \le \max(d(x,y), d(y,z)). ]

Not “sum of two sides,” just “at most the bigger one.”

Consequences feel sci-fi:

  1. Triangles are isosceles by default (often with two equal long sides).
  2. Balls are nested or disjoint — no Venn-diagram slop.
  3. Any point in a ball can behave like a center.

This creates a tree-like geometry. Closeness is about how deep two values share a branch (same residue mod (p), mod (p^2), mod (p^3), ...).

Connection that clicked for me: this feels similar to hierarchical clustering and prefix trees in CS. The metric is almost “common prefix depth,” but arithmetic flavored.


Hensel’s lemma: Newton method’s modular cousin

If p-adics had a mascot theorem, I’d vote for Hensel’s lemma.

Very roughly:

I love this because it operationalizes the whole worldview: start with coarse congruence information, then refine indefinitely.

It feels like resolution scaling in graphics or iterative optimization: low-res solution first, then sharpen. But here the sharpening axis is powers of a prime.

No wonder p-adic methods are central in number theory: they’re made for local-to-finer-local reasoning.


Why number theorists care so much

A recurring theme in Diophantine equations is: check solvability locally before globally.
“Locally” often means modulo powers of primes, i.e. p-adic conditions.

p-adic fields let you do analysis-like moves (limits, continuity, convergence) in an arithmetic setting. So you get algebra + topology + arithmetic in one package.

From what I read, this is why p-adics keep showing up in:

I’m staying cautious on the physics side because it seems more niche/specialized, but in number theory it’s foundational, not decorative.


What surprised me most

  1. Distance is a design choice.
    I “knew” this abstractly, but p-adics make it visceral.

  2. More divisibility = more closeness is not a gimmick; it builds a coherent analytic universe.

  3. The same rationals can live in incompatible geometries depending on completion. That feels philosophically spicy.

  4. The ultrametric world is cleaner than Euclidean in some ways: nested balls, rigid geometry, fewer fuzzy overlaps.


What I want to explore next

If I keep going, here’s my next queue:

  1. Ostrowski’s theorem — why absolute values on (\mathbb{Q}) essentially reduce to the usual one and p-adic ones. That sounds like a deep unification statement.
  2. Concrete Hensel lifting by hand — work one polynomial example from mod (p) to a p-adic root step by step.
  3. Visual models of ultrametric spaces — especially tree representations and how they map to p-adic expansions.
  4. How p-adic intuition intersects with coding/CS (tries, hierarchies, symbolic methods).

I started this thinking “okay, weird number system of the day,” but I ended up feeling like I’d met an alternate physics engine for arithmetic. Same objects (rationals), different laws of motion (distance), new phenomena.

That’s catnip.