Metric Spaces
Let be a set. A metric on is a function that assigns a distance to each pair of points and satisfies the metric axioms for all
The third axiom is the triangle inequality. A metric space is a set equipped with a metric, and is written when the metric is understood. Any subset is a metric space with the restriction of to the metric subspace The real numbers with and with the Euclidean distance are metric spaces, the latter being the Euclidean space Any set is a metric space under the discrete metric, which is when and otherwise.
A normed vector space is a vector space over or with a function its norm, that satisfies the norm axioms for all and scalars
The norm of an inner product space satisfies these axioms by the Cauchy-Schwarz inequality. Every normed vector space is a metric space with the induced metric For the -norm and the maximum norm on are
of which is the Euclidean norm, is the Manhattan norm and as The triangle inequality for the -norm is the Minkowski inequality.
Let be a metric space, and The open ball, closed ball and sphere of radius centred at are the sets of points at distance less than, at most and exactly from
A set is open if every point of is the centre of some open ball contained in and a set is closed if its complement is open.
In with the Euclidean distance this is the earlier definition of an open set. Open balls are open and closed balls, spheres and finite sets are closed; open intervals are open in and closed intervals are closed. A set can be both open and closed, as and are, or neither, as is in Under the discrete metric every set is open. Open and closed sets have the following properties:
- and are open and closed;
- the union of any collection of open sets is open and the intersection of finitely many open sets is open;
- the intersection of any collection of closed sets is closed and the union of finitely many closed sets is closed.
The finiteness conditions cannot be dropped: is an intersection of open sets that is not open.
Let and is an interior point of if some open ball centred at is contained in a limit point of if every open ball centred at contains a point of other than and an isolated point of if and some open ball centred at contains no other point of The interior of is the set of its interior points, the closure of is the union of and its limit points and the boundary of is the closure without the interior.
The interior is the largest open set contained in and the closure is the smallest closed set containing so is open if and only if and closed if and only if which holds if and only if contains all of its limit points. The boundary is closed and if and only if every open ball centred at meets both and For example, in the interval has interior closure and boundary whereas the rational numbers have empty interior and closure A set is dense in if as is in
A set is bounded if it is contained in some ball, and its diameter is the supremum of the distances between its points.
A sequence of points of converges to written if and only if the distances converge to as a sequence of real numbers.
Equivalently, every open ball centred at contains all but finitely many terms of the sequence. A convergent sequence has exactly one limit and is bounded. In a sequence converges if and only if each of its coordinates converges, and in a metric subspace convergence means convergence in the whole space with the limit lying in the subspace. Let be an increasing sequence of indices. The sequence is a subsequence of and every subsequence of a convergent sequence converges to the same limit.
Convergence determines the closed sets: if and only if is the limit of a sequence of points of so is closed if and only if it contains the limit of every convergent sequence of its points.
Let and be metric spaces, be a function and is continuous at if and only if points close to are mapped to points close to and continuous on if it is continuous at every point.
For real functions of one or several real variables this is the earlier definition of continuity. The following are equivalent:
- is continuous on
- whenever in
- the inverse image of every open set is open in
- the inverse image of every closed set in is closed in
A composition of continuous functions is continuous. The metric is itself continuous in each argument, since and in a normed vector space the norm, addition and scalar multiplication are continuous.
is uniformly continuous if can be chosen to depend on alone, Lipschitz continuous with constant if for all and an isometry if it preserves distances, An isometry is injective and Lipschitz continuous with constant and Lipschitz continuity implies uniform continuity, which implies continuity.
Two metrics and on are equivalent if they have the same open sets, which holds if and only if they have the same convergent sequences with the same limits, and strongly equivalent if there are constants with
Strongly equivalent metrics are equivalent and have the same bounded sets, Cauchy sequences and uniformly continuous functions, whereas equivalent metrics need not: is equivalent to the usual metric on but makes bounded. Two norms are equivalent if their induced metrics are strongly equivalent. Any two norms on are equivalent, since
so open sets, convergence and continuity in do not depend on which norm is used.