4
$\begingroup$

Im trying to check if $d_1(x,y)=2|x-y|$ and $d_2(x,y)=|x-y|^2$ are metric spaces.

Im just not sure how to proceed with checking the triangle inequality property $d(x,y)\le d(x,z)+d(z,y)$. Is what I did below sufficient?

$d(x,y) = 2|x-y| =2|x-z+z-y| \le 2|x-z|+2|z-y| = d(x,z)+d(z,y)\\ \text{and} \\ d(x,y)=|x-y|^2=|x-z+z-y|^2\le |x-z|^2+|z-y|^2=d(x,z)+d(z,y)?$

Also is $d(x,y)=|\arctan(x)-\arctan(y)|$a metric space? Can I write

$d(x,y)=|\arctan(x)-\arctan(y)| = |\arctan(x)-\arctan(z)+\arctan(z)-\arctan(y)| \le |\arctan(x)-\arctan(z)|+|\arctan(z)-\arctan(y)|$

  • 3
    Why $|x-y|^2=|x-z+z-y|^2\le |x-z|^2+|z-y|^2$?2012-05-17
  • 1
    If you have trouble proving the inequality Marvis asked about, you might want to consider some particular choices of $x$, $y$, and $z$.2012-05-17
  • 1
    Let $a=0$, $b=1$, $c=2$ (this is for the square part).2012-05-17
  • 2
    For the $2|x-y|$ part, let's do $3|x-y|$ instead. Alicia measures in yards, and Beti measures in feet.2012-05-17
  • 0
    Thanks marvis, jonas and andre. I shall remember to try subbing in values for $x,y,z$ to see if the equality holds or not. For $2|x-y|$, I tried subbing in values and I find it holds? Also, is $d(x,y)=|\arctan(x)-\arctan(y)|$ a metric?2012-05-17
  • 0
    @AndréNicolas could you explain what you mean by your 2nd comment?2012-05-17
  • 2
    André means that changing the distance function from $|x-y|$ to $3|x-y|$ is like changing the units of measurement from yards to feet: it just multiplies everything by $3$. Thus, if one works as a metric, the other must as well.2012-05-17
  • 0
    Thanks @BrianM.Scott ! May I ask, what about $d(x,y)=|\arctan(x)-\arctan(y)|$ ?2012-05-17
  • 1
    See my answer below.2012-05-17
  • 0
    @Steven: Substituting appropriate values can show you that something is *not* a metric. It will not show you that something *is* a metric, though it may give useful information towards a proof.2012-05-18

2 Answers 2

3

Clearly the function $d(x,y)=|\arctan(x)-\arctan(y)|$ is symmetric and non-negative. The arctangent function is a bijection from $\Bbb R$ to $\left(-\frac{\pi}2,\frac{\pi}2\right)$, so in particular it’s injective, and $d(x,y)=0$ iff $x=y$. Thus, it only remains to check the triangle inequality, i.e., to check that

$$|\arctan(x)-\arctan(y)|\le|\arctan(x)-\arctan(z)|+|\arctan(z)-\arctan(y)|$$ for all $x,y,z\in\Bbb R$. But this is just the triangle inequality for the absolute value, so it’s true.

  • 0
    Thanks, most grateful. In general, if $d(x,y)$ involves just the absolution values and no squares or cubes etc., does the triangle inequality hold property hold? i.e. if $d(x,y) = |x^3|$ or $d(x,y) = |x^3-y^3|$ etc.? And it does not involve for example squares $d(x,y) = |x-y|^2$?2012-05-17
  • 5
    @Steven: If you just have $d(x,y)=|f(x)-f(y)|$, the triangle inequality will always hold, because it reduces to the ordinary one for absolute value. However, if $f$ is not injective you’ll have distinct points $x$ and $y$ with $d(x,y)=0$, so you won’t have a metric.2012-05-17
  • 0
    Thanks @BrianM.Scott , I didnt realize one could see it in this way. Prior to this I was just substituting in values/fiddling with the algebra. May I ask, is there a 'general' way to see if the triangle inequality does not hold for $d(x,y)$? As in, like a similar way to see it with the property for $d(x,y)=0$ iff $x=y$ as we have discussed above.2012-05-19
  • 0
    @Steven: I don’t know of a nice general test. With something like $d_2$ in the original problem, I’d notice that $|x-y|^2$ gets big very fast compared with $|x-y|$ and that would make me suspicious. Then I’d probably look either at $-x<0 and see right away that $(2x)^2=4x^2>2x^2$, or at $0 and see right away that $x^2+(y-x)^2=y^2+2x^2-2xy=y^2+2x(x-y). I’d look at these because they’re substantially simpler than the general case, since one of the points is $0$, but still general enough that I might find my counterexample.2012-05-19
3

To check d(x,y)=|arctan(x)-arctan(y)| you can proceed as follows: symmetry follows since arctan is an injective function. To show triangle inequality note that:

$d(x,z) = |arctan(x) - arctan(z)| = |(arctan(x)-arctan(y)) + (arctan(y) - arctan(z))|$.

Apply now triangle inequailty for real numbers:

$d(x,z) \leq |arctan(x)-arctan(y)| + |arctan(y) - arctan(z)| = d(x,y) + d(y,z)$ as desired.

For fun: draw a picture and interpret this metric geometrically.

  • 0
    Thanks, I drew a picture of the $\arctan$ and it does help.2012-05-17