In number theory, for a given prime number p, the p-adic order or p-adic valuation of a non-zero integer n is the highest exponent ν such that pν divides n. The p-adic valuation of 0 is defined to be infinity. The p-adic valuation is commonly denoted νp(n). If n/d is a rational number in lowest terms, so that n and d are relatively prime, then νp(n/d) is equal to νp(n) if p divides n, or -νp(d) if p divides d, or to 0 if it divides neither. The most important application of the p-adic order is in constructing the field of p-adic numbers. It is also applied toward various more elementary topics, such as the distinction between singly and doubly even numbers.[1]

Distribution of natural numbers by their 2-adic order, labeled with corresponding powers of two in decimal. Zero always has an infinite order

## Definition and properties

### Integers

Let p be a prime in . The p-adic order or p-adic valuation for is defined as νp : [2]

${\displaystyle \nu _{p}(n)={\begin{cases}\mathrm {max} \{v\in \mathbb {N} :p^{v}\mid n\}&{\text{if }}n\neq 0\\\infty &{\text{if }}n=0\end{cases}}}$

### Rational numbers

The p-adic order can be extended into the rational numbers. We can define ${\displaystyle \nu _{p}:\mathbb {Q} \to \mathbb {Z} }$ [3]

${\displaystyle \nu _{p}\left({\frac {a}{b}}\right)=\nu _{p}(a)-\nu _{p}(b).}$

Some properties are:

{\displaystyle {\begin{aligned}\nu _{p}(m\cdot n)&=\nu _{p}(m)+\nu _{p}(n).\\[5px]\nu _{p}(m+n)&\geq \inf {\bigl \{}\nu _{p}(m),\nu _{p}(n){\bigr \}}.\end{aligned}}}

Moreover, if ${\displaystyle \nu _{p}(m)\neq \nu _{p}(n)}$, then

${\displaystyle \nu _{p}(m+n)=\inf {\bigl \{}\nu _{p}(m),\nu _{p}(n){\bigr \}}}$

where inf is the infimum (i.e. the smaller of the two).

The p-adic absolute value on is defined as |·|p :

${\displaystyle |x|_{p}={\begin{cases}p^{-\nu _{p}(x)}&{\text{if }}x\neq 0\\0&{\text{if }}x=0\end{cases}}}$

The p-adic absolute value satisfies the following properties:

 Non-negativity ${\displaystyle |a|_{p}\geq 0}$ Positive-definiteness ${\displaystyle |a|_{p}=0\iff a=0}$ Multiplicativity ${\displaystyle |ab|_{p}=|a|_{p}|b|_{p}}$ Non-Archimedean ${\displaystyle |a+b|_{p}\leq \max \left(|a|_{p},|b|_{p}\right)}$

The “symmetry” ${\displaystyle |-a|_{p}=|a|_{p}}$ follows from multiplicativity ${\displaystyle |ab|_{p}=|a|_{p}|b|_{p}}$ and subadditivity ${\displaystyle |a+b|_{p}\leq |a|_{p}+|b|_{p}}$ from the non-Archimedean triangle inequality ${\displaystyle |a+b|_{p}\leq \max \left(|a|_{p},|b|_{p}\right)}$.

A metric space can be formed on the set with a (non-Archimedean, translation-invariant) metric defined by d : ×

${\displaystyle d(x,y)=|x-y|_{p}.}$

The p-adic absolute value is sometimes referred to as the "p-adic norm", although it is not actually a norm because it does not satisfy the requirement of homogeneity.

The choice of base p in the formula makes no difference for most of the properties, but results in the product formula:

${\displaystyle \prod _{0,p}|x|_{p}=1}$

where the product is taken over all primes p and the usual absolute value (Archimedean norm), denoted ${\displaystyle |x|_{0}}$. This follows from simply taking the prime factorization: each prime power factor ${\displaystyle p^{k}}$ contributes its reciprocal to its p-adic absolute value, and then the usual Archimedean absolute value cancels all of them.