There have been a couple questions recently regarding metric spaces, which got me thinking a bit about representation theorems for finite metric spaces.


Suppose $X$ is a set equipped with a metric $d$. I had initially assumed there must be an $n$ such that $X$ embeds isometrically into $\mathbb{R}^n$, but the following example shows that this doesn't quite work:


Take for $X$ the vertex set of any graph, and let $d(x,y)$ be the length (in steps) of the shortest path connecting $x$ to $y$. Then for a minimal path connecting $x$ to $y$, the path must map to a straight line in $\mathbb{R}^n$. This is because $\mathbb{R}^n$ has the property that equality in the triangle inequality implies colinearity.


So take a graph such that $x$ and $y$ have $d(x,y) \geq 2$ and *two* minimal paths between them; a plain old square will do the trick. The two minimal paths must each get mapped to the same line in $\mathbb{R}^n$, so the map cannot be an isometry (nor even an embedding, for that matter).


This gives us one obstruction to representability: a finite metric space cannot be representable unless it satisfies the property $d(x,y) = d(x,z) + d(z,y) \wedge d(x,y) = d(x,z') + d(z',y) \wedge d(x,z) = d(x,z') \implies z = z'$. In the graph case this means "unique shortest paths"; I'm not clear if there is a snappy characterization like that in the general case.


**Question #1:** Is this the only obstruction to representability?


In a slightly different direction, you could get around the problem above by trying to represent the finite metric spaces on some surface instead of $\mathbb{R}^n$. This at least works in the graph case by replacing the points with little discs and the edges with very fat ribbons of length 1. Then compactifying the whole thing should give a surface into which the graph embeds isometrically. This suggests the answer to 


**Question #2a:** Does every finite metric space have a representation on a surface?


is yes, as long as the answer to


**Question #2b:** Does every finite metric space have a global scaling which embeds $\epsilon$-isometrically into a graph?


is also yes. The $\epsilon$ is to take care of finite metric spaces with irrational distances.


Of course, there is also the important


**Question #0:** Is there some standard place I should have looked for all this?



Representability of finite metric spaces
Since the paper referred to by Hagen Knaf is published by Springer, it may not be available to one and all. The (publicly viewable) MathSciNet reference is: [MR355836](http://www.ams.org/mathscinet-getitem?mr=355836).


It's a very short paper (7 pages) and the main theorem is:


**Theorem** A metric space can be embedded in Euclidean n-space if and only if the metric space is flat and of dimension less than or equal to n.


Clearly, the two terms "flat" and "dimension" need expanding. To define these, Morgan considers *simplices* in the metric space; that is, an n-simplex is simply an ordered (n+1)-tuple of elements of the metric space. Given such an n-tuple, say $(x\_0, \dots, x\_n)$, Morgan defines $D(x\_0,\dots,x\_n)$ to be the determinant of the matrix whose $(i,j)$th entry is


$$
\frac{1}{2}\left(d(x\_0,x\_i)^2 + d(x\_0,x\_j)^2 - d(x\_i,x\_j)^2\right)
$$


A metric space is **flat** if this is positive for all simplices. If it is flat, its **dimension** (if this exists) is the largest n for which there is an n-simplex with this quantity positive.


The argument (on a skim read) is quite cunning. Rather than go for a one-shot embedding, Morgan defines a map into $\mathbb{R}^n$ of the appropriate dimension and then uses that map to define an inner product on $\mathbb{R}^n$ with respect to which the map is an embedding. Standard linear algebra then completes the argument.


Now finite dimension, in this sense, is clearly very strong. It basically says that the metric is controlled by n points. The flatness condition says that those n points embed properly (and presumably rules out the examples in the question and the first answer). But then, that's probably to be expected since embeddability into Euclidean space is similarly a strong condition.


