The set Qp of p-adic numbers is the completion of the space of all rationals Q when the latter is endowed with a special metric |.|p. Not only Qp is different from R (giving the first example of the dependency of the completion on the underlying metric), but Qp, being defined for every prime p, supplies a sequence of distinct completions of the same set of the rationals.

First, for every prime p, we define norm |.|p, on the set Q of rational numbers. Every nonzero rational number q = r/s admits a unique factorization in the form

q = ±pnp1n1p2n2 ·...· pmnm = pn (u / v),

where p and pk are distinct primes and the exponents n and nk may be positive or negative, depending on the prevalence of the power of the corresponsing prime in the numerator or denominator of q; u and v are integers prime to p.

### Definition

|q|p = p-n,

where n is the exponent of p in the above factorization. Separately we also define |0|p = 0. As an example,

|1001/1000 - 1|2 = |1/1000|2 = |2-35-3|2 = 8.

Which shows that 1001/1000 and 1 are not at all close in Q2. In Q5, the situation is even worse: |1001/1000 - 1|5 = 125. Note, however that for any integer n and prime p, |n|p ≤ 1.

|.|p has three important properties that qualify it as a norm:

 1 |u|p = 0 only if u = 0. 2 |uv|p = |u|p|v|p, for any rational u and v 3 |u + v|p ≤ |u|p + |v|p, for any rational u and v

In fact the triangle inequality in 3. can be strengthened

 3'. |u + v|p ≤ max{|u|p, |v|p}, for any rational u and v.

An even stronger result holds:

 3''. For |u|p ≠ |v|p, |u + v|p = max{|u|p, |v|p}, for any rational u and v.

To prove the latter, assume |u|p < |v|p. Then, by 3', |u + v|p ≤ |v|p. On the other hand, |v|p = |u + v - u|p ≤ max{|u + v|p, |u|p} = |u + v|p, due to our assumption.

Norm |.|p is called the p-adic norm (or p-adic absolute value). It was introduced by Kurt Hensel, a student of Leopold Kronecker, in 1902.

The availability of the triangle inequality leads to a definition of a metric dp(u, v) = |u - v|p and, subsequently, to the completion Qp of Q. The members of Qp are known as p-adic numbers. p-adic numbers u that satisfy |u|p ≤ 1 are called p-adic integers. p-adic integers form a commutative ring Zp (not to be confused with the field of residues modulo p which uses the same notation.) The set of integers Z is dense in Zp, meaning that every p-adic integer is a limit (in the p-norm of an integer sequence.) Any (reduced) fraction whose denominator contains no factors of p belongs to Zp. p is the only prime p-adic integer.

It is easy to give an example of an integer sequence which is Cauchy in the sense of the p-adic norm. The motivation comes from |pn|p = p-n. Set

 x0 = 1, x1 = 1 + p, x2 = 1 + p + p², x3 = 1 + p + p² + p³, ... xn = 1 + p + p² + ... + pn, ...

For the sequence {xk}, assuming n > m,

 |xn - xm|p = |pm+1 + ... + pn|p = p-(m+1)

which tends to 0 as m (and hence n) grows. What p-adic number does {xk} converge to? This is a particular case of what is known as a p-adic expansion.

### References

1. E. B. Berger, Exploring the Number Jungle, AMS, 2000
2. J. R. Goldman, The Queen of Mathematics, A K Peters, 1998
3. F. Q. Gouvêa, Local and Global in Number Theory, in The Princeton Companion to Mathematics T. Gowers (ed.), Princeton University Press, 2008  Strange as it may appear, we'll write

 q = 1 + p + ... + pm + ...

As we just said, q is well defined as a limit of the sequence {xk} and this is how the identity should be understood. All arithmetic operations are permitted to carry over the limits so that

 q = 1 + p + ... + pm + ... pq = p + p² + ... + pm+1 + ... pq + 1 = 1 + p + ... + pm + ... = q

So that pq + 1 = q, implying q = 1 / (1 - p). Taking p = 2 we obtain:

 -1 = 1 + 2 + 4 + ...

One certainly needs time and effort to get used to such weirdness. 