In number theory, for a given prime number ${\displaystyle p}$, the ${\displaystyle p}$-adic order or ${\displaystyle p}$-adic valuation of a non-zero integer ${\displaystyle n}$ is the highest exponent ${\displaystyle \nu }$ such that ${\displaystyle p^{\nu }}$ divides ${\displaystyle n}$. The ${\displaystyle p}$-adic valuation of ${\displaystyle 0}$ is defined to be ${\displaystyle \infty }$. It is commonly denoted ${\displaystyle \nu _{p}(n)}$. If ${\displaystyle n/d}$ is a rational number in lowest terms, so that ${\displaystyle n}$ and ${\displaystyle d}$ are relatively prime, then ${\displaystyle \nu _{p}(n/d)}$ is equal to ${\displaystyle \nu _{p}(n)}$ if ${\displaystyle p}$ divides ${\displaystyle n}$, or ${\displaystyle -\nu _{p}(d)}$ if ${\displaystyle p}$ divides ${\displaystyle d}$, or to ${\displaystyle 0}$ if it divides neither. The most important application of the ${\displaystyle p}$-adic order is in constructing the field of ${\displaystyle 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 ${\displaystyle p}$ be a prime in ${\displaystyle \mathbb {Z} }$. The ${\displaystyle p}$-adic order or ${\displaystyle p}$-adic valuation for ${\displaystyle \mathbb {Z} }$ is defined as[2] ${\displaystyle \nu _{p}:\mathbb {Z} \to \mathbb {N} }$

${\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 ${\displaystyle p}$-adic order can be extended into the rational numbers. We can define[3] ${\displaystyle \nu _{p}:\mathbb {Q} \to \mathbb {Z} }$

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

Some properties are:

${\displaystyle \nu _{p}(m\cdot n)=\nu _{p}(m)+\nu _{p}(n)~.}$
${\displaystyle \nu _{p}(m+n)\geq \inf\{\nu _{p}(m),\nu _{p}(n)\}.}$ Moreover, if ${\displaystyle \nu _{p}(m)\neq \nu _{p}(n)}$, then ${\displaystyle \nu _{p}(m+n)=\inf\{\nu _{p}(m),\nu _{p}(n)\}.}$

where ${\displaystyle \inf }$ is the infimum (i.e. the smaller of the two).

## ${\displaystyle p}$-adic absolute value

The ${\displaystyle p}$-adic absolute value on ${\displaystyle \mathbb {Q} }$ is defined as ${\displaystyle |\,\cdot \,|_{p}:\mathbb {Q} \to \mathbb {R} }$

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

The ${\displaystyle p}$-adic absolute value satisfies the following properties.

{\displaystyle {\begin{aligned}|a|_{p}\geq 0&\quad {\text{Non-negativity}}\\|a|_{p}=0\iff a=0&\quad {\text{Positive-definiteness}}\\|ab|_{p}=|a|_{p}|b|_{p}&\quad {\text{Multiplicativeness}}\\|a+b|_{p}\leq |a|_{p}+|b|_{p}&\quad {\text{Subadditivity}}\\|a+b|_{p}\leq \max \left(|a|_{p},|b|_{p}\right)&\quad {\text{it is non-archimedean}}\\|-a|_{p}=|a|_{p}&\quad {\text{Symmetry}}\end{aligned}}}

A metric space can be formed on the set ${\displaystyle \mathbb {Q} }$ with a (non-archimedean, translation invariant) metric defined by ${\displaystyle d:\mathbb {Q} \times \mathbb {Q} \to \mathbb {R} }$

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

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