👉 In mathematics, a metric is a function that assigns a number to each pair of points in a set so that two distinct points are "close" if and only if their distance is measured by this number. This concept is fundamental in various branches of mathematics, including geometry, topology, measure theory, and probability. A metric can be defined on any set X (a topological space) or on any non-empty subset A of Rn (the real numbers). The definition of a metric depends on