0

Let be $d:\mathbb{R}\times\mathbb{R}\to \mathbb{R}$ a function such that $$a)d(x,y)=0\iff x=y$$ $$b)d(x,z)\leq d(x,y)+d(z,y)$$

Prove that $d$ is a metric.

First, let be $z=x$, then $$0\leq d(x,y)+d(x,y)\to d(x,y)\geq 0$$ So, $d(x,y)\geq 0$. Second, let be $x=y$, then $$d(x,z)\leq d(y,x)+d(z,x)=d(z,x)$$ But, I don't know how prove that $d(z,x)\leq d(x,z)$. And the finally condition for metric is by hypothesis.

  • You have an error in the beginning of your reasoning. If $z=y$, then you should have $d(x,y) \leq d(x,y) + d(y,y)$. To get what you concluded, try setting $z=x$. – Andrew Jul 09 '15 at 21:04
  • 3
    You can just switch $x$ and $z$ in the argument. – Mankind Jul 09 '15 at 21:05
  • Using your definition, you can derive both $d(x,z) - d(z,x) \leq 0$ and $d(z,x) - d(x,z) \leq 0$ by simply swapping $x$ and $z$. – Chester Jul 09 '15 at 21:09
  • can you give a proper title to this question? – Charlie Parker Jul 09 '15 at 21:17
  • Tell me that title is more appropriate @Pinocchio – pablo perez Jul 09 '15 at 21:22
  • no, you think about it. It should be obvious its too generic to be helpful for searches. Prove that is a metric? prove what is a metric? Don't you know the definition? Just give a specific title. I should have a general idea what ur question is about without having to read it and I dont with ur current title. @pabloperez – Charlie Parker Jul 09 '15 at 21:24
  • You're liar @Pinocchio xD, I changed the title, thanks – pablo perez Jul 09 '15 at 21:29
  • ur welcome ;) glad it helped! :) – Charlie Parker Jul 09 '15 at 21:31
  • The triangle inequality is actually given as condition b). What you're trying to show is that your function is symmetric ($d(x,z)=d(z,x)$ for all $x$ and $z$). – coldnumber Jul 09 '15 at 21:43

1 Answers1

0

Sorry for my previous helpless answer.

As commented, swap $x$ and $z$ in Eq.(b) first: $$ d(z,x)\ \leq\ d(z,y)+d(x,y) $$ Let $y=z$, then $$ d(z,x)\ \leq\ d(z,z)+d(x,z)\ =\ d(x,z) $$ Due to $ d(x,y)=0$ if and only if $x=y$, now $d(z,z)=0$ thus $d(z,x) \leq\ d(x,z)$

Dainy
  • 3