 The metric topology on a metric space "M" is the coarsest topology on "M" relative to which the metric "d" is a continuous map from the product of "M" with itself to the non-negative real numbers.A simple way to construct a function separating a point from a closed set (as required for a completely regular space) is to consider the distance between the point and the set.If ("M","d") is a metric space, "S" is a subset of "M" and "x" is a point of "M", we define the distance from "x" to "S" as

Then "d"("x", "S") = 0 if and only if "x" belongs to the closure of "S".