The p-adic integers ℤ_p form an ultrametric space: d(x,y) = p^(−v_p(x−y)) where v_p is the p-adic valuation. Numbers are "close" when they share many digits in base p. The tree below shows this metric structure — siblings at depth k are distance p^(−k) apart.
Hover a node to see its p-adic representation
Click a node to highlight its ultrametric ball. p-adic distance satisfies the strong triangle inequality: d(x,z) ≤ max(d(x,y), d(y,z))