# How would I prove $|x + y| \le |x| + |y|$?

How would I write a detailed structured proof for:

for all real numbers $x$ and $y$, $|x + y| \le |x| + |y|$

I'm planning on breaking it up into four cases, where both $x,y < 0$, $x \ge 0$ and $y<0$, $x<0$ and $y \ge0$, and $x,y \ge 0$. But I'm not sure how I'd go about writing it formally.

Thanks!

You are absolutely on the right track. I'll model one case for you, and you can try the other cases on your own.

Case 1: $x,y\geq 0$. Then $x+y\geq 0$, so $|x+y|=x+y$. Similarly, $|x|=x$ because $x\geq 0$, and $|y|=y$ because $y\geq 0$. Thus $|x+y|=x+y=|x|+|y|$.

Here is an alternative proof, without any case distinctions, using the definition $$|p| = p \max -p$$ so that we can use the properties of $\;\max\;$, which are simpler than those of $\;|\phantom p|\;$. In this case we start at the right hand side of the equation, which seems to be the most complex side, and calculate for every $\;x,y\;$: \begin{align} & |x| + |y| \\ = & \;\;\;\;\;\text{"the above definition, twice"} \\ & (x \max -x) + (y \max -y) \\ = & \;\;\;\;\;\text{"$\;+\;$ distributes over $\;\max\;$"} \\ & (x + (y \max -y)) \max (-x + (y \max -y)) \\ = & \;\;\;\;\;\text{"$\;+\;$ distributes over $\;\max\;$, twice more; $\;\max\;$ is associative"} \\ & (x+y) \max (x-y) \max (-x+y) \max (-x-y) \\ \geq & \;\;\;\;\;\text{"$\;p \max q \geq p\;$, twice"} \\ & (x+y) \max (-x-y) \\ = & \;\;\;\;\;\text{"the above definition"} \\ & |x + y| \\ \end{align}

• Neat. This reminds me of a principle in proof-theory, converting expressions of the form $f(\text{if } a \text{ then } b \text{ else } c)$ to $\text{if } a \text{ then } f(b) \text{ else } f(c)$. Your version of the proof keeps the $\text{if}$ nested inside the expression, his takes it to the outside using cases. – DanielV Nov 7 '13 at 12:24

You might consider the following:

Consider squaring both sides since both sides are non negative (you don't have to worry about sign flips). Canceling yields $$xy \leq |x||y|$$

which is true.