# Showing that $\mathbb{R}$ is a metric space with the metric $d(x,y)=|x-y|$

I want to show that $\mathbb{R}$ is a metric space with the metric $d(x,y)=|x-y|$.

So three properties of the metric space $d(x,y)$ in general needs to be satisfied.

My work:

1. Let $x,y \in \mathbb{R}$, then by definition, $|x-y|\geq0$. Also $$|x-y|=0$$ $$\Leftrightarrow x-y = 0$$ $$\Leftrightarrow x=y$$

2. EDIT: Let $x,y \in \mathbb{R}$, then $$|x-y|=|-(x-y)|= |y-x|$$ by absolute value property.

3. Let $x,y,z \in \mathbb{R}$. Then $$|x-z| = |x-y+y-z| \leq |x-y| + |y-z|$$ by triangle inequality.

Thus $|x-y|$ is a metric on $\mathbb{R}$, or $\mathbb{R}$ is a metric space with $d(x,y)=|x-y|$.

Is this proof correct?

• Yes, it is correct. You can find more metric.
– GAVD
Sep 1, 2015 at 4:43

Yes, the proof is correct. To make the style consistent across the proof, you could have written "Let $x,y\in\mathbb R$" in $2$., like you did in $1$. and $3$.