For every prime number *p*, the ** p-adic numbers** form an extension field of the rational numbers first described by Kurt Hensel in 1897. They have been used to solve several problems in number theory, many of them using Helmut Hasse's local-global principle, which roughly states that an equation can be solved over the rational numbers if and only if it can be solved over the real numbers

Table of contents |

2 Constructions 3 Properties 4 Generalizations and related concepts |

If *p* is a fixed prime number, then any integer can be written as a *p-adic expansion* (usually referred to as writing the number in "base *p*") in the form

The familiar approach to generalizing this description to the larger domain of the rationals (and, ultimately, the real numbers) is to include sums of the form:

As an alternative, if we extend the *p*-adic expansions by allowing infinite sums of the form

Intuitively, as opposed to *p*-adic expansions which extend to the *right* as sums of ever smaller, increasingly negative powers of the base *p* (as is done for the real numbers as described above), these are numbers whose *p*-adic expansion to the *left* are allowed to go on forever. The main technical problem is to define a proper notion of infinite sum which makes these expressions meaningful; two different but equivalent solutions to this problem will be presented below.

The real numbers can be defined as equivalence classes of Cauchy sequences of rational numbers; this allows us to, for example, write 1 as 1.000... = 0.999... . However, the definition of a Cauchy sequence relies on the metric chosen and, by choosing a different one, numbers other than the real numbers can be constructed. The usual metric which yields the real numbers is called the Euclidean metric.

For a given prime *p*, we define the *p-adic metric* in **Q** as follows:
for any non-zero rational number *x*, there is a unique integer *n* allowing us to write *x* = *p*^{n}(*a*/*b*), where neither of the integers *a* and *b* is divisible by *p*. Unless the numerator or denominator of *x* contains a factor of *p*, *n* will be 0. Now define |*x*|_{p} = *p*^{-n}. We also define |0|_{p} = 0.

For example with *x* = 63/550 = 2^{-1} 3^{2} 5^{-2} 7 11^{-1}

It can be proved that each norm on **Q** is equivalent either to the Euclidean norm or to one of the *p*-adic norms for some prime *p*. The *p*-adic norm defines a metric d_{p} on **Q** by setting

It can be shown that in **Q**_{p}, every element *x* may be written in a unique way as

We start with the inverse limit of the rings
**Z**_{pn} (see modular arithmetic): a *p*-adic integer is then a sequence
(*a _{n}*)

Every natural number *m* defines such a sequence (*m mod p ^{n}*), and can therefore be regarded as a

Note that pointwise addition and multiplication of such sequences is well defined, since addition and multiplication commute with the *mod* operator, see modular arithmetic. Also, every sequence (*a _{n}*) where the first element is not 0 has an inverse: since in that case, for every

Every such sequence can alternatively be written as a series of the form we considered above. For instance, in the 3-adics, the sequence (2, 8, 8, 35, 35, ...) can be written as 2 + 2*3 + 0*3^{2} + 1*3^{3} + 0*3^{4} + ... The partial sums of this latter series are the elements of the given series.

The ring of *p*-adic integers has no zero divisors, so we can take the quotient field to get the field **Q**_{p} of *p*-adic numbers. Note that in this quotient field, every number can be uniquely written as *p ^{-n}u* with a natural number

The set of *p*-adic integers is uncountable.

The *p*-adic numbers contain the rational numbers **Q** and form a field of characteristic 0. This field cannot be turned into an ordered field.

The topology of the set of *p*-adic integers is that of a Cantor set; the topology of the set of *p*-adic numbers is that of a Cantor set minus a point (which would naturally be called infinity). In particular, the space of *p*-adic integers is compact while the space of *p*-adic numbers is not; it is only locally compact.
As metric spaces, both the *p*-adic integers and the *p*-adic numbers are complete.

The real numbers have only a single proper algebraic extension, the complex numbers;
in other words, this quadratic extension is already algebraically closed.
By contrast, the algebraic closure of the *p*-adic numbers has infinite degree. Furthermore, **Q**_{p} has infinitely many inequivalent algebraic extensions.

The number *e*, defined as the sum of reciprocals of factorials, is not a member of any *p*-adic field; but *e ^{p}* is a

Over the reals, the only functions whose derivative is zero are the constant functions. This is not true over **Q**_{p}. For instance, the function *f*(*x*) = (|*x*|_{p})^{2} has zero derivative everywhere but is not even locally constant at 0.

Given any elements *r*_{∞}, *r*_{2}, *r*_{3}, *r*_{5}, *r*_{7}, ... where *r*_{p} is in **Q**_{p} (and **Q**_{∞} stands for **R**), it is possible to find a sequence (*x*_{n}) in **Q** such that for all *p* (including ∞), the limit of *x*_{n} in **Q**_{p} is *r*_{p}.

The reals and the *p*-adic numbers are the completions of the rationals; it is also possible to complete other fields, for instance general algebraic number fields, in an analogous way. This will be described now.

Suppose *D* is a Dedekind domain and *E* is its quotient field. The non-zero prime ideals of *D* are also called *finite places* or *finite primes* of *E*. If *x* is a non-zero element of *E*, then *xD* is a fractional ideal and can be uniquely factored as a product of positive and negative powers of finite primes of *E*. If *P* is such a finite prime, we write ord_{P}(*x*) for the exponent of *P* in this factorization, and define

Often, one needs to simultaneously keep track of all the above mentioned completions, which are seen as encoding "local" information. This is accomplished by adele rings and idele groups.