Proving that the triangle inequality holds for a metric on $\mathbb{C}$

Show that $(X,d)$ is a metric space where $X =\Bbb C $ and the distance function is defined as: $$d(x,y) = \frac {2|x-y|}{\sqrt {1+|x|^2} + \sqrt {1 + |y|^2}}, \text{ for } x,y \in \Bbb C.$$

I have done the proof of the first two propositions for being a metric, but I'm having a problem in proving the triangle inequality.


First of all, let's get rid of the square roots and other red herrings. The problem is really to show that $\frac{|x-y|}{|x|+|y|}$ is a distance in $\mathbb R^n\setminus\{0\}$. If you want the square root back, just consider the points on the hyperplane at the distance $1$ from the origin.

Second, let us use Alex Ravsky's observation that the case $|y|\le \min(|x|,|z|)$ is simple (just increase the denominators on the left to $|x|+|z|$) and the case $|y|\ge \max(|x|,|z|)$ can be reduced to the previous one by the inversion $x\mapsto \frac{x}{|x|^2}$ which leaves our distance invariant.

So we assume that $r=|x|<\rho=|y|<R=|z|$. Then $$ |x-z|^2=R^2+r^2-2Rr\cos\alpha=(R-r)^2+Rr(2\sin\frac\alpha 2)^2=(R-r)^2+Rr|x'-z'|^2 $$ where $\alpha$ is the angle between $x$ and $z$ and $x'$ is the unit vector in the direction of $x$. Hence, $$ d(x,z)^2=\left(\frac{R-r}{R+r}\right)^2+\frac{Rr}{(R+r)^2}|x'-z'|^2 $$ Similar expressions can be obtained for $d(x,y$ and $d(y,z)$. Note now that due to the inequality $r\le \rho\le R$, the ratio $A(R,r)=\frac{Rr}{(R+r)^2}$ is smaller than both ratios $A(R,\rho)$ and $A(\rho,r)$, so if we use the common value $A=A(R,r)$ everywhere, we shall get a stronger inequality.

Thus, it suffices to prove that $$ \sqrt{\left(\frac{\rho-r}{\rho+r}\right)^2+A|x'-y'|^2} + \sqrt{\left(\frac{R-\rho}{R+\rho}\right)^2+A|y'-z'|^2} \ge \sqrt{\left(\frac{R-r}{R+r}\right)^2+A|x'-z'|^2}\,. $$ By the Minkowski inequality, it will suffice to show that $$ \frac{\rho-r}{\rho+r}+\frac{R-\rho}{R+\rho}\ge \frac{R-r}{R+r} $$ and $$ |x'-y'|+|y'-z'|\ge |x'-z'|\,. $$ The second inequality is just the triangle inequality in $\mathbb R^n$ and the first one is the combination of the convexity of the function $t\mapsto 1/t, t>0$ and the identity $$ \frac{R-\rho}{R-r}(R+\rho)+\frac{\rho-r}{R-r}(\rho+r)=R+r\,. $$


A partial result. Let $x,y,z\in\mathbb{C}$ such that $|y|\leq\min\{|x|,|z|\}$ then $$d(x,z)=\frac{2|x-z|}{\sqrt{1+|x|^2}+\sqrt{1+|z|^2}}\leq\frac{2|x-y|+2|y-z|}{\sqrt{1+|x|^2}+\sqrt{1+|z|^2}}$$$$=\frac{2|x-y|}{\sqrt{1+|x|^2}+\sqrt{1+|z|^2}}+\frac{2|y-z|}{\sqrt{1+|x|^2}+\sqrt{1+|z|^2}}$$ (Note that the last result is obtained by the triangle inequality on the metric $d^*(x,y)=|x-y|$) Since $|y|\leq\min\{|x|,|z|\}$ then $$\sqrt{1+|x|^2}+\sqrt{1+|y|^2}\leq\sqrt{1+|x|^2}+\sqrt{1+|z|^2}$$ and $$\sqrt{1+|y|^2}+\sqrt{1+|z|^2}\leq\sqrt{1+|x|^2}+\sqrt{1+|z|^2}$$ which together with the result above on the main metric $d(x,z)$ yield $$\frac{2|x-y|}{\sqrt{1+|x|^2}+\sqrt{1+|z|^2}}+\frac{2|y-z|}{\sqrt{1+|x|^2}+\sqrt{1+|z|^2}}$$$$\leq\frac{2|x-y|}{\sqrt{1+|x|^2}+\sqrt{1+|y|^2}}+\frac{2|y-z|}{\sqrt{1+|y|^2}+\sqrt{1+|z|^2}}=d(x,y)+d(y,z)$$ In other words $$d(x,z)\leq d(x,y)+d(y,z)$$


