*When is 144 closer to 8 than to 143?*

The usual definition of the *norm* of a real number is its modulus or absolute value . We measure the “distance” between two real numbers by means of the absolute value of their difference. This gives the Euclidean metric and, using it, we can define the usual topology on the real numbers .

The standard arrangement of the real numbers on a line automatically ensures that numbers with small Euclidean difference between them are geometrically close to each other. It may come as a surprise that there are other ways to define norms and distances, which provide other topologies, leading us to a radically different concept of closeness, and to completely new number systems, the p-adic numbers.

**The 2-adic valuation**

The -adic valuation — or -adic order (Katok, 2007) — of an integer is the function

In words, the -adic valuation of is **the index of the largest power of that divides .**

We shall be concerned exclusively with the case . The “degree of evenness” of a number can be expressed in terms of the 2-adic valuation. For an integer , the 2-adic valuation is the largest natural number such that divides . It is normally written . For even integers, ; for odd integers, . By convention, (since zero is divisible by every power of ).

The valuation can be extended to the rational numbers :

It is easily proved that, for any two rational numbers, and , , so that

with equality holding if . This is known as the *strong triangle inequality*. It has some surprising consequences, one of which is that, in this geometry, all triangles are isosceles!

We note that the concept of “closeness” under the 2-adic norm is completely different to the usual notion of nearness. For example, the Euclidean difference between the two numbers 3 and 8 is 5, since . But we have . Indeed, all the odd numbers are at unit distance from 8. Stranger still, we have

so that 144 is much closer to 8 than is 143. It takes some time to build intuition about these matters, but p-adic evaluations are powerful allies in number theory.

**The 2-adic distance between numbers**

We can use the 2-adic norm to define the distance between any two rational numbers. For simplicity we will confine attention below to the integers, although the ideas are more general.

**The 2-adic distance** between any two natural numbers and , written , is defined as , where is the 2-adic valuation of the difference between the numbers. It is **the inverse of the largest power of 2 that divides the difference.** It always takes one of the values .

In the Figure here, we show the first 32 natural numbers. Considering the entire set of integers , we can guarantee only that two arbitrary integers differ by a multiple of , so the maximal distance is . Thus, all the numbers shown in the figure — and indeed all the integers — have distance of at most from each other.

In the figure below (left panel) we separate the numbers into those with even parity and those with odd parity. Within each of these two sets, any two numbers always differ by an even number, so the 2-adic distance is always at most . Thus, the numbers in either magenta region are closer to each other than are two numbers with one in each region.

In the figure (right panel), we separate the numbers into four sets, in which all numbers differ by a multiple of 4. Thus, two numbers within a single green region differ by at most . The distance between numbers in different green regions is at least .

Continuing the process, all numbers within a single red region in the figure below (left panel) differ by a multiple of 8 and so are distant from each other by at most .

Finally, all numbers within a blue region in the figure (right panel) differ by a multiple of 16 and so are distant from each other by at most .

**Clopen Balls**

The p-adic numbers are defined by forming the closure of the field of rational numbers in the topology arising from the p-adic metric. We will not discuss this (see Katok, 2007) but we will consider the open-and-closed balls defined for this metric. The open ball is the set of points whose p-adic distance from is less than :

It turns out that is both open and closed: it is a *clopen set*. Even more intriguing is that every point of a ball is its centre:

The coloured regions we have shown in the figures above are open balls (of course, we have only included a small number of elements). For example, the grey area is ; the top right red area is and the bottom right blue region is .

**More Visualisations**

There are many other ways to depict the rational numbers so as to emphasise properties such as distance apart (Lynch and Mackey, 2022). With some graphical expertise, we could stack the figures above in a vertical tower, with the vertical coordinate being the 2-adic valuation for the innermost regions.

The illustration below, showing a fractal tower of 3-adic numbers, is from a recent article in *Quanta* Magazine (Houston-Edwards, 2020). Similar diagrams can be constructed for p-adic numbers with other primes (see Katok, 2007).

**Sources**

Katok, Svetlana, 2007: * p-adic Analysis Compared with Real.* Student Math. Lib., Vol. 37. Amer. Math. Soc., ISBN: 978-0-8218-4220-1.

Kelsey Houston-Edwards, 2020: An Infinite Universe of Number Systems. *Quanta Magazine*, October 19, 2020. LINK.

Lynch, Peter & Michael Mackey, 2022: Parity and Partition of the Rational Numbers. arXiv.

Wikipedia article: *p-adic Number*.