p-adic Absolute Value

p-adic valuations, distance comparison heatmaps, and the ultrametric inequality

The p-adic Absolute Value

The p-adic absolute value measures how many times p divides a number, not how big it is. The more factors of p, the smaller the number -- so 1,000,000 is tiny to the primes 2 and 5.

Valuation Calculator

Enter an integer and pick a prime, then watch p divide out one factor at a time. In the bar chart, notice multiples of higher powers of p spiking higher.

Valuation Calculator

Enter an integer and select a prime to compute the p-adic valuation vp(n) and absolute value |n|p.

Prime factorization of 12:

12 = 22×3

v2(12)

2

|12|2

1/4

v2(n) for n = 1 to 30:

121342561783910111122131411516417181192022122123243252612728229301

Notice the pattern: multiples of 2 have valuation ≥ 1, multiples of 22 = 4 have valuation ≥ 2, and so on.

Go deeper:The p-adic Absolute Value

In everyday mathematics, the absolute value |n| measures how "large" a number is. The p-adic absolute value |n|p measures something entirely different: how divisible n is by the prime p. The more times p divides n, the smaller n becomes in the p-adic world. This turns our usual intuition upside down -- the number 1,000,000 is tiny in the 2-adic and 5-adic worlds because it is highly divisible by both 2 and 5.

The key tool is the p-adic valuation vp(n), which counts how many times p divides n. From this we define |n|p = p-vp(n). Numbers divisible by high powers of p have tiny p-adic absolute value, while numbers coprime to p always have |n|p = 1 regardless of how large they are.

Go deeper:Valuation Calculator

Explore the p-adic valuation vp(n) by entering any integer and selecting a prime. Watch the factorization process animate as n is repeatedly divided by p, and see how the resulting valuation determines the p-adic absolute value.

Key insight: The p-adic valuation measures divisibility depth. For example, v2(24) = 3 because 24 = 23 × 3, so |24|2 = 1/8. Meanwhile v2(15) = 0 because 15 is odd, giving |15|2 = 1. In the 2-adic world, 24 is much "smaller" than 15 -- the opposite of their real-world ordering.

Distance Comparison

Compare the real and p-adic distance heatmaps side by side, and hover over cells for exact values. Notice the p-adic blocks: numbers a multiple of p apart sit close together.

Distance Comparison

Compare real distance |a - b| with 2-adic distance |a - b|2 for integers 1 through 12. Darker cells mean the numbers are closer.

Prime p:

Real distance |a - b|

123456789101112123456789101112

2-adic distance |a - b|2

123456789101112123456789101112

Hover over a cell to see the exact distance

Close (small distance)
Far (large distance)
Go deeper:Distance Comparison

The p-adic absolute value induces a distance: dp(a, b) = |a - b|p. Compare the familiar real distance with the p-adic distance in these side-by-side heatmaps. Notice how the p-adic heatmap reveals striking block patterns -- numbers that differ by a multiple of p are close together, while consecutive integers can be far apart.

Key insight: The real distance heatmap shows a smooth gradient along the diagonal. The p-adic heatmap is dramatically different: it displays self-similar block structure. Numbers that are multiples of p apart (like 3 and 9 in the 3-adic world) are extremely close, while numbers just 1 apart (like 3 and 4) can be far. Closeness means divisibility, not proximity on the number line.

Ultrametric Inequality

Enter three integers and compare the real triangle with the p-adic one. Notice that the two longest p-adic sides are always equal.

Ultrametric Inequality

The p-adic absolute value satisfies the ultrametric inequality: |x + y|p ≤ max(|x|p, |y|p). A remarkable consequence is that every p-adic triangle is isosceles -- the two longest sides are always equal.

|x - y|2

1/2^2

= 0.2500

|y - z|2

1/2^2

= 0.2500

|x - z|2

1/2^3

= 0.1250

Ultrametric inequality: Satisfied

|x-y|2 ≤ max(|x-z|2, |y-z|2) ↔ 0.2500 ≤ 0.2500

Isosceles property: the two longest sides are equal (0.2500)

2-adic triangle

1/2^21/2^21/2^3x=2y=6z=10

Isosceles -- two longest sides equal

Real triangle (comparison)

448x=2y=6z=10

Real triangles need not be isosceles

Try these examples:

Go deeper:Ultrametric Inequality

The p-adic absolute value obeys a property far stronger than the triangle inequality. Instead of |x + y| ≤ |x| + |y|, we get |x + y|p ≤ max(|x|p, |y|p). This "ultrametric" property has a remarkable geometric consequence: every p-adic triangle is isosceles, with the two longest sides always equal.

Key insight: The ultrametric inequality means that in p-adic geometry, you can never have a "scalene" triangle where all three sides differ. If two sides have different lengths, the third must equal the longer one. This seemingly bizarre property is the foundation of p-adic topology and leads to phenomena like every point of a disk being its center.

Key Takeaways

  • Valuation -- vp(n) counts how many times p divides n
  • Absolute value -- |n|p = p-vp(n), so highly divisible numbers are small
  • Distance -- two numbers are close when their difference has many factors of p
  • Ultrametric inequality -- every p-adic triangle is isosceles

Spot a mistake or have an idea?

Search