Prove that a function defines a metric

48 Views Asked by At

Prove that the function $d:\mathbb{R}^{2} \times \mathbb{R}^{2}\rightarrow \mathbb{R}$ defined by the following way is a metric on $ \mathbb{R}^{2}$: If $x = y$, define $d\left ( x,y \right )=0$. If $x \neq y$, then the points $x,y$ determine a line in $\mathbb{R}^{2}$. If this line passes through the origin of a rectangular coordinate system, we put $d\left ( x,y \right )=d_{0}\left ( x,y \right )$, otherwise we put $d\left ( x,y \right )=d_{0}\left ( x,0 \right )+d_{0}\left ( 0,y \right )$.

Here, $d_{0}$ is the Euclidian metric on $\mathbb{R}^{2}$ and o is the origin of the coordinate system. Furthermore, $x=\left [ x_{1}, x_{2} \right ]$, $y=\left [ y_{1}, y_{2} \right ]$ and $o=\left [ 0, 0 \right ]$.

Can anyone please help me?

1

There are 1 best solutions below

2
On BEST ANSWER

Suppose that $d(x, y) = 0$. Then, by definition of $d$, this is equivalent to $x = y$.

Now we want to verify $d(x, y) \geq 0$. This is clear if $x = y$ (since then we have $d(x, y) = 0$), so assume $x \neq y$.

  • Suppose first that the line determined by $x$ and $y$ passes through the origin. Then $d(x, y) = d_0(x, y) \geq 0$. Note that $d_0(x, y) \geq 0$ since $d_0$ is a metric.
  • Now suppose that the line does not pass through the origin. Then $d(x, y) = d_0(x, 0) + d_0(0, y) \geq 0 + 0 = 0$ by a similar argument. Thus, $d(x, y) \geq 0$.

We now show symmetry. This is clear for $x = y$, so assume $x \neq y$.

  • If the line passes through $o$, then $d(x, y) = d_0(x, y) = d_0(y, x) = d(y, x)$. Note that the second equality again follows from the fact that $d_0$ is metric.

  • If the line does not pass through the origin, then we have \begin{align} d(x, y) &= d_0(x, 0) + d_0(0, y) \\ &= d_0(0, x) + d_0(y, 0) \\ &= d_0(y, 0) + d_0(0, x) \\ &= d(y, x).\end{align} Hence, $d$ is symmetric.

We finally have to check the triangle inequality. Take $x, y, z \in \mathbb{R}^2$ and assume $x = y$. Then $d(x, y) = 0 \leq d(x, z) + d(z, y)$ is always true, since we have $d \geq 0$. Suppose now $x \neq y$.

  • If the line passes through the origin, then we have \begin{align} d(x, y) &= d_0(x, y) \\ &\leq d_0(x, z) + d_0(z, y) \\ &= d(x, z) + d_0(z, y),\end{align} since $d_0$ is a metric.
  • Finally, assume that the line does not pass through the origin. Then \begin{align} d(x, y) &= d_0(x, 0) + d_0(0, y) \\ &\leq d_0(x, 0) + d_0(0, z) + d_0(z, 0) + d_0(0, y) \\ &= d(x, z) + d(z, y). \end{align}