In Munkres's topology, he proves that square metric on $\mathbb{R}^n$ is in fact a metric.
By the square metric, I mean this function:
$P:\mathbb{R}^n\times \mathbb{R}^n \rightarrow \mathbb{R}$
$P(x,y) = Max\text{{$|x_i -y_i|$}}_{1\leq i\leq n}$ where $x=(x_1,x_2,...,x_n)$ and $y=(y_1,y_2,...,y_n)$.
His proof goes as follows: The first two conditions of metric are obivious
For triangle inequality,
For any integer $i$, $|x_i-z_i|\leq|x_i-y_i|+|y_i-z_i|$ so using the definition of the function $P$, we get:
$|x_i-z_i|\leq P(x-y)+P(y-z)$
So, $P(x,z)= Max\text{{$|x_i -z_i|$}}_{1\leq i\leq n} = |x_i - z_i|\leq P(x-y)+P(y-z) $
So the triangle inequality holds.
My question is, How to move from:$|x_i-z_i|\leq |x_i-y_i|+|y_i-z_i|$ to $|x_i-z_i|\leq P(x-y)+P(y-z)$ ? How does the definition of $P$ justify that ?
We have $|x_i-y_i|\le P(x,y)$ by definition of $P(x,y)$. Similarly, $|y_i-z_i|\leq P(y,z)$. So $$|x_i-y_i|+|y_i-z_i|\leq P(x,y)+P(y,z)$$