I did a small step before I stuck, but it may be useful for others. So, it seems the following.

The cases $|y|\le\min\{|x|,|z|\}$ and $|y|\ge\max\{|x|,|z|\}$ are simple and already known to us (see Arian’s answer and here; the second case is reduced to the first by substitution $u=x^{-1}$, $v=y^{-1}$, and $w=z^{-1}$).

So it suffices to consider a case $| x | < | y | < | z |.$ Fix $x$, $z$ and $|y|$. Answering a question for which value of $y$ the left part of the inequality attains minimum, I use geometric optics.

Let there be light. Let the speed of light in the disk with radius $|y|$ centered at the origin $o$ be $v_1=\sqrt {1+|x|^2} + \sqrt {1 + |y|^2}$, and $v_2=\sqrt {1+|z|^2} + \sqrt {1 + |y|^2}$ outside the disk. Fermat's principle states that the light travels the path which takes the least time. From Fermat principle may be derived known Snell–Descartes law of refraction, which yeilds $$\frac{\cos\angle oyx}{-\cos\angle zyo}=\frac {v_1}{v_2}.$$

But $$\cos\angle oyx=\frac{(y-x,y)}{|y||y-x|},$$ $$- \cos\angle zyo=\frac{(y-z,y)}{|y||y-z|}.$$

So $$\frac{(y-x,y)}{|y-x|\left(\sqrt {1+|y|^2} + \sqrt {1 + |x|^2}\right)}= \frac{(y-z,y)}{|y-z|\left(\sqrt {1+|y|^2} + \sqrt {1 + |z|^2}\right)}.$$


This migth be helpful: I'll proof that the function: $$d(z_0,z_1) = \frac{{2\left| {{z_0} - {z_1}} \right|}}{{\sqrt {1 + {{\left| {{z_0}} \right|}^2}} \sqrt {1 + {{\left| {{z_1}} \right|}^2}} }}$$ is a metric in the complex numbers. My idea to prove it is to use the stereographic projection of $\mathbb{C}$ into $S^2$ (the unit sphere of $\mathbb{R}^3$) and define the metric $d$ via the euclidean metric in $\mathbb{R}^3$. The technical details are the following:

Let $z=a+ib$ a complex number, then, the stereographic projection is a function $H:\mathbb{C}\to{S}^2\subset\mathbb{R}^3$ defined by: $$H(z)=H\left( {a + ib} \right) = \left( {ta,tb,1 - t} \right)\quad,\quad\;t = \frac{2}{{{{\left| z \right|}^2} + 1}}$$ The stereographic projection is an inyective function

For any two complex numbers $z_0=a_0+ib_0$ and $z_1=a_1+ib_1$ define a function $\rho$ in the following way: $$\rho \left( {{z_0},{z_1}} \right) = {d_{\mathbb{R}^3}}\left( {H\left( {{z_0}} \right),H\left( {{z_1}} \right)} \right)$$ Is easy to verify that $\rho$ is a metric in $\mathbb{C}$:

  • $\rho ({z_0},{z_1}) = 0 \Leftrightarrow {d_{\mathbb{R}^3}}\left( {H\left( {{z_0}} \right),H\left( {{z_1}} \right)} \right) = 0 \Leftrightarrow H\left( {{z_0}} \right) = H\left( {{z_1}} \right) \Leftrightarrow {z_0} = {z_1}$
  • $\rho ({z_0},{z_1}) = {d_{\mathbb{R}^3}}\left( {H\left( {{z_0}} \right),H\left( {{z_1}} \right)} \right) = {d_{\mathbb{R}^3}}\left( {H\left( {{z_1}} \right),H\left( {{z_0}} \right)} \right) = \rho ({z_1},{z_0})$
  • Let $z_2$ be another complex number, then, $$\rho ({z_0},{z_1}) = {d_{\mathbb{R}^3}}\left( {H\left( {{z_0}} \right),H\left( {{z_1}} \right)} \right) \le {d_{\mathbb{R}^3}}\left( {H\left( {{z_0}} \right),H\left( {{z_1}} \right)} \right) + {d_{\mathbb{R}^3}}\left( {H\left( {{z_1}} \right),H\left( {{z_2}} \right)} \right)$$ (the inequality is given by the triangular inequality of $d_{\mathbb{R}^3}$).

    By the definition of $\rho$ we have ${d_{\mathbb{R}^3}}\left( {H\left( {{z_0}} \right),H\left( {{z_1}} \right)} \right) + {d_{\mathbb{R}^3}}\left( {H\left( {{z_1}} \right),H\left( {{z_2}} \right)} \right) = \rho ({z_0},{z_1}) + \rho ({z_1},{z_2})$, so $$\rho ({z_0},{z_1}) \le \rho ({z_0},{z_1}) + \rho ({z_1},{z_2}).$$

Now, the ``only'' thing left to prove is that $\rho ({z_0},{z_1}) = d(z_0,z_1) = \frac{{2\left| {{z_0} - {z_1}} \right|}}{{\sqrt {1 + {{\left| {{z_0}} \right|}^2}} \sqrt {1 + {{\left| {{z_1}} \right|}^2}} }}$. This demonstration is not very interesnting (it's just a lot of algebraic manipulations). Here goes the details: \begin{align*} \rho ({z_0},{z_1}) &= \sqrt {{{\left( {{t_0}{a_0} - {t_1}{a_1}} \right)}^2} + {{\left( {{t_0}{b_0} - {t_1}{b_1}} \right)}^2} + {{\left( {{t_1} - {t_0}} \right)}^2}}\nonumber\\ &= \sqrt {{{\left( {{t_0}{a_0}} \right)}^2} - 2{t_0}{t_1}{a_0}{a_1} + {{\left( {{t_1}{a_1}} \right)}^2} + {{\left( {{t_0}{b_0}} \right)}^2} - 2{t_0}{t_1}{b_0}{b_1} + {{\left( {{t_1}{b_1}} \right)}^2} + {t_1}^2 - 2{t_0}{t_1} + {t_0}^2}\nonumber\\ &= \sqrt {{t_0}{t_1}\left( { - 2{a_0}{a_1} - 2{b_o}{b_1} - 2} \right) + {t_0}^2\left( {{a_0}^2 + {b_0}^2 + 1} \right) + {t_1}^2\left( {{a_1}^2 + {b_1}^2 + 1} \right)} \end{align*} Let $A = {t_0}{t_1}\left( { - 2{a_0}{a_1} - 2{b_o}{b_1} - 2} \right)$, $B = {t_0}^2\left( {{a_0}^2 + {b_0}^2 + 1} \right)$ and $C = {t_1}^2\left( {{a_1}^2 + {b_1}^2 + 1} \right)$, so $$\rho \left( {{z_0},{z_1}} \right) = \sqrt {A + B + C}$$

Now, note that \begin{align*} \frac{{2\left| {{z_0} - {z_1}} \right|}}{{\sqrt {1 + {{\left| {{z_0}} \right|}^2}} \sqrt {1 + {{\left| {{z_1}} \right|}^2}} }} &= \left| {{z_0} - {z_1}} \right|\sqrt {\frac{2}{{1 + {{\left| {{z_0}} \right|}^2}}}} \sqrt {\frac{2}{{1 + {{\left| {{z_1}} \right|}^2}}}} = \sqrt {{{\left( {{a_0} - {a_1}} \right)}^2} + {{\left( {{b_0} - {b_1}} \right)}^2}} \sqrt {{t_0}{t_1}}\nonumber\\ &= \sqrt {{t_o}{t_1}\left( {{{\left( {{a_0} - {a_1}} \right)}^2} + {{\left( {{b_0} - {b_1}} \right)}^2}} \right)} \end{align*} Set $D={{t_o}{t_1}\left( {{{\left( {{a_0} - {a_1}} \right)}^2} + {{\left( {{b_0} - {b_1}} \right)}^2}} \right)}$, so $$d(z_0,z_1)=\sqrt{D}$$ Now, \begin{align*} A &= {t_0}{t_1}\left( { - 2{a_0}{a_1} - 2{b_o}{b_1} - 2} \right) \nonumber\\ &= {t_0}{t_1}\left( { - 2{a_0}{a_1} - 2{b_o}{b_1} - 2 + {a_o}^2 - {a_0}^2 + {a_1}^2 - {a_1}^2 + {b_o}^2 - {b_0}^2 + {b_1}^2 - {b_1}^2} \right)\nonumber\\ &= {t_0}{t_1}\left( {{a_o}^2 - 2{a_0}{a_1} + {a_1}^2 + {b_o}^2 - 2{b_o}{b_1} + {b_1}^2 - 2 - {a_0}^2 - {a_1}^2 - {b_0}^2 - {b_1}^2} \right)\nonumber\\ &= {t_0}{t_1}\left( {{{\left( {{a_o} - {a_1}} \right)}^2} + {{\left( {{b_o} - {b_1}} \right)}^2} - 2 - {a_0}^2 - {a_1}^2 - {b_0}^2 - {b_1}^2} \right)\nonumber\\ &= {t_0}{t_1}\left( {{{\left( {{a_o} - {a_1}} \right)}^2} + {{\left( {{b_o} - {b_1}} \right)}^2}} \right) - {t_0}{t_1}\left( {2 + {a_0}^2 + {a_1}^2 + {b_0}^2 + {b_1}^2} \right)\nonumber\\ &= D - {t_0}{t_1}\left( {2 + {a_0}^2 + {a_1}^2 + {b_0}^2 + {b_1}^2} \right) \end{align*} Putting this in $\rho \left( {{z_0},{z_1}} \right) = \sqrt {A + B + C}$ we have $$\rho \left( {{z_0},{z_1}} \right) = \sqrt {D - {t_0}{t_1}\left( {2 + {a_0}^2 + {a_1}^2 + {b_0}^2 + {b_1}^2} \right) + B + C}$$ so, we just need to proof that $E= - {t_0}{t_1}\left( {2 + {a_0}^2 + {a_1}^2 + {b_0}^2 + {b_1}^2} \right) + B + C $ equals zero.

Now, \begin{align*} E &= { - {t_0}{t_1}\left( {2 + {a_0}^2 + {a_1}^2 + {b_0}^2 + {b_1}^2} \right) + {t_0}^2\left( {{a_0}^2 + {b_0}^2 + 1} \right) + {t_1}^2\left( {{a_1}^2 + {b_1}^2 + 1} \right)}\nonumber\\ &= {{a_0}^2\left( { - {t_0}{t_1} + {t_0}^2} \right) + {a_1}^2\left( { - {t_0}{t_1} + {t_1}^2} \right) + {b_0}^2\left( { - {t_0}{t_1} + {t_0}^2} \right) + {b_1}^2\left( { - {t_0}{t_1} + {t_1}^2} \right) + {{\left( {{t_0} - {t_1}} \right)}^2}}\nonumber\\ &= {a_0}^2{t_0}\left( { - {t_1} + {t_0}} \right) + {a_1}^2{t_1}\left( { - {t_0} + {t_1}} \right) + {b_0}^2{t_0}\left( { - {t_1} + {t_0}} \right) + {b_1}^2{t_1}\left( { - {t_0} + {t_1}} \right) + {\left( {{t_0} - {t_1}} \right)^2}\\ &= \left( {{t_0} - {t_1}} \right)\left( {{a_0}^2{t_0} - {a_1}^2{t_1} + {b_0}^2{t_0} - {b_1}^2{t_1} + {t_0} - {t_1}} \right)\\ &= \left( {{t_0} - {t_1}} \right)\Bigl( {{t_0}\left( {{a_0}^2 + {b_0}^2} \right) - {t_1}\left( {{a_1}^2 + {b_1}^2} \right) + {t_0} - {t_1}} \Bigr) \\ &= \left( {{t_0} - {t_1}} \right)\left( {{t_0}{{\left| {{z_0}} \right|}^2} - {t_1}{{\left| {{z_1}} \right|}^2} + {t_0} - {t_1}} \right) \\ &= \left( {{t_0} - {t_1}} \right)\left( {\underbrace {{t_0}\left( {{{\left| {{z_0}} \right|}^2} + 1} \right)}_2 - \underbrace {{t_1}\left( {{{\left| {{z_1}} \right|}^2} + 1} \right)}_2} \right)\\ &= 0 \end{align*} So, $\rho(z_0,z_1)=d(z_0,z_1)$ and the proof is complete!

Some cool facts about this question:

  • The distance $d$ is known as the \textbf{chordal metric} and is interpreted as the euclidean distance between the stereographic projections of two complex numbers. That's why it's called chordal metric (the distance between two points in an sphere is the length of the chord that has the points as its extremes).
  • The metric $d$ can be extended to metric in $\mathbb{C}^*$ by setting $$d\left( {z,\infty } \right) = \frac{2}{{\sqrt {1 + {{\left| z \right|}^2}} }}$$
  • $d$ (and its extention) is bounded: the distance between two points is always equal or less than 2.

You can find more about this metric (but not the proof that it's actually a matric) in the books Introduction to Complex Analysis by B.V. Shabat (pages 6 and 7) and Complex Analysis by T.W. Gamelin (section I.3 and especially exercise 6)