What is a metric space?

According to categorical lore, objects in a category are just a way of separating morphisms. The objects themselves are considered slightly disparagingly. In particular, if I can't distinguish between two objects by using morphisms, then I should consider them equivalent (not equal, that would be evil).

In this view, then, metric spaces with continuous functions are just plain wrong. The category of metric spaces is equivalent to the full subcategory of topological spaces consisting of metrisable spaces. Choosing a metric is evil.

So what's the right view of metric spaces, that makes the metric both worth having and not (so much of) an arbitrary choice?

I put the "so much of" there because the obvious answer is having isometries as morphisms, but then the category becomes too rigid to be of any conceivable use. So what's the best middle ground?

-

8 Answers

A classic category-theoretic view of metric spaces says that the "correct" maps are the distance-decreasing ones: $$d(f(a), f(a')) \leq d(a, a')$$ where $A$ and $B$ are metric spaces, $f: A \to B$, and $a, a' \in A$. Then all maps are continuous, and the isomorphisms are the isometries onto.

This comes from viewing metric spaces as enriched categories, as proposed by Lawvere. The enriched functors are then exactly the distance-decreasing maps.

Edit Let me add some detail. Consider the set $V=[0, \infty]$ of non-negative reals. (The inclusion of $\infty$ isn't important here.) It's ordered by $\geq$, and so can be regarded as a category: there's one map $x \to y$ if $x \geq y$, and there are no maps $x \to y$ otherwise. It becomes a monoidal category under $+$ and $0$.

A $V$-enriched category is then a set $A$ of objects (or points) together with, for each pair $(a, b)$ of points, an object $A(a, b)$ of $V$ --- that is, a non-negative real, which you might prefer to call $d(a, b)$. Composition then becomes the triangle inequality, and identities the assertion that the distance from a point to itself is $0$. So, a $V$-enriched category is a "generalized metric space": there's no requirement of symmetry (so you could take distance to be the work done in moving between points of a mountainous region) or that points distance $0$ apart are equal (which is just like not asking for isomorphic objects of a category to be equal).

You should then be able to see that $V$-enriched functors are what I said they were.

Edit re Lipschitz maps I don't want to evangelize this point of view too much. But it's a matter of fact that Lipschitz maps do arise naturally in this framework.

To explain this I first need to explain a little about 'change of base' for enriched categories. Any lax monoidal functor $\Phi: \mathcal{V} \to \mathcal{W}$ induces a functor $\Phi_*: \mathcal{V}-\mathbf{Cat} \to \mathcal{W}-\mathbf{Cat}$, in an obvious way. For example, if $\Phi: \mathbf{Vect} \to \mathbf{Set}$ is the forgetful functor, then $\Phi_*$ sends a linear category to its underlying ordinary category.

This means that given a lax monoidal $\Phi: \mathcal{V} \to \mathcal{W}$, a $\mathbf{V}$-enriched category $\mathbf{A}$, and a $\mathbf{W}$-enriched category $\mathbf{B}$, we can define a $\Phi$-enriched functor $\mathbf{A} \to \mathbf{B}$ to be a $\mathcal{W}$-enriched functor $\Phi_*(\mathbf{A}) \to \mathbf{B}$. One might also call this a 'functor over $\Phi$'.

That's completely general enriched category theory. Now let's apply it to $\mathcal{V} = \mathcal{W} = [0, \infty]$. For any $M \geq 0$, multiplication by $M$ defines a (strict) monoidal functor $M\cdot -: [0, \infty] \to [0, \infty]$. Let $A$ and $B$ be metric spaces. Then an $(M\cdot -)$-enriched functor from $A$ to $B$ is precisely a function $f: A \to B$ such that $$d(f(a), f(a')) \leq M\cdot d(a, a')$$ for all $a, a' \in A$. In other words, it's a Lipschitz map.

A bit more can be squeezed out of this. The maps $M\cdot -$ are the strict monoidal endofunctors of $[0, \infty]$. But we can talk about $\phi$-enriched maps of metric spaces for any lax monoidal endofunctor of $[0, \infty]$. `Lax monoidal' means that $$\phi(0) = 0, \ \ \ \ \ \ \phi(x + y) \leq \phi(x) + \phi(y),$$ which is a kind of concavity property (satisfied by $\phi(x) = \sqrt{x}$, for instance). Then a $\phi$-enriched map from $A$ to $B$ is a function $f: A \to B$ such that $$d(f(a), f(a')) \leq \phi(d(a, a'))$$ for all $a, a' \in A$. Is that kind of map found useful?

-
I feel sure this is the best answer to a category-theorist. But I am not sure it is the best answer to an analyst. There I think the answer depends on what you are trying to compute. One might want Lipshitz maps $d(f(x),f(y)) \leq M d(x,y)$ for some $M>0$ for example. And I don't think this is the only possibility. – Mark Hovey Nov 18 '09 at 13:33
Uniform continuity is another possibility between continuity and Lipschitz continuity. It's much weaker that Lipschitz, and in particular boundedness would no longer be preserved, but Cauchy sequences would be. – Jonas Meyer Nov 18 '09 at 13:52
But Lipschitz maps and uniformly continuous maps are both still forgetful. Ultimately analysts rarely want any non-forgetful conception of metric spaces. – Greg Kuperberg Nov 18 '09 at 16:08
Actually, in many types of analysis we only care about metrics and norms "up to constants", in which case one would rather work in the quasicontractive (i.e. Lipschitz) category rather than the contractive one. For instance, the category of Banach spaces is usually studied using linear quasicontractive maps, aka bounded linear transformations. If one is doing more rigid metric geometry, in which isometries are significantly preferable to quasi-isometries, then one should use the contractive category of course. – Terry Tao Nov 18 '09 at 17:49
I've just made an edit explaining how Lipschitz maps arise naturally from this point of view. – Tom Leinster Nov 19 '09 at 14:14

Lawvere proposes one good answer for a reasonable category of metric spaces in which isomorphisms are isometries: the category of weak contractions. It is true that geometers sometimes use the category of weak contractions when studying metric spaces.

There is another answer that is taken seriously much more often: The category of isometric embeddings. For instance, geodesics in Riemannian geometry are isometric embeddings of intervals, at least if they are short geodesics. The category of isometric embeddings may be too rigid to be profoundly useful, but in fact it is widely used. It behaves similarly to the only reasonable category structure on fields, since every homomorphism of fields is injective.

Also, Lipschitz maps and coarse Lipschitz maps are two among several interesting forgetful category structures on the class of metric spaces. But note that Andrew was asking about category structures that aren't forgetful. For those interested in other forgetful category structures on metric spaces, one of my favorites is the forgetful functor to uniform spaces. Maybe it's even worth making a list of both types of category structures on metric spaces.

-

What the "right" category of morphisms is depends on which feature of the metric you want to pay attention to. If you want your category to admit a functor to topological spaces -- i.e. you want your maps to be continuous maps, which remember the "small-distance" part of the metric -- then you might want to do something like the above. On the other side, I wonder if there is some good notion of morphism which gives you a category of metric spaces with a functor to coarse spaces -- i.e. which does a good job with the "large-distance" part of the metric. Presuambly coarse isometries are too general, for the same reason that continuous maps are too general in the original post.

-
You probably want coarse lipschitz maps: $d(f(x),f(y)) \leq K d(x,y) + C$. – Richard Kent Nov 18 '09 at 14:50
John Roe developed such a notion in "Lectures on Coarse Geometry". A coarse map $f: X \to Y$ between coarse spaces is one which is proper (bounded sets pull back to bounded sets) and bornologous (for each controlled set $E$ of $X \times X$, the set $(f \times f)(E)$ is controlled in $Y \times Y$). In the metric case, then bornologousness translates into the statement that for every $R > 0$ there exists $S > 0$ such that $d(x, x') < R$ implies $d(f(x), f(x')) < S$. In the "coarse category", the objects are coarse spaces and the morphisms are coarse maps modulo closeness. – Paul Siegel Aug 30 '10 at 14:40
Roe also constructed a coarse cohomology theory associated to the coarse category, and elsewhere he defined a notion of coarse C* algebra associated to a coarse space whose K-theory is functorial for coarse maps. So this really ought to be the "right" notion morphism between coarse spaces. – Paul Siegel Aug 30 '10 at 14:47

Andrew Stacey more or less asked me to expand on my comment, so here goes.

In Harald Hanche-Olsen's answer to Kim Greene's question, he mentions that given a metric d on X, it can be useful to consider a metric d' on X that is bounded and "equivalent" to d. The meaning of equivalence in that context is that the identity map from (X,d) to (X,d') is uniformly continuous with uniformly continuous inverse. The importance of this notion of equivalence is that it preserves completeness. As everyone knows, and as Kaplansky told Weil (pdf, see page 219), "completeness is not a topological invariant." Thus uniformly continuous maps might make a good choice of morphism for metric spaces because they preserve Cauchy sequences and they make completeness an isomorphism invariant.

In the case of linear operators on Banach spaces, continuity at a point implies Lipschitz continuity. So in particular continuous and uniformly continuous and Lipschitz continuous are the same thing. And as Terry Tao said the maps considered are usually all the continuous linear ones as opposed to only the contractive ones.

-
I would say that the very least a "category of metric spaces" had to have to be a category in its own right (rather than a subcategory of Top) would be the notion of completeness so "uniformly continuous" seems like the weakest reasonable condition to have. Thanks for the expansion on your comment. – Loop Space Nov 30 '09 at 9:19

Some non-catgeory theory view-points (hence a little off-topic given the original question):

Pedagogical Metric spaces are an obviously generalisation of the reals, the complexes, and n-dimensional Euclidean space. So they can be nicely motivated to students. Then once you've done this, you can go on to motivate topological spaces. But jumping straight in at the topological level is a big step.

Practical For many applications, you just don't need the full power of a topological space: a metric space is a good enough generalisation. You can work with sequences in a metric space (but you might need filters or nets in a topological space). I guess this leads into the viewpoint of working with metrisable spaces: you don't worry about what the metric is exactly, but it's there if you need it!

I suppose Lipschitz functions are also very important, but I don't know much about them...

-
Not off-topic at all! My reason for asking was pedagogical. As a topologist, the sequence of teaching usually goes: metric space (easy to motivate), topological space ("correct" notion of "nearness"), manifold ('specially nice topological space), Riemann manifold (manifold plus metric). Somehow, the original metric space stuff feels out of place and I wondered whether there was a better view which put it in the correct context. – Loop Space Nov 19 '09 at 9:16
Personally, I took an undergraduate course in topology before ever really delving into a proper course sequence analysis. (I must note that I knew what a metric space was before knowing what a topological space was, but I didn't do anything interesting with the notion.) This is from what I've heard slightly unusual, but at the same time I found it kind of interesting in moving to studying analysis and already having so many things well-motivated by topology. (In particular, non-obviously-equivalent metrics on the same space caused some confusion for other students, if my memory holds.) – dvitek Aug 30 '10 at 16:11

An interesting class of morphisms that sits between isometric embeddings and bi-Lipschitz maps (both the map and its inverse are Lipschitz) is the class of almost isometric embeddings. There are two natural definitions of this. Let $X$ and $Y$ be metric spaces.

(1) An almost isometric embedding from $X$ into $Y$ is a sequence $(f_n)_{n\in\mathbb N}$ of maps $f_n:X\to Y$ such that for some sequence $(\varepsilon_n)_{n\in\mathbb N}$ of positive reals converging to zero, for every $n$, $f_n$ is bi-Lipschitz of constant $\varepsilon_n$.
The composition of two almost isometric embeddings $(f_n)_{n\in\mathbb N}$ and $(g_n)_{n\in\mathbb N}$ (of appropriate domains and ranges) is $(f_n\circ g_n)_{n\in\mathbb N}$.

(2) If you don't like the fact that an almost isometric embedding as defined above does not have a fixed range in the classical sense, change the definition by requiring that each $f_n$ has the same range.

$X$ and $Y$ are almost isometric if there is an almost isometric embedding as in (2) from $X$ onto $Y$ (all $f_n$ are onto $Y$).

For example, any two countable dense subsets of $\mathbb R$ are almost isometric (back and forth argument), but not necessarily isometric, simply because there are $|\mathbb R|$ many possible distances but only countably many of these are realized in a fixed countable set.

-

I have been told that the morphisms are contracting maps; maps with $d(f(x), f(y)) \leq d(x,y)$ for all $(x,y)$ in the domain. But I have not had it explained to me why this is the best choice.

-
One reason might be that if f:X-->Y and g:Y-->X are continuous maps between metric spaces such that fg and gf are id (i.e. f,g are isomorphisms in the cat of top spaces), then f might not be an isomorphism of metric spaces (in the sense that f,g might not preserve the metric). But if you demand that f,g are contractions then you can conclude that isomorphisms in the cat are precisely the structure-preserving maps, which is kind of nice. – Kevin Buzzard Nov 18 '09 at 19:47
Just a pedantic remark: these are not contracting maps, but "metric" maps (contracting maps need "to be afar from one", that is, they need a Lipschitz constant strictly lesser than 1). These are called either metric maps, short maps, nonexpansive maps, nonexpanding maps or weak contractions. There is a short page (pun intended :P) for them in Wikipedia: en.wikipedia.org/wiki/Short_map – Jose Brox Nov 18 '09 at 23:23
But often for linear operators between Banach spaces the term "contraction" is used even when the Lipschitz constant is 1, and if the constant is less than one you hear "strict contraction". – Jonas Meyer Nov 20 '09 at 3:23

Contractions are probably too restrictive. Moreover, a function mapping the whole space to one point is (trivially) a contraction. My bet would be Lipschitz functions with a Lipschitz inverse, which resembles the definition of (topological) homeomorfism most. You might want to consider local Lipschitz maps (that is, Lipschitz on all compact subspaces).

-
Do you mean "Lipschitz on all compact subspaces"? Surely, "local" would mean "every point has a neighbourhood in which the map was Lipschitz". That would imply that it was Lipschitz on compact subspaces but I don't see that the implication goes both ways. – Loop Space Dec 7 '09 at 11:15
I'm not sure if the implication also goes the other way around (alhtough I would expect so). "Lipschitz on all compact subspaces" is my definition of "Locally Lipschitz". Interesting question if this is the same as the usual "local", though. – Martijn Dec 8 '09 at 13:28