Maximum of two metrics is a metric Let $X$ be a set endowed with two metrics $d_1$ and $d_2$ and for all $x$, $y \in X$ define the function $d(x,y) = \max\{d_1(x,y),d_2(x,y)\}$. Show that $d$ is a metric on $X$. 
(Note I put up this question and its answer because there was a similar question about the minimum of two metrics but none on the maximum.)
 A: To be a metric, $d$ must satisfy the following three conditions:


*

*$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$ (the triangle inequality)


Take these conditions in turn. Beforehand, note that for any $x$, $y \in X$ we have $d(x,y) \geq d_1(x,y)$ and $d(x,y) \geq d_2(x,y)$.


*

*$d(x,y) \geq d_1(x,y) \geq 0$ for any $x, y \in X$.

*If $x \neq y$ then $d_1(x,y) >0$ so $d(x,y) \geq d_1(x,y) >0$. If $x=y$ then $d_1(x,y) = d_2(x,y) =0$ so therefore their maximum $d(x,y)$ is also zero.

*$d(x,y) = \max\{d_1(x,y),d_2(x,y)\} = \max\{d_1(y,x),d_2(y,x)\} = d(y,x)$.

*Given $x, y, z \in X$, $d(x,z)$ is either equal to $d_1(x,z)$ or $d_2(x,z)$. Suppose first that $d(x,z) = d_1(x,z)$. By the triangle inequality for $d_1$ we have $d(x,z) = d_1(x,z) \leq d_1(x,y) + d_1(y,z) \leq d(x,z) + d(y,z)$. Similarly the triangle inequality holds for this triple $x, y, z$ if $d(x,y) = d_2(x,y)$.
Therefore $d$ is a metric on $X$.
A: Another proof for the triangle inequality:

*

*Given $x, y, z \in X$, $d_1(x,z) \leq 
    d_1(x,y) + d_1(y,z) \leq d(x,z) + d(y,z)$. (Second inequality holds since $d = \max\{d_1,d_2\}$)

*Similarily, $x, y, z \in X$, $d_2(x,z) \leq 
    d_2(x,y) + d_2(y,z) \leq d(x,z) + d(y,z)$.

*Combine two inequality, we get $d(x,z) = \max\{d_1,d_2\}(x,z) \leq d(x,z) + d(y,z)$
