Does $d(x,y)$ defined below metric on $\Bbb R$ ?
$d(x,y) = |x+y|$
$d(x,y) = |\sin(x-y)|$
My Attempt:
For a metric, we have following 4 conditions required.
- $d(x,y) \geq 0$ for all $x$, $y \in X$.
- $d(x,y) = 0$ if and only if $x=y$.
- $d(x,y) = d(y,x)$ for all $x$, $y\in X$.
- $d(x,z) \leq d(x,y) + d(y,z)$ for all $x$, $y$, $z \in X$
For $d(x,y) = |x+y|$,
(i) $d(x,y) \geq 0$ as $|x+y| \geq 0$ for all $x,y \in \Bbb R$
(ii) $d(x,y) = 0$ iff $x = +y$ and $x = -y$ (If I neglect $x = -y$ then there is no problem. I'm confusing here)
(iii) $d(x,y) = |x+y| = |y+x| = d(y,x)$ (iv) $d(x,y) = |x+y| = |x+z-z+y| \leq |x+z| + |y-z| \leq |x+z| + |z+y|$ (As $|-z+y| \leq |z+y|$)
For $d(x,y) = |\sin(x-y)|$,
(i) $d(x,y) \geq 0$ as $|\sin(x,y)| \geq 0$ for all $x,y \in \Bbb R$
(ii) $d(x,y) = 0$ iff $|\sin(x-y)| = 0$ iff $\sin(x-y) = 0$ iff $x-y = nπ, n \in \Bbb Z$ (but if I take $n = 0$ then there is no problem. I'm confusing here)
(iii) $d(x,y) = |\sin(x-y)| = |-\sin(y-x)| = |\sin(y-x)| = d(y,x)$
(iv) $d(x,y) = |\sin(x-y)| = |\sin(x-z+z-y)| = |\sin(x-z)\cos(z-y)+ \cos(x-z)\sin(z-y)| \leq |\sin(x-z)\cos(z-y)|+ |\cos(x-z)\sin(z-y)| \leq |\sin(x-z)|\cos(z-y)|+ |\cos(x-z)|\sin(z-y)| \leq |\sin(x-z)|+\sin(z-y)|= d(x,z)+d(z,y)$ (Note : $|\cos A| \leq 1$)