# Using axioms to define metric spaces

Let $M$ be a set with three elements: $a$, $b$, and $c$. Define $D\colon M\times M\to[0,\infty)$ so that $D(x, x) = 0$ for all $x$, $D(x, y) = D(y, x)$ for $x \ne y$. Say $D(a, b) = r$, $D(a, c) = s$, $D(b, c) = t$, and $r \le s \le t$.

Prove that $D$ makes $M$ a metric space iff $t \le r + s$.

I have no idea on how to begin this proof.

• Hint: The triangle inequality is the only part that might cause problems. Try writing up the various triangle inequalities for different choices of three elements and see what they look like. – Tobias Kildetoft Aug 23 '13 at 21:43
• Why the close vote? – Stefan Hamcke Aug 23 '13 at 21:50
• Hey, I attempted to answer it. Thanks! – Don Larynx Aug 23 '13 at 22:09
• Someone suggested that the OP modify his original post rather than answer it. The OP has since deleted his answer. Answering one's own question is explicitly allowed and appropriate in this case. – Cheerful Parsnip Aug 23 '13 at 22:13
• I Un-deleted it and re-edited the OP. – Don Larynx Aug 23 '13 at 22:14

Your argument is a bit complicated. It is much easier:

We want to verify the triangle inequality $d(x,y)\le d(x,z)+d(y,z)$.

If $x,y,z$ are not all distinct, then it is satisfied as shown in your previous question. So let's assume they are all distinct.

There are three possibilities for $x,y$:

If $x=a, y=b$, then $d(a,b)=r$.
If $x=a, y=c$, then $d(a,c)=s$.
Since $r,s\le t$ and $t$ will appear on the right hand side in either case, the TI is satisfied.

If $x=b, y=c$, then $d(b,c)=t\le r+s=d(a,b)+d(b,c)$, so we are happy.

P1) $t <= r + s$ implies $D(b, c) <= D(a, b) + D(a, c)$.

P2) Either $D(x, y) = 0$ or $r$.

P3) Suppose $D(a, b) = D(a, c) = 0$. Then a = b = c = 0. So the triangle inequality is satisfied.

P4) In case $D(a, b) = D(a, c) = r, b = c$. This the triangle inequality is trivially satisfied.

P5) In case $D(a, b) = 0, D(a, c) = r$ (or the other way around), a = b. The triangle inequality gives $D(a, c) = D(b, c)$.

Q) $D$ thus defines a metric space $M$.

• Hi Jossie, please edit your question and accommodate your argument there itself. – Ram Aug 23 '13 at 22:03
• See Grumpy Parsnip's comment. – Don Larynx Aug 23 '13 at 22:15
• my comment is just a suggestion to avoid -ve votes, I mean, to avoid down vote just because they can't see your argument. (My first comment included this but I accidentally delete it while posting.) – Ram Aug 23 '13 at 22:35