Proving That $(X, d)$ Satisfies the Triangle Inequality

366 Views Asked by At

Let $X = \mathbb{R}^2$ and define a function $d : \mathbb{R}^2 \times \mathbb{R}^2 \to \mathbb{R}$ by $d((x_1, x_2), (y_1, y_2)) = max( |y_1 - x_1|, |y_2 - x_2|)$, where $max(a, b)$ is the maximum of $a$ and $b$.

My Proof

Let $x = (x_1, x_2)$, $y = (y_1, y_2)$, and $z = (z_1, z_2)$.

$d(x, z) = max(|z_1 - x_1|, |z_2 - x_2|)$ (By the definition of $d$.)

$\le max(|z_1 - y_1| + |y_1 - x_1|, | z_2 - y_2 | + | y_2 - x_2 | )$ (Triangle inequality for $\mathbb{R}$.)

$\le max(|z_1 - y_1|, |z_2 - y_2|) + max(|y_1 - x_1| , |y_2 - x_2|)$ (Since, for any $a, b, c, d \ge 0, max(a, c) + max(b, d) ≥ max(a+b, c+d)$.)

$= d(y, z) + d(x, y) \ \ \ Q.E.D.$

I would greatly appreciate it if people could please review my proof for correctness and respond to the question embedded in my proof.

EDIT:

All I'm looking for is a review of my proof for correctness. If it isn't correct, then please specify why and what the correct proof is and/or how it can be made correct.

1

There are 1 best solutions below

5
On

You can break it up into smaller pieces to make it clearer:

Assume (without loss of generality) that

$|z_1 - y_1|+|y_1-x_1| \geq |z_2-y_2|+|y_2-x_2|$.

Then

$max(|z_1 - y_1|+|y_1-x_1|, |z_2-y_2|+|y_2-x_2|) \leq |z_1 - y_1|+|y_1-x_1| \leq max(|z_1 - y_1|,|y_1-x_1|) + |y_1-x_1| \leq max(|z_1 - y_1|,|y_1-x_1|) + max(|z_2 - y_2|,|y_2-x_2|)$

edit: the last step was unjustified as pointed out by ndn.

A different approach:

$|x_1-z_1| \leq |x_1-y_1|+|y_1-z_1| \leq max(|x_1-y_1|,|x_2-y_2|) + max(|y_1-z_1|,|y_2-z_2|).$

Similarly,

$|x_2-z_2| \leq |x_2-y_2|+|y_2-z_2| \leq max(|x_1-y_1|,|x_2-y_2|) + max(|y_1-z_1|,|y_2-z_2|).$

Therefore $max(|x_1-z_1|, |x_2-z_2|) \leq max(|x_1-y_1|,|x_2-y_2|) + max(|y_1-z_1|,|y_2-z_2|).$