section_path: Abstract algebra/p -adic numbers
section_name: p -adic numbers
paragraph_text: p -adic numbers
  
  The p {\displaystyle p} -adic order ν p (n) {\displaystyle \nu _{p}(n)} of an integer n {\displaystyle n} is the number of copies of p {\displaystyle p} in the prime factorization of n {\displaystyle n}. The same concept can be extended from integers to rational numbers by defining the p {\displaystyle p} -adic order of a fraction m / n {\displaystyle m/n} to be ν p (m) − ν p (n) {\displaystyle \nu _{p}(m)-\nu _{p}(n)}. The p {\displaystyle p} -adic absolute value | q | p {\displaystyle |q|_{p}} of any rational number q {\displaystyle q} is then defined as | q | p = p − ν p (q) {\displaystyle |q|_{p}=p^{-\nu _{p}(q)}}. Multiplying an integer by its p {\displaystyle p} -adic absolute value cancels out the factors of p {\displaystyle p} in its factorization, leaving only the other primes. Just as the distance between two real numbers can be measured by the absolute value of their distance, the distance between two rational numbers can be measured by their p {\displaystyle p} -adic distance, the p {\displaystyle p} -adic absolute value of their difference. For this definition of distance, two numbers are close together (they have a small distance) when their difference is divisible by a high power of p {\displaystyle p}. In the same way that the real numbers can be formed from the rational numbers and their distances, by adding extra limiting values to form a complete field, the rational numbers with the p {\displaystyle p} -adic distance can be extended to a different complete field, the p {\displaystyle p} -adic numbers.
  
  This picture of an order, absolute value, and complete field derived from them can be generalized to algebraic number fields and their valuations (certain mappings from the multiplicative group of the field to a totally ordered additive group, also called orders), absolute values (certain multiplicative mappings from the field to the real numbers, also called norms), and places (extensions to complete fields in which the given field is a dense set, also called completions). The extension from the rational numbers to the real numbers, for instance, is a place in which the distance between numbers is the usual absolute value of their difference. The corresponding mapping to an additive group would be the logarithm of the absolute value, although this does not meet all the requirements of a valuation. According to Ostrowski's theorem, up to a natural notion of equivalence, the real numbers and p {\displaystyle p} -adic numbers, with their orders and absolute values, are the only valuations, absolute values, and places on the rational numbers. The local-global principle allows certain problems over the rational numbers to be solved by piecing together solutions from each of their places, again underlining the importance of primes to number theory.