How to Visualize p-adic Numbers
At a glance
- 1. Start with digits
Write a p-adic integer as an infinite base-p digit string, with the least significant digit first.
- 2. Build the tree
Group strings by their first digit, then by their first two digits, producing a rooted p-ary tree.
- 3. Read distances
Two numbers are close when their digit strings agree for many initial digits.
- 4. Add scales
Visualize all of Q_p by attaching scaled copies of the p-adic integer tree for different powers of p.
For a prime , a p-adic number is difficult to picture on the ordinary real number line because p-adic distance measures similarity of low-order base- digits, not the size of a real-number difference. The most useful visualization is therefore not a line but a branching tree of nested residue classes.
The basic picture is especially clear for the ring of p-adic integers, denoted by . The full field can then be built by adding powers of and translating the same structure.
p-adic numbers as digit strings
Every p-adic integer has an expansion
where each digit satisfies . Unlike an ordinary decimal expansion, this expansion extends indefinitely toward higher powers of while still defining a valid p-adic number.
The first digit is the residue modulo . The first two digits determine the residue modulo , the first three determine the residue modulo , and so on. Thus an infinite p-adic integer can be viewed as an infinite sequence
The order is worth noticing: is the units digit, so it comes first when measuring p-adic closeness.
The rooted p-ary tree
Make one root representing all of . Split it into branches according to the value of :
Each branch is then split into smaller branches according to . After levels, the branches correspond to the residue classes modulo :
Every infinite path from the root chooses one digit at each level and therefore represents exactly one element of .
For example, when , the first split has the three branches
The branch beginning with digit splits into
corresponding to the second digit , , or . Continuing indefinitely gives a ternary tree.
Why shared digits mean closeness
For a nonzero rational number , where and are nonzero integers, define
where, for a nonzero integer , is the largest nonnegative integer such that . This valuation extends to . The p-adic absolute value is
and the distance is .
If two p-adic integers agree in their first digits, then their difference is divisible by . Consequently,
In the tree, the p-adic distance is determined by the depth of the last common branch. The deeper two paths remain together, the closer the corresponding numbers are.
This is the opposite of the usual real-number intuition. In the real metric, and are far apart. But they are not close in the -adic metric, because
is not divisible by , so . A better comparison is and :
so
They are close in the -adic metric even though they are far apart on the real line. Their base- expansions agree in the first three low-order digits.
For another comparison,
so and share one initial ternary digit but not two. Meanwhile,
so they are not closer than the basic unit scale.
Nested balls: a second visualization
A p-adic ball is both open and closed. For an integer , the closed ball of radius around can be written as
This set is also open. When , it is exactly one node of the digit tree: all numbers whose first digits agree with those of .
For , the ball
contains all 3-adic integers congruent to modulo . It is one of the three subballs of . Each ball breaks into equal smaller balls, and two balls are either disjoint or one contains the other. This nested behavior is called ultrametric.
The ultrametric inequality is stronger than the ordinary triangle inequality:
As a result, every triangle in a p-adic space is isosceles, with the two largest sides equal. This is another reason a tree is a better mental model than a Euclidean diagram.
Visualizing the full field
The tree above describes . Every element of can be written as
with a p-adic unit when . Thus contains copies of the p-adic integer structure at different scales.
A practical drawing has three ingredients:
- Draw a rooted p-ary tree for .
- Label the levels by powers of , such as for distance scales.
- Add translated and rescaled copies to represent numbers with negative powers of .
For a more advanced geometric model, the Bruhat–Tits tree for is a regular tree of valence . Its boundary is , so itself is identified with the boundary after removing the point at infinity; boundary neighborhoods encode the p-adic balls.
Why a usual number line can mislead
You can assign a p-adic digit sequence to points in a real interval and draw a Cantor-like or space-filling picture. Such a picture may display digit patterns, but it does not preserve the p-adic distance in the ordinary Euclidean plane. Nearby points in the drawing need not be p-adically close.
For computation, a finite truncation is often enough. Display the residues modulo as the level- nodes of the tree. Increasing reveals more digits and refines each node into children. This gives an accurate visualization of p-adic approximation without pretending that is an ordinary subset of the real plane.
Common mistakes
- Reading digits in the usual direction: p-adic closeness starts with the units digit, not the highest displayed digit.
- Using real distance: a large real difference can have a small p-adic norm if it is divisible by a high power of .
- Drawing as a line: the field has a totally disconnected, branching geometry rather than interval geometry.
- Confusing and : the rooted p-ary boundary directly represents ; also requires different scales and translations.
References
- p-adic Numbers: An Introduction, by Fernando Q. Gouvêa
- p-adic Numbers, p-adic Analysis, and Zeta-Functions, by Neal Koblitz
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.