# Prove $|x - y|\le|x| + |y|$ (Spivak's Calculus Book)

I was doing this problem and I got stuck so much time, and then I conclude this.

$$|x - y|\le|x| + |y| .$$

Then, square both sides

$$|(x - y)(x - y)|\le(|x| + |y|)².$$

Since $(x - y)²$ is always positive, as well as $x²$ and $y²$, we get

$$(x - y)²\le x² + 2|xy| + y².$$

Develop the product

$$x² -2xy + y² \le x² + 2|xy| + y²$$

$$-2xy\le2|xy|$$

$$-xy\le|xy|$$

And this is true.

I'd like to know if I did this correctly and If there's a smaller/easier proof because the problem is doing by a very short proof.

• Could you please edit your question to include $...$ around mathematical expressions? Commented Aug 22, 2018 at 8:07
• Already fixed it, thank you. Commented Aug 22, 2018 at 8:12
• I took the liberty of using $$...$$ to center some mathematical expressions. Commented Aug 22, 2018 at 8:14

Your approach is correct; do make sure that every step you have taken can also be taken in reverse. So far you have a proof that $$\textbf{If}\quad|x-y|\leq|x|+|y|\quad\textbf{then}\quad-xy\leq|xy|,$$ but of course you want to prove the opposite implication.

A shorter proof would be to use the triangle inequality; $$|x-y|=|x+(-y)|\leq |x|+|-y|=|x|+|y|.$$

• @Servaes All transformations were equivalent due to non-negativity… hence actually it was not just an "if … then" but an "iff"
– Gono
Commented Aug 22, 2018 at 8:20
• That's the point yes. Commented Aug 22, 2018 at 8:20
• @Gono Indeed, but this is not clear from the proof in the question. No mention of nonnegativity is made (or that an equivalence is proved), so it is worth making this explicit. Commented Aug 22, 2018 at 8:23
• Yes… unfortunately not many people care about good notation. So one never knows if just the notation is bad or a if there is something missing. So it's good to note this :)
– Gono
Commented Aug 22, 2018 at 8:25
• What thing I have to improve? Commented Aug 22, 2018 at 8:34

Your proof is mostly correct, but you should mention that, for $a\ge0$ and $b\ge0$,

$a\le b$ if and only if $a^2\le b^2$

and that you can apply this because $|x-y|\ge0$ and $|x|+|y|\ge0$. Also you should say that the inequalities you write are equivalent to each other.

In the following steps, each line is equivalent to the one below it; also we use $|a|^2=a^2$ and that adding equal terms to both sides of an inequality doesn't change it. \begin{align} & |x-y|\le|x|+|y| \\[4px] & |x-y|^2\le(|x|+|y|)^2 \\[4px] & x^2-2xy+y^2\le x^2+2|x|\,|y|+y^2 \\[4px] & {-}2xy\le |2xy| \end{align} Since the last inequality is true (because $-a\le|a|$ for every $a$), we end the proof.

Your solution is absolutely correct and I think that your approach is simplest and shortest in the sense that you don't need to appeal to (and prove) any lemma.

In @Servaes's approach, he appeals to this inequality $|x+y|\le |x|+|y|$, which certainly needs a proof too.

Bonus: $||x|-|y|| \le |x+y|\le |x|+|y|$.

• Maybe I had to think of that, the first theorem of the book is $|x + y| \le |x| + |y|$ Then, I tried doing transitive propertie with $|x - y| \le |x + y|$. But the case when y is less than 0 the inequality isn't true Commented Aug 22, 2018 at 8:19
• @Enigsis This inequality $|x - y| \le |x + y|$ is not true. Commented Aug 22, 2018 at 8:26
• That's why I isn't use it, it isn't true when y is less than 0 Commented Aug 22, 2018 at 8:27

That's right to me. Also you can use the classical triangle inequality $$|x-y|=|x+(-y)|\le|x|+|-y|=|x|+|y|$$

You start from what you want to prove and then you square both sides, find something true and conclude.

Using this method I can prove that $$3\leq -6$$ Indeed, square both sides, you find $9\leq 36$ which is true.

What you need to add is that $a\leq b$ is indeed equivalent to $a^2\leq b^2$ whenever $a,b\geq 0$.

That is because

• if $b\geq 0$ then $$a^2\leq b^2\implies \sqrt{a^2}\leq \sqrt{b^2}=b\implies |a|\leq b\implies a\leq b$$

• if $a\geq 0$ then $a\leq b\implies a\cdot a\leq a\cdot b\leq b\cdot b$.

• Yes, but, I square both sides because $|x - y| \ge 0$ and $|x| + |y| \gt 0$ Commented Aug 22, 2018 at 8:31
• @Enigsis You should then state it explicitly. A teacher will see such "proofs" all the time, and very seldom by students who would actually be able to fill the gaps. So the only way to show that you are that student is by actually filling the gap. Don't start by what you want to prove, or explain why you can do so. Commented Aug 22, 2018 at 8:35
• I didn't do that because, |x| be always a positive number and I think that you don't have to explain that Commented Aug 22, 2018 at 8:42
• @Enigsis What you have to explain is not that $|x|$ is a non-negative number. It's the fact that when $a,b$ are non-negative, $a\leq b$ is equivalent to $a^2\leq b^2$. If you don't do that (and if you're a student), you will not get full marks, unless your teacher is lazy as well. Commented Aug 22, 2018 at 8:48
• @ArnaudMortier “whenever $a\ge0$”. Otherwise you're saying that $-3\le 1$ implies $(-3)^2\le 1^2$. Commented Aug 22, 2018 at 9:06