Metric space

In mathematics, a metric space is, roughly speaking, an abstract mathematical structure that generalizes the notion of a Euclidean space $$\mathbb{R}^n$$ which has been equipped with the Euclidean distance, to more general classes of sets such as a set of functions. The notion of a metric space consists of two components, a set and a metric in that set. In a metric space, the metric replaces the Euclidean distance as a notion of "distance" between any pair of elements in its associated set (for example, as an abstract distance between two functions in a set of functions) and induces a topology in the set called the metric topology.

The theory of metric spaces includes the following topics: isometric embeddings and universal metric spaces (in the sense of isometric embeddings); metric maps (which do not increase distances); the category of metric spaces and metric maps, and its subcategories; injective metric spaces and related notions; special classes of metric spaces like strongly convex spaces; metric generalizations of the notions of differential geometry; metric properties of the metric spaces which appear in other branches of mathematics (e.g. Banach spaces, in particular Hilbert spaces).

The topic of metric spaces can be attractive both to children and to research mathematicians. Certain deeper directions in the theory of metric spaces are closely related to the approximation theory.

Every simple graph can be viewed as a metric space (in more than one way). Thus formally the theory of simple graphs can be considered as a special chapter of the theory of metric spaces. Indeed, as a rule, the notions of the theory of simple graphs can be rephrased in the language of metric spaces (possibly in more than one way).

Metric in a set
Let $$X\,$$ be an arbitrary set. A metric $$d\,$$ on $$X\,$$ is a function $$d: X \times X \rightarrow \mathbb{R}$$  with the following properties:


 * 1) $$d(x_2,x_1)=d(x_1,x_2) \quad \forall x_1,x_2 \in X$$  (symmetry)
 * 2) $$d(x_1,x_2)\leq d(x_1,x_3)+d(x_3,x_2) \quad \forall x_1,x_2,x_3 \in X$$  (triangular inequality)
 * 3) $$d(x_1,x_2)=0\ \Leftrightarrow \ x_1=x_2\,$$

It follows from the above three axioms of a metric (also called distance function) that:


 * $$d(x_1,x_2) \geq 0 \quad \forall x_1,x_2 \in X$$  (non-negativity)

Definition of metric space
A metric space is an ordered pair $$(X,d)\,$$ where $$X\,$$ is a set and $$d\,$$ is a metric on $$X\,$$.

For shorthand, a metric space $$(X,d)\,$$ is usually written simply as $$X\,$$ once the metric $$d\,$$ has been defined or is understood.

Metric topology
A metric on a set $$X\,$$ induces a particular topology on $$X\,$$ called the metric topology. For any $$x \in X $$, let the open ball $$B_r(x)\,$$ of radius $$r>0\,$$ around the point $$x\,$$ be defined as $$B_r(x)=\{y \in X \mid d(y,x)0\,$$ and $$x_{\gamma} \in X$$ for all $$\gamma \in \Gamma$$. Then the set $$\mathcal{O}$$ satisfies all the requirements to be a topology on $$X\,$$ and is said to be the topology induced by the metric $$d\,$$. Any topology induced by a metric is said to be a metric topology.

Examples

 * 1) The "canonical" example of a metric space, and indeed what motivated the general definition of such a space, is the Euclidean space $$\mathbb{R}^n$$ endowed with the Euclidean distance $$d_E\,$$ defined by $$d_E(x,y)=\sqrt{\sum_{k=1}^{n}|x_k-y_k|^2}$$ for all $$ x,y \in \mathbb{R}^n $$.
 * 2) Consider the set $$C[a,b]\,$$ of all real valued continuous functions on the interval $$[a,b]\subset \mathbb{R}$$ with $$a<b\,$$. Define the function $$d:C[a,b] \times C[a,b] \rightarrow \mathbb{R}$$ by $$d(f,g)=\max_{x \in [a,b]}|f(x)-g(x)| $$ for all $$f,g \in C[a,b]$$. This function $$d\,$$ is a metric on $$C[a,b]\,$$ and induces a topology on $$C[a,b]\,$$ often known as the norm topology or uniform topology.
 * 3) Let $$X\,$$ be any nonempty set. The discrete metric on $$X\,$$ is defined as $$d(x,y)=1\,$$ if $$x\neq y$$ and $$d(x,y)=0\,$$ otherwise. In this case the induced topology is the discrete topology, in which every set is open.

Mappings
A mapping f from a metric space (X,d) to another (Y,e) is an isometry if it is distance-preserving: that is


 * $$e(f(x_1),f(x_2)) = d(x_1,x_2) . \, $$

A mapping f from a metric space (X,d) to another (Y,e) is continuous at x in X if for all real ε &gt; 0 there exists δ &gt; 0 such that


 * $$d(x',x) < \delta \Rightarrow e(f(x'),f(x) < \varepsilon \,$$

and continuous if it is continuous at every point of X.

If we let $$B_d(x,r)$$ denote the open ball of radius r round x in X, and similarly $$B_e(y,r)$$ denote the open ball of radius r round y in Y, we can express these conditions in terms of the pull-back $$f^{\dashv}$$


 * $$f^{\dashv}[B_e(f(x),\varepsilon)] \supseteq B_d(x,\delta) . \, $$