# Equality holds in triangle inequality iff both numbers are positive, both are negative or one is zero

How do we show that equality holds in the triangle inequality $|a+b|=|a|+|b|$ iff both numbers are positive, both are negative or one is zero? I already showed that equality holds when one of the three conditions happens.

-
You can simplify your hypothesis to "both non-negative or both non-positive". – Hurkyl Nov 1 '12 at 5:33
– Martin Sleziak Sep 25 '14 at 10:20

If $a$ and $b$ are positive, then $|a+b|=a+b=|a|+|b|$. If they are negative, then $|a+b|=-a-b=|a|+|b|$. Suppose one of them is $0$. Without loss of generality suppose $a=0$. Then $|a+b|=|b|=|a|+|b|$.

If none of the three situations occurs, then between $a$ and $b$ one is positive and one negative. Without loss of generality, suppose $a$ is positive. Suppose $|a+b|=|a|+|b|$. If $a+b\geq 0$, then $a+b=a-b$ so that $b=0$, a contradiction. If $a+b<0$, then $-a-b=a-b$ so that $a=0$, a contradiction.

-
This is exactly the end of the proof I started writing. Do I have to show what happens when a is positive and b is negative and also a is negative and b is positive or one of the situations is enough? – Georgey Nov 1 '12 at 7:16
can I write the following after showing when the inequality is equal: In order to complete the proof we will show an equality isn't a result when one of the parameters A or B is positive and the other is negative (which of them is not important because A*B is a product): $$ab-|ab|<=0$$ – Georgey Nov 1 '12 at 7:49
I clicked Enter by mistake without finishing the proof: can I write the following after showing when the inequality is equal: In order to complete the proof we will show an equality isn't a result when one of the parameters A or B is positive and the other is negative (which of them is not important because A*B is a product): $$ab-|ab|<=0$$ $$ab+ab<=0$$ (We get rid of the absolute value by taking minus out of it) $$2ab<=0$$ $$ab<=0$$ (We divide both sides of the inequality by 2) $$ab<0$$ Because the product of A positive and B negative is negative. – Georgey Nov 1 '12 at 7:55
After showing that when A,B are both positive or negative or one of them equals to zero the inequality equals, I show the only one left scenario which is one one of them is positive and the other is negative. This way I cover all of the options and I complete the IFF proof, right? – Georgey Nov 1 '12 at 8:02

If we have $$|a + b| = |a| + |b|$$

Then we have two cases. First $$a + b = |a| + |b| \implies a-|a| =|b|-b$$ Both sides in the above are either simultaneously zero (in which $a = |a|$ and $b = |b|$) or simultaneously not zero, in which ($a \neq |a|$ and $b \neq |b|$). The first case is simultaneously positive and the second implies $|a| = |b| = 0$.

Similarly for the other case $$-a - b = |a| + |b| \implies -|a|-a = b+|b|$$ in which the same analysis applies.

-

Because $|a+b|$ and $|a|+|b|$ are nonnegative, the inequality $|a+b| \leq |a|+|b|$ is equivalent to $$(|a+b|)^2 \leq (|a|+|b|)^2,$$ which becomes after simplification $$ab \leq |ab|.$$ The equality clearly then holds iff $ab$ is nonnegative.

-