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 ${\displaystyle \nu }$ such that ${\displaystyle p^{\nu }}$ divides n. The p-adic valuation of 0 is defined to be infinity. The p-adic valuation is commonly denoted ${\displaystyle \nu _{p}(n)}$. If n/d is a rational number in lowest terms, so that n and d are coprime, then ${\displaystyle \nu _{p}({\tfrac {n}{d}})}$ is equal to ${\displaystyle \nu _{p}(n)}$ if p divides n, or ${\displaystyle -\nu _{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]

## Definition and properties

### Integers

Let p be a prime number. The p-adic order or p-adic valuation for is the function ${\displaystyle \nu _{p}:\mathbb {Z} \to \mathbb {N} }$[2] defined by

${\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}}}$

where ${\displaystyle \mathbb {N} }$ denotes the natural numbers.

For example, ${\displaystyle \nu _{3}(45)=2}$ since ${\displaystyle 45=3^{2}\cdot 5^{1}}$.

### Rational numbers

The p-adic order can be extended into the rational numbers as the function ${\displaystyle \nu _{p}:\mathbb {Q} \to \mathbb {Z} }$[3] defined by

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

For example, ${\displaystyle \nu _{5}({\tfrac {9}{10}})=-1}$.

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}}}$

For example, ${\displaystyle |45|_{3}={\tfrac {1}{9}}}$ and ${\displaystyle |{\tfrac {9}{10}}|_{5}=5}$.

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.