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?
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$.
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$.