# Understanding the example of metric

I would like to get some help about the next problem:

I'm trying to understand the following example about metric in my book:

In the set $$\mathbb{R}^n$$, just as in any non-empty set, metric can be defined in more ways. Lets cite two examples of the generalisations of the previous example (My note: example is $$\mathbf{d_2(x, y) = \sqrt{\sum\limits_{i = 1}^n (x_i - y_i)^2}, \,(x, y \in \mathbb{R}^n)}$$):

i) Metric $$d_p$$, $$p \ge 1$$ is defined with $$d_p(x, y) = \sqrt[p]{\sum\limits_{i = 1}^n |x_i - y_i|^p}, \quad (x, y \in \mathbb{R}^n).$$ (My note: this part I understand and I proved it.)

ii) Metric $$d_{\infty}$$ is defined with $$d_{\infty} = \max_{1 \le i \le n}|x_i - y_i|, \quad (x, y \in \mathbb{R}^n).$$ (My note: I proved that this function is metric.)

From the inequality $$d_{\infty}(x, y) \le d_p(x, y) \le n^{\frac{1}{p}} d_{\infty}(x, y), \quad x, y \in \mathbb{R}^n, \quad p \ge 1,$$ we have that $$d_{\infty}(x, y) = \lim\limits_{p \to \infty} d_p(x, y)$$.

I guess that in the book they tried to use Squeeze theorem to prove the last equations, but I can't understand how the got the second part of the inequality, $$d_p(x, y) \le n^{\frac{1}{p}} d_{\infty}(x, y)$$. I only have this:

$$d_p(x, y) \le n^{\frac{1}{p}} d_{\infty}(x, y) \iff \sqrt[p]{\sum\limits_{i = 1}^n |x_i - y_i|^p} \le \sqrt[p]{n} \cdot \max_{1 \le i \le n}|x_i - y_i| \iff$$ $$|x_1 - y_1|^p + \cdot \cdot \cdot + |x_{a - 1} - y_{a - 1}|^p + |x_{a + 1} - y_{a + 1}|^p + \cdot \cdot \cdot + |x_n - y_n|^p \le (n - 1)|x_a - y_a|^p,$$

where $$a \in \{1, ... ,n\}$$ is such that $$\max_{1 \le i \le n}|x_i - y_i| = |x_a - y_a|$$.

• Your solution is perfect. Just observe that $|x_i-y_i|^p\le|x_a-y_a|^p$ for each of the $n-1$ summands on the left side, because of the assumption on the index $a$. Mar 21 '19 at 11:24
Note that, if $$x(x_1,\ldots,x_n)$$ and $$y=(y_1,\ldots,y_n)$$, then, for each $$i\in\{1,\ldots,n\}$$, $$\lvert x_i-y_i\rvert\leqslant d_\infty(x,y)$$. Therefore\begin{align}d_p(x,y)&=\sqrt[p]{\sum_{i=1}^n\lvert x_i-y_i\rvert^p}\\&\leqslant\sqrt[p]{\sum_{i=1}^n\bigl(d_\infty(x,y)\bigr)^p}\\&=\sqrt[p]{n\times\bigl(d_\infty(x,y)\bigr)^p}\\&=\sqrt[p]n\times d_\infty(x,y).\end{align}
Let $$|x_a - y_a|=\max_{1 \le i \le n}|x_i - y_i|$$. Then
$$d_p(x, y) = \sqrt[p]{\sum_{i = 1}^n |x_i - y_i|^p}\leq \sqrt[p]{\sum_{i = 1}^n |x_a - y_a|^p}\\=\sqrt[p]{n\cdot|x_a - y_a|^p}=\sqrt[p]{n}|x_a - y_a|.$$