# Prove the triangle inequality in R^2

I need to prove that $$d(y,z) + d(x,y) \geq d(x,z)$$.

With $$d(x,y) = \sqrt{(x_1-y_1)^2 + (x_2-y_2)^2}$$.

I'm struggling to figure out how to work with the square roots especially when they're over an addition problem. Any help is appreciated.

Edit: to make this simpler. I think all I need to do is figure out how to add $$\sqrt{(x_1-y_1)^2 + (x_2-y_2)^2}$$ + $$\sqrt{(y_1-z_1)^2 + (y_2-z_2)^2}$$. Then I can do the a + b proof method. But I just can't figure out how to add those equations so it ends up equalling $$\sqrt{(x_1-z_1)^2 + (x_2-z_2)^2}$$.

• Euclid gave a very nice proof in his Elements: en.wikipedia.org/wiki/Triangle_inequality. – Chris Custer Jan 18 '19 at 2:20
• In one dimension, the formula states that the length of one side of a triangle is less than or equal to the sum of the lengths of the other two sides. – herb steinberg Jan 18 '19 at 2:21
• @herbsteinberg I need to do it in two dimensions though. That's my problem. With one dimension I was able to easily see that (x - y) + (y-z) = (x-z) but having to use the distance formula for two dimensions is making it much more difficult to show that as true. – user580909 Jan 18 '19 at 2:28
• @user580909 I shouldn't have said one dimension. I simply meant the triangle inequality, which is best proven geometrically not algebraically. – herb steinberg Jan 18 '19 at 2:37
• @herbsteinberg I don't think I made this clear but I don't have a problem proving the triangle inequality. My problem is that my proof rests on d(x,y) + d(y,z) = d(x,z) in the second dimension. That's what I need to prove so that I can then use a proof involving abs(a) + abs(b) = abs(a+b) – user580909 Jan 18 '19 at 2:41

Show this first when one of the points is the origin. Then reduce all other cases to this case by using a suitable translation.

• Welcome to Mathematics Stack Exchange. Take the short tour to see how how to get the most from your time here. For typesetting equations we use MathJax. – dantopa Jan 18 '19 at 3:00

The OP is attempting to define a metric on the set of points in the Cartesian plane, $$\mathbb R \times \mathbb R$$. It can be safely assumed that before arriving at this point, they have been introduced to the idea of calculating the length of vectors.

In any case, I doubt there is direct algebraic technique showing

$$\tag 1 \sqrt{(x_1-z_1)^2 + (x_2-z_2)^2} \le \sqrt{(x_1-y_1)^2 + (x_2-y_2)^2} + \sqrt{(y_1-z_1)^2 + (y_2-z_2)^2}$$

without taking a journey upon which you discover the Cauchy–Schwarz inequality.

So when the OP states

I think all I need to do is figure out...

they are bound for disappointment.

But what an opportunity to reflect on this amazing mathematical material. The inequality $$\text{(1)}$$ is true for all $$x_1, x_2,y_1,y_2,z_1,z_2 \in \mathbb R$$, and it is still true if we 'only live on the line'. But so much abstract modern mathematical thought must be expended to bring it all (i.e. Cartesian Coordinate Space = Euclidean Space) to life.

$$\tag 2 (u_1 v_1 + u_2 v_2)^2 \le (u_{1}^{2}+ u_{2}^{2})\,(v_{1}^{2}+ v_{2}^{2})$$
among other arguments, is the way to go if you want to show that $$d(u,v)$$ satisfies the triangle inequality.