1. ## Proving a metric

To prove that a function is a metric, I must show that:

$\displaystyle \frac{|x-z|}{1+|x-z|} \le \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|} \quad \forall x,y,z \in \Re$

However, I cannot quite get there. Here's what I come up with:

$\displaystyle \frac{|x-z|}{1+|x-z|} = \frac{|x-y+y-z|}{1+|x-y+y-z|} \le \frac{|x-y|+|y-z|}{1+|x-y+y-z|}$

$\displaystyle = \frac{|x-y|}{1+|x-y+y-z|} + \frac{|y-z|}{1+|x-y+y-z|} = \ldots$

Any nudge in the right direction is appreciated. Thanks.

2. Originally Posted by drumist
To prove that a function is a metric, I must show that:

$\displaystyle \frac{|x-z|}{1+|x-z|} \le \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|} \quad \forall x,y,z \in \Re$

However, I cannot quite get there. Here's what I come up with:

$\displaystyle \frac{|x-z|}{1+|x-z|} = \frac{|x-y+y-z|}{1+|x-y+y-z|} \le \frac{|x-y|+|y-z|}{1+|x-y+y-z|}$

$\displaystyle = \frac{|x-y|}{1+|x-y+y-z|} + \frac{|y-z|}{1+|x-y+y-z|} = \ldots$

Any nudge in the right direction is appreciated. Thanks.
$\displaystyle \frac{|x-y|}{1+|x-y+y-z|} + \frac{|y-z|}{1+|x-y+y-z|} \leq \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|}$.

3. Originally Posted by Sampras
$\displaystyle \frac{|x-y|}{1+|x-y+y-z|} + \frac{|y-z|}{1+|x-y+y-z|} \leq \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|}$.
Sorry but I just don't see how that is true. How can you claim that $\displaystyle |x-y+y-z| \ge |x-y|$?

4. So, I just did some crunching, and it turns out that $\displaystyle \frac{|x-y|+|y-z|}{1+|x-y+y-z|} \le \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|}$ is NOT a true statement, so clearly I'm on the wrong track from the beginning. (Use x=1, y=2, z=0 for a counterexample.)

5. Lemma:
$\displaystyle \begin{gathered} 0 \leqslant a \leqslant b \Rightarrow \quad a + ab \leqslant b + ab \hfill \\ \Rightarrow \quad a(1 + b) \leqslant b(1 + a) \Rightarrow \quad \frac{a} {{1 + a}} \leqslant \frac{b} {{1 + b}} \hfill \\ \end{gathered}$

Using that lemma, we know that $\displaystyle |x-z|\le |x-y|+|y-z|$ so

$\displaystyle \frac{{\left| {x - z} \right|}} {{1 + \left| {x - z} \right|}} \leqslant \frac{{\left| {x - y} \right| + \left| {y - z} \right|}} {{1 + \left| {x - y} \right| + \left| {y - z} \right|}} \leqslant \frac{{\left| {x - y} \right|}} {{1 + \left| {x - y} \right|}} + \frac{{\left| {y - z} \right|}} {{1 + \left| {y - z} \right|}}$

6. Originally Posted by drumist
So, I just did some crunching, and it turns out that $\displaystyle \frac{|x-y|+|y-z|}{1+|x-y+y-z|} \le \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|}$ is NOT a true statement, so clearly I'm on the wrong track from the beginning. (Use x=1, y=2, z=0 for a counterexample.)
You're problem here was the confusion of what the actual metric is. Let $\displaystyle d(x,y)=\frac{|x-y|}{1+|x-y|}$ then to show that the triangle quality hold here you must show that $\displaystyle \frac{|x-y|}{1+|x-y|}=d(x,y)\leqslant d(x,z)+d(y,z)=\frac{|x-z|}{1+|x-z|}+\frac{|y-z|}{1+|y-z|}$. You, probably used to using the triangle inequality for the usual metric on $\displaystyle \mathbb{R}$, automatically thought you must mess with the $\displaystyle |x-y|$'s.