P-adic valuation

In number theory, the $p$-adic valuation or $p$-adic order of an integer $p$ is the exponent of the highest power of the prime number $n$ that divides $p$. It is denoted $$\nu_p(n)$$. Equivalently, $$\nu_p(n)$$ is the exponent to which $$p$$ appears in the prime factorization of $$n$$.

The $n$-adic valuation is a valuation and gives rise to an analogue of the usual absolute value. Whereas the completion of the rational numbers with respect to the usual absolute value results in the real numbers $$\mathbb{R}$$, the completion of the rational numbers with respect to the $$p$$-adic absolute value results in the $p$-adic numbers $$\mathbb{Q}_p$$.

Definition and properties
Let $p$ be a prime number.

Integers
The $p$-adic valuation of an integer $$n$$ is defined to be

\nu_p(n)= \begin{cases} \mathrm{max}\{k \in \mathbb{N}_0 : p^k \mid n\} & \text{if } n \neq 0\\ \infty & \text{if } n=0, \end{cases} $$ where $$\mathbb{N}_0$$ denotes the set of natural numbers (including zero) and $$m \mid n$$ denotes divisibility of $$n$$ by $$m$$. In particular, $$\nu_p$$ is a function $$\nu_p \colon \mathbb{Z} \to \mathbb{N}_0 \cup\{\infty\} $$.

For example, $$\nu_2(-12) = 2$$, $$\nu_3(-12) = 1$$, and $$\nu_5(-12) = 0$$ since $$|{-12}| = 12 = 2^2 \cdot 3^1 \cdot 5^0$$.

The notation $$p^k \parallel n$$ is sometimes used to mean $$k = \nu_p(n)$$.

If $$n$$ is a positive integer, then


 * $$\nu_p(n) \leq \log_p n$$;

this follows directly from $$n \geq p^{\nu_p(n)}$$.

Rational numbers
The $p$-adic valuation can be extended to the rational numbers as the function


 * $$\nu_p : \mathbb{Q} \to \mathbb{Z} \cup\{\infty\} $$

defined by



\nu_p\left(\frac{r}{s}\right)=\nu_p(r)-\nu_p(s). $$

For example, $$\nu_2 \bigl(\tfrac{9}{8}\bigr) = -3$$ and $$\nu_3 \bigl(\tfrac{9}{8}\bigr) = 2$$ since $$\tfrac{9}{8} = 2^{-3}\cdot 3^2$$.

Some properties are:
 * $$\nu_p(r\cdot s) = \nu_p(r) + \nu_p(s)$$
 * $$\nu_p(r+s) \geq \min\bigl\{ \nu_p(r), \nu_p(s)\bigr\}$$

Moreover, if $$\nu_p(r) \neq \nu_p(s)$$, then


 * $$\nu_p(r+s)= \min\bigl\{ \nu_p(r), \nu_p(s)\bigr\}$$

where $$\min$$ is the minimum (i.e. the smaller of the two).

$p$-adic absolute value
The $p$-adic absolute value (or $p$-adic norm, though not a norm in the sense of analysis) on $\mathbb{Q}$ is the function
 * $$|\cdot|_p \colon \Q \to \R_{\ge 0} $$

defined by
 * $$|r|_p = p^{-\nu_p(r)} .$$

Thereby, $$|0|_p = p^{-\infty} = 0$$ for all $$p$$ and for example, $$|{-12}|_2 = 2^{-2} = \tfrac{1}{4}$$ and $$\bigl|\tfrac{9}{8}\bigr|_2 = 2^{-(-3)} = 8 .$$

The $p$-adic absolute value satisfies the following properties.


 * {| class="wikitable"

From the multiplicativity $$|r s|_p = |r|_p|s|_p$$ it follows that $$|1|_p=1=|-1|_p$$ for the roots of unity $$1$$ and $$-1$$ and consequently also $$|{-r}|_p = |r|_p .$$ The subadditivity $$|r+s|_p \leq |r|_p + |s|_p$$ follows from the non-Archimedean triangle inequality $$|r+s|_p \leq \max\left(|r|_p, |s|_p\right)$$.
 * Non-negativity || $$|r|_p \geq 0$$
 * Positive-definiteness || $$|r|_p = 0 \iff r = 0$$
 * Multiplicativity || $$|r s|_p = |r|_p|s|_p$$
 * Non-Archimedean || $$|r+s|_p \leq \max\left(|r|_p, |s|_p\right)$$
 * }
 * Multiplicativity || $$|r s|_p = |r|_p|s|_p$$
 * Non-Archimedean || $$|r+s|_p \leq \max\left(|r|_p, |s|_p\right)$$
 * }
 * }

The choice of base $p$ in the exponentiation $$p^{-\nu_p(r)} $$ makes no difference for most of the properties, but supports the product formula:
 * $$\prod_{0, p} |r|_p = 1$$

where the product is taken over all primes $p$ and the usual absolute value, denoted $$|r|_0$$. This follows from simply taking the prime factorization: each prime power factor $$p^k$$ contributes its reciprocal to its $p$-adic absolute value, and then the usual Archimedean absolute value cancels all of them.

A metric space can be formed on the set $$\mathbb{Q}$$ with a (non-Archimedean, translation-invariant) metric
 * $$d \colon \Q \times \Q \to \R_{\ge 0} $$

defined by
 * $$d(r,s) = |r-s|_p .$$

The completion of $$\mathbb{Q}$$ with respect to this metric leads to the set $$\mathbb{Q}_p$$ of $p$-adic numbers.