# P-adic number

A **p-adic number** is an element of the field \( \mathbb{Q}_p \), obtained by completing the field of rational numbers \( \mathbb{Q} \) with respect to a distance that measures divisibility by a fixed prime number \( p \) rather than ordinary size<sup>[1](https://encyclopediaofmath.org/wiki/P-adic_number)</sup>. Just as the real numbers fill in the gaps left in \( \mathbb{Q} \) by the usual absolute value, the p-adic numbers fill in the gaps left by a different absolute value, one under which two rationals are close when their difference is divisible by a high power of \( p \)<sup>[2](https://dept.math.lsa.umich.edu/~lagarias/575chomework/padic-operations.pdf)</sup>. [Kurt Hensel](https://www.edgepedia.org/kurt-hensel) introduced these numbers at the end of the 19th century, in an 1897 paper written in German<sup>[3](https://arxiv.org/abs/1701.06794)</sup>; one reference work dates the first introduction to a 1902 paper on algebraic numbers developed as power series<sup>[4](https://archive.lib.msu.edu/crcmath/math/math/p/p001.htm)</sup>.

| Key fact | Detail |
|---|---|
| Definition | \( \mathbb{Q}_p \) is the completion of \( \mathbb{Q} \) with respect to the p-adic norm \( |x|_p = p^{-v_p(x)} \), where \( v_p(x) \) is the exponent of \( p \) in \( x \)<sup>[1](https://encyclopediaofmath.org/wiki/P-adic_number)</sup> |
| Norm examples | \( |p|_p = 1/p \), \( |1|_p = 1 \), and \( |1/p|_p = p \)<sup>[2](https://dept.math.lsa.umich.edu/~lagarias/575chomework/padic-operations.pdf)</sup> |
| Ultrametric inequality | \( |x+y|_p \leq \max(|x|_p, |y|_p) \), the strong triangle inequality<sup>[4](https://archive.lib.msu.edu/crcmath/math/math/p/p001.htm)</sup> |
| Ring of integers | \( \mathbb{Z}_p \) is the ring of compatible residue sequences modulo \( p^{n+1} \), equivalently the projective limit of \( \mathbb{Z}/p^n\mathbb{Z} \), and the unit ball of \( \mathbb{Q}_p \)<sup>[1](https://encyclopediaofmath.org/wiki/P-adic_number)</sup><sup> • </sup><sup>[2](https://dept.math.lsa.umich.edu/~lagarias/575chomework/padic-operations.pdf)</sup> |
| Expansion | Every p-adic number can be written \( x = \sum_{k=k_0}^{\infty} a_k p^k \) with digits \( 0 \leq a_k < p \), converging in the p-adic metric<sup>[1](https://encyclopediaofmath.org/wiki/P-adic_number)</sup> |
| Completeness | \( \mathbb{Q}_p \) is complete and \( \mathbb{Q} \) is dense in it<sup>[2](https://dept.math.lsa.umich.edu/~lagarias/575chomework/padic-operations.pdf)</sup> |
| Central tool | Hensel's lemma lifts solutions of polynomial equations modulo \( p \) to genuine p-adic solutions under a nondegeneracy condition<sup>[5](https://dlk53.github.io/teaching/Math%20831%20Spring%202026/hensel.html)</sup> |

## The p-adic absolute value

For a nonzero rational number \( x \), write \( x = p^{\gamma} a/b \), where the integers \( a \) and \( b \) are not divisible by \( p \). The p-adic norm is then \( |x|_p = p^{-\gamma} \), and \( |0|_p = 0 \)<sup>[1](https://encyclopediaofmath.org/wiki/P-adic_number)</sup><sup> • </sup><sup>[6](https://arxiv.org/abs/1705.04758)</sup>. This convention makes numbers *more* divisible by \( p \) *smaller*: a rational with no factor of \( p \) in numerator or denominator has norm 1, while \( |p|_p = 1/p \) and \( |1/p|_p = p \)<sup>[2](https://dept.math.lsa.umich.edu/~lagarias/575chomework/padic-operations.pdf)</sup><sup> • </sup><sup>[7](https://empslocal.ex.ac.uk/people/staff/mrwatkin/zeta/p-adicsandadeles.htm)</sup>.

The resulting distance \( d_p(x, y) = |x - y|_p \) regards two rationals as close when their difference is divisible by a large power of \( p \)<sup>[8](https://androma.org/page/Metric%20Completion)</sup>. It satisfies not only the ordinary triangle inequality but the strong triangle inequality \( |x+y|_p \leq \max(|x|_p, |y|_p) \)<sup>[4](https://archive.lib.msu.edu/crcmath/math/math/p/p001.htm)</sup>. A consequence is that every triangle in a p-adic space is isosceles: whenever two sides of a triangle have different lengths, the third side equals the longer of the two<sup>[3](https://arxiv.org/abs/1701.06794)</sup>.

## Construction as a completion

The rationals are not complete under the p-adic distance: there are Cauchy sequences that fail to converge to a rational limit<sup>[2](https://dept.math.lsa.umich.edu/~lagarias/575chomework/padic-operations.pdf)</sup>. The field \( \mathbb{Q}_p \) is defined as the completion of \( \mathbb{Q} \) for this metric, and general theorems on topological fields guarantee that the completion is again a field<sup>[2](https://dept.math.lsa.umich.edu/~lagarias/575chomework/padic-operations.pdf)</sup>. The completed space is unique up to isomorphism<sup>[9](https://math.uchicago.edu/~may/REU2020/REUPapers/Pomerantz.pdf)</sup>. In \( \mathbb{Q}_p \) the rationals are dense, every [Cauchy sequence](https://www.edgepedia.org/cauchy-sequence) converges, and \( \mathbb{Z}_p \), the ring of p-adic integers, is exactly the unit ball centered at 0<sup>[2](https://dept.math.lsa.umich.edu/~lagarias/575chomework/padic-operations.pdf)</sup>.

There is also a purely algebraic construction. A **p-adic integer** is a sequence \( x = (x_0, x_1, \dots) \) of residues with \( x_n \) defined modulo \( p^{n+1} \) and \( x_n \equiv x_{n-1} \bmod p^n \) for \( n \geq 1 \); addition and multiplication are performed coordinatewise. The p-adic integers form a ring containing the ordinary integers, and the ring can be described as the projective limit \( \lim_n \mathbb{Z}/p^n\mathbb{Z} \)<sup>[1](https://encyclopediaofmath.org/wiki/P-adic_number)</sup>. The field of p-adic numbers \( \mathbb{Q}_p \) is the field of fractions of \( \mathbb{Z}_p \), and it contains \( \mathbb{Q} \) as a subfield<sup>[1](https://encyclopediaofmath.org/wiki/P-adic_number)</sup>.

## Expansions and intuition

Each element of \( \mathbb{Q}_p \) has a unique expansion \( x = \sum_{k=k_0}^{\infty} a_k p^k \) with integer digits \( 0 \leq a_k < p \), where \( k_0 \) may be negative, and the series converges in the p-adic metric<sup>[1](https://encyclopediaofmath.org/wiki/P-adic_number)</sup>. The p-adic valuation of a number is the smallest index \( k_0 \) at which its digits begin, and a p-adic integer is exactly a number with nonnegative valuation<sup>[2](https://dept.math.lsa.umich.edu/~lagarias/575chomework/padic-operations.pdf)</sup>.

The topology is very different from the Euclidean one. Because of the ultrametric inequality, open balls are simultaneously closed, and the geometry of \( \mathbb{Q}_p \) resembles a hierarchical, Cantor-like structure rather than a line<sup>[8](https://androma.org/page/Metric%20Completion)</sup>. There is no ordering of \( \mathbb{Q}_p \) compatible with its field structure<sup>[10](https://core.ac.uk/download/pdf/19139754.pdf)</sup>.

## Hensel's lemma and the local-global principle

Hensel's central discovery was that in a ring complete for a suitable topology, a solution of a polynomial equation modulo the ideal lifts to a genuine solution in the ring, provided a nondegeneracy condition holds; in the p-adic setting this is **Hensel's lemma**<sup>[5](https://dlk53.github.io/teaching/Math%20831%20Spring%202026/hensel.html)</sup>. The lemma is proved by a Newton iteration whose convergence is guaranteed by completeness of \( \mathbb{Q}_p \)<sup>[3](https://arxiv.org/abs/1701.06794)</sup>.

Hensel used the new numbers to solve a conjecture of Dedekind about discriminants in [algebraic number theory](https://www.edgepedia.org/algebraic-number-theory), and the p-adic numbers directly inspired [Ernst Steinitz](https://www.edgepedia.org/ernst-steinitz) to develop a general theory of fields<sup>[11](https://kconrad.math.uconn.edu/blurbs/gradnumthy/localglobal.pdf)</sup>. In the 1920s Hasse formulated the local-global principle, now usually called the [Hasse principle](https://www.edgepedia.org/hasse-principle), one of the chief applications of local field theory<sup>[4](https://archive.lib.msu.edu/crcmath/math/math/p/p001.htm)</sup>. The principle is a philosophy rather than a universal theorem, and equations exist that have solutions in every completion of \( \mathbb{Q} \) yet no rational solution<sup>[11](https://kconrad.math.uconn.edu/blurbs/gradnumthy/localglobal.pdf)</sup><sup> • </sup><sup>[12](https://scholarworks.aub.edu.lb/items/f944cf36-d628-4ab3-a89e-4989980509ea)</sup>.

## Applications in number theory

The p-adic viewpoint turns arithmetic questions into analytic ones. To show an equation has no rational solution, it suffices to show it has no solution in some completion: the equation \( X^2 = 2 \) has no solution in \( \mathbb{Q}_2 \), which immediately proves the irrationality of \( \sqrt{2} \)<sup>[4](https://archive.lib.msu.edu/crcmath/math/math/p/p001.htm)</sup>. Other classical applications include Skolem's p-adic method for Diophantine equations, the theorem that the harmonic numbers \( H_n \) are never integers except for \( H_1 \), proofs of the von Staudt-Clausen theorem, and the Mahler-Lech theorem<sup>[4](https://archive.lib.msu.edu/crcmath/math/math/p/p001.htm)</sup>.

Beyond \( \mathbb{Q}_p \) itself, the theory extends to finite extensions, to the algebraically closed completion \( \mathbb{C}_p \), and to \( \mathfrak{p} \)-adic numbers attached to prime divisors of general algebraic number fields<sup>[1](https://encyclopediaofmath.org/wiki/P-adic_number)</sup><sup> • </sup><sup>[13](https://sites.google.com/view/p-adicanalysisandzetavalues/)</sup>. Local fields such as \( \mathbb{Q}_p \) and their finite extensions play a prominent role in number theory and representation theory, and p-adic objects studied through the 20th century include p-adic modular and automorphic forms, p-adic differential equations, p-adic cohomologies, and p-adic Galois representations<sup>[14](https://kconrad.math.uconn.edu/math5020f11/)</sup><sup> • </sup><sup>[3](https://arxiv.org/abs/1701.06794)</sup>. p-adic [Hodge theory](https://www.edgepedia.org/hodge-theory), which connects p-adic Galois representations with filtered modules, is one of the main tools of modern arithmetic geometry<sup>[15](https://arxiv.org/abs/2005.07919)</sup>.

## Computation

A p-adic number is an infinite sequence of digits and cannot be stored exactly, so computer algebra systems work with truncations and must track precision<sup>[3](https://arxiv.org/abs/1701.06794)</sup>. Three implementation paradigms are in use: zealous arithmetic, which replaces p-adic numbers by closed balls and is the standard in Magma, SageMath, and PARI; lazy arithmetic, which computes digits on demand and is implemented in Mathemagix; and p-adic floating-point arithmetic<sup>[3](https://arxiv.org/abs/1701.06794)</sup>. Because \( \mathbb{Q}_p \) is uncountable while only countably many lazy p-adic numbers are computable, most p-adic numbers cannot be computed, and equality of two lazy p-adic numbers is undecidable as a consequence of Turing's halting problem<sup>[3](https://arxiv.org/abs/1701.06794)</sup>.

## p-adic numbers in physics

p-Adic mathematical physics, the application of p-adic methods to physical modeling, emerged in 1987 from efforts to find a non-Archimedean approach to spacetime and string dynamics at the Planck scale, and later extended to biology and other sciences<sup>[6](https://arxiv.org/abs/1705.04758)</sup>. Motivations include the quantum-gravity restriction on measuring distances below the [Planck length](https://www.edgepedia.org/planck-length), which breaks the Archimedean axiom underlying the real numbers, and the fact that p-adic numbers carry an inherently hierarchical ultrametric structure suited to modeling complex systems<sup>[6](https://arxiv.org/abs/1705.04758)</sup>. Topics in the field include p-adic string theory, p-adic wavelets, p-adic quantum theory and cosmology, and p-adic models of the genetic code and cognition<sup>[6](https://arxiv.org/abs/1705.04758)</sup>.

## References

1. [P-adic number, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/P-adic_number)
2. [A first introduction to p-adic numbers, University of Michigan lecture notes (J. Lagarias)](https://dept.math.lsa.umich.edu/~lagarias/575chomework/padic-operations.pdf)
3. [Xavier Caruso (2017). Computations with p-adic numbers. arXiv.](https://arxiv.org/abs/1701.06794)
4. [p-adic Number, CRC Concise Encyclopedia of Mathematics archive](https://archive.lib.msu.edu/crcmath/math/math/p/p001.htm)
5. [D. Katz. Hensel's Lemma and Some Applications, University of Kansas](https://dlk53.github.io/teaching/Math%20831%20Spring%202026/hensel.html)
6. [B. Dragovich, A. Yu. Khrennikov, S. V. Kozyrev, I. V. Volovich, E. I. Zelenov (2017). p-Adic Mathematical Physics: The First 30 Years. arXiv.](https://arxiv.org/abs/1705.04758)
7. [p-adic numbers and adeles, University of Exeter notes](https://empslocal.ex.ac.uk/people/staff/mrwatkin/zeta/p-adicsandadeles.htm)
8. [Metric Completion, Androma reference](https://androma.org/page/Metric%20Completion)
9. [An introduction to the p-adic numbers, University of Chicago REU (D. Pomerantz)](https://math.uchicago.edu/~may/REU2020/REUPapers/Pomerantz.pdf)
10. [Orderability of fields, CORE repository text](https://core.ac.uk/download/pdf/19139754.pdf)
11. [Keith Conrad. The Local-Global Principle, University of Connecticut](https://kconrad.math.uconn.edu/blurbs/gradnumthy/localglobal.pdf)
12. [The local-global principle for diophantine equations, American University of Beirut thesis](https://scholarworks.aub.edu.lb/items/f944cf36-d628-4ab3-a89e-4989980509ea)
13. [p-adic analysis & zeta values, lecture series site](https://sites.google.com/view/p-adicanalysisandzetavalues/)
14. [Math 5020: Local Fields, Keith Conrad, University of Connecticut](https://kconrad.math.uconn.edu/math5020f11/)
15. [Hodge Theory of p-adic varieties: a survey. arXiv.](https://arxiv.org/abs/2005.07919)

---
*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Numbers and algebra › Arithmetic and number systems › Number systems › p-adic numbers*

*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
