# Trying to Prove that Given Function is a Metric

1. May 20, 2013

### Bennigan88

Hello! I'm trying to prove that $d_1\left({x,y}\right)=\max\{\left|{x_j-y_j}\right|:j=1,2,...,k\}$ is a metric. I know that since $d_1\left({x,y}\right) = \left|{x_j-y_j}\right|$ for some $j$ that $d_1\left({x,y}\right) \geq 0$ and since $\left|{x_j-y_j}\right| = \left|{y_j-x_j}\right|$ that $d_1\left({x,y}\right) = d_1\left({y,x}\right)$. Also, $\left|{x_j-x_j}\right| = 0$ for all $j$ thus $d_1\left({x,x}\right) = 0$. The part that is giving me trouble is proving that $d_1\left({x,y}\right) \leq d_1\left({x,z}\right) + d_1\left({z,y}\right)$. Any hints or tips? No spoilers please! Here are some things that I've shown so far, but I'm not seeing the connection between any of these and what I need.

Since $dist\left({x,y}\right) \leq \sqrt{k}\cdot\max\{\left|{x_j-y_j}\right|:j=1,2,...k\}$ where $dist\left({x,y}\right)$ is the standard distance function between points in $\mathbb{R}^{k}$, I have $dist\left({x,y}\right) \leq \sqrt{k}\cdot d_1\left({x,y}\right)$. I was thinking of trying to involve the reverse triangle inequality since that sometimes is the missing link for proofs that I'm stumped on, but the thing that messes me up is that the dimension in which lays the longest distance $\left|{x_j-y_j}\right|$ that is, the value of index $j$ could be different for the three pairs of points. I also know that $d_1\left({x,y}\right) \leq dist\left({x,y}\right)$ as the distance between two points in a single dimension can at most be the same as the distance between the points in the space. Are there any theorems or definitions that I'm missing? Thanks!

2. May 20, 2013

### CompuChip

A triangle inequality for the max would be useful here.

If you give it some thought you will hopefully see that
$$\max_i (a_i + b_i) \le \left(\max_i a_i \right) + \left(\max_i b_i\right)$$

3. May 20, 2013

### Bennigan88

I don't think I understand your notation :/

4. May 20, 2013

### CompuChip

Sorry, I am lazy when it comes to notation.
$$\max_i a_i$$
is shorthand for
$$\max_{i = 1}^k a_i$$
which in turn corresponds to your
$$\max \{ a_i \mid i = 1, \ldots k \}$$

By the way, I assumed that k is the dimension of your space, i.e. you are trying to show that it's a metric on $\mathbb{R}^k$, and that xi is the i-th component of the vector x. If that is wrong, please let me know :)