# Prove that Euclidean distance in $\mathbb{R}^n$ is a distance

I'm trying to show that: $$\forall x,y\in\mathbb{R}^n, d(x,y)=\left(\sum_{i=1}^n(x_i-y_i)^2\right)^{1/2}$$

is a distance. However I have not proved Cauchy-Schwarz yet and I'm pretty sure I wouldn't know how to use it in this case. Can someone give me a hint on how to solve this?

Thanks a lot for helping!!!

• I think you might be able to prove it using induction over the dimension $n$ using just the Pythagorean Theorem and an argument that any line in $\mathbb{R^{n-1}}$ is orthogonal to the axis along the coordinate in $\mathbb{R^{n}}$ that is not in $\mathbb{R^{n-1}}$ (i.e. the $n$-th coordinate). E.g. lines in $xy$-plane are all orthogonal to $z$-axis. – Marconius Jul 29 '15 at 18:45
• @Marconius Thanks for your comment, but I am still not sure how to do it. Would you be so kind to explain your idea a little more? Thanks! :D – Guilherme Salomé Jul 29 '15 at 18:55
• @GuilhermeSalomé,have you seen Cauchy -Schwarz proof?en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality – haqnatural Jul 29 '15 at 19:03
• Are you allowed to use $||\mathbf{v}|| = \sqrt{\langle\mathbf{v},\mathbf{v}\rangle}$? – Marconius Jul 29 '15 at 19:28
• see e.g. 1, 2 – 6005 Jul 29 '15 at 19:38

$$\sum_i (x_i + \lambda y_i)^2\geqslant 0$$ $$\sum_i x_i^2+\lambda x_iy_i +\lambda x_iy_i+\lambda^2y_i^2 \geqslant0$$ Let $\lambda=-(\sum_jx_jy_j)/(\sum _jy_jy_j)$ then: $$\sum_i x_i^2-\frac{(\sum_ix_iy_i)(\sum_jx_jy_j)}{(\sum _jy_jy_j)}-\frac{(\sum_ix_iy_i)(\sum_jx_jy_j)}{(\sum _jy_jy_j)}+(\frac{\sum_jx_jy_j}{\sum _jy_j^2})^2 \sum_iy_i^2 \geqslant0$$

Simplifying and adjusting the terms on both sides of the inequality yields: $$(\sum_i x_iy_i)^2 \leqslant \sum_i x_i^2 \sum_iy_i^2 \tag{cqfd!}$$ EDIT Now to the triangle inequality:

$$\sum_i(x_i+y_i)^2=\sum_i x_i^2 +2\sum_i x_iy_i + \sum_iy_i^2 \leqslant \sum_ix_i^2 +2\sqrt{\sum_ix_i^2 \sum_iy_i^2} +\sum_iy_i^2$$ $$=(\sqrt{\sum_ix_i^2} + \sqrt{\sum_iy_i^2} )^2 \tag{cqfd!}$$

• Thanks for your answer! But how do I go from this to Minkowski? – Guilherme Salomé Jul 29 '15 at 20:22
• In other words, how do I go from your inequality to the triangle inequality for that distance? – Guilherme Salomé Jul 29 '15 at 20:30
• @GuilhermeSalomé I've written the triangle inequality, which is a particular case of the Minkowski inequality (to my knowledge, it needs the Holder inequality to be proven) – GeorgSaliba Jul 29 '15 at 20:56

Put $\mathbf{v} = \mathbf{x} - \mathbf{y}$

Then

$d(x,y) = \|\mathbf{x}-\mathbf{y}\| = \|\mathbf{v}\|$

and

$\langle{\mathbf{v},\mathbf{v}}\rangle = \langle{\mathbf{x}-\mathbf{y},\mathbf{x}-\mathbf{y}}\rangle = \displaystyle{\sum\limits_i^n(x_i-y_i)^2}$

and so $\|v\| = \sqrt{\langle\mathbf{v},\mathbf{v}\rangle}$ implies the desired result.