# Triangle inequality and its equality

How do I prove this? $$|x+y|=|x|+|y|\Leftrightarrow xy\geq0$$

I tried to use the triangle inequality, but I didn't get so far... Thanks!

• ?​​​​​​​​​​​​​​​ – user2345215 Mar 23 '14 at 23:12
• What is x,y and $|.|$? – BoZenKhaa Mar 23 '14 at 23:13
• $|1+2|=|1|+|2|$ and $2\times 1\neq 0$ – npisinp Mar 23 '14 at 23:15
• It isn't true.. – Seth Mar 23 '14 at 23:15

The way you can prove this depends on your space. But assuming you are working in $\mathbb R$, the right hand side means that at least one of $x$ or $y$ needs to be zeros. But clearly, the triangle equality holds for $x=y=1$, so that must not be the right space. So that cannot be it.

Is it possible that you are using a vector space, and $x\cdot y$, an inner product? in that case, let $| z|= (z\cdot z)^{1/2}$ and expend the left hand side.

Sorry for the guesswork.

The statement simply tells that to add two numbers with the same sign, you have to add their absolute values.

$$|x+y|=|x|+|y| \iff \exists A,B\ge 0 \ \ \ Ax=By$$

This is a consequence of the Cauchy-Schwarz inequality, and is true in every Euclidian (or prehilbertian) space.

Indeed,

$$|x+y|^2 = |x|^2 + |y|^2 + 2\Re\langle x,y\rangle \le |x|^2 + |y|^2 + 2|\langle x,y\rangle| \leq |x|^2 + |y|^2 + 2|x||y| = (|x|+|y|)^2$$ now there is equality iff $$\langle x,y\rangle = |x||y| \iff (x,y) \text{ are on the same line and } \langle x,y\rangle>0$$ which is equivalent to $$\exists A,B\ge 0 \ \ \ Ax = By$$