# What are the possible ranges of a metric

Given a metric $d$ on a space $X$, what can we say about $d(X\times X)$? What possible range can $d$ have?

More precisely, consider the set $D=\{ A \subset [0,\infty) | A = d(X\times X), \textrm{d is a metric on$X$} \}$ What properties does $D$ have?

For instance, all finite sets containing $0$ are in $D$: If $A=\{0,a_1,a_2...a_n \}$, where $a_i<a_j$ if $i<j$, take $X=\{ 0,1... n \}$ and $d(i,j)= a_{max(i,j)}$ (for $i\neq j$). Any well-ordered countable set is also in $D$, by a similar construction.

-

First note that $\varnothing\in D$ by taking $X=\varnothing$. Next, note that if $A\in D$ is not empty, then $0\in A$.
Now let $A\subseteq [0,\infty)$ such that $0\in A$ and let $d\colon A\times A\to A$ be defined by $$d(x,y) = \begin{cases} \max(x,y) & x\neq y \\ 0 & x=y \end{cases}.$$ It is not hard to see that $d$ is a metric and the range of $d$ is $A$.
Hence $D = \{A\subseteq [0,\infty)|0\in A\mbox{ or }A=\varnothing\}$.
you need to assume $0\in A$ too. And notice that $\emptyset \in D$ as well. – Ittay Weiss Jun 3 '13 at 9:56