1

How to prove that:

$|x+y| = |x| + |y|$ if and only if $xy \ge0$

and

$|x-y| = |x | - |y|$ if and only if $xy \le0 $ and $|x| \ge |y|$?

I understand that these have similar approach and that each needs two proofs (that A implies B and that B implies A), but for know I've got as far as just writing $xy \ge 0$ and making different operations with it.

Arci
  • 119
  • $xy\geq 0$ is another way of saying that $x$ and $y$ have the same sign. – Arthur Oct 16 '17 at 08:11
  • 1
    @Arthur That would be $xy>0$. If $xy\geq 0 $ means $x$ and $y$ have the same sign, then $1$ and $0$ have the same sign, and $-1$ and $0$ also have the same sign, and that can get awkward :) – 5xum Oct 16 '17 at 08:13
  • @5xum Well, I was a bit quick, but I was thinking $0$ has both signs simultaneously, which would make my comment is entirely true. It's not something I usually do, though, so you are right that I should've been more specific. – Arthur Oct 16 '17 at 08:23
  • @Arthur I think it's safer to say $0$ has neither of the signs, otherwise you lose the transitivity aspect of the relation "having the same sign" :) – 5xum Oct 16 '17 at 08:25
  • @5xum As I said, it's not something I usually do. I just made an attempt to salvage what I had written and couldn't edit. I completely agree with you that $0$ is usually best thought of as having neither sign (its own, third, neutral sign, perhaps?), in which case my original comment would've been twice as long. – Arthur Oct 16 '17 at 08:30
  • @Arthur, thank you for this hint, it played main part in those proofs. – Arci Oct 16 '17 at 08:55
  • It's a similar, but another question of course. – Michael Rozenberg Oct 16 '17 at 18:40
  • 2
    The first part seems to be the same question as: Equality holds in triangle inequality iff both numbers are positive, both are negative or one is zero. It is recommended to ask only one question in one post. Posting several questions in the same post is discouraged and such questions may be put on hold, see meta. – Martin Sleziak Oct 17 '17 at 06:59
  • @Martin Sleziak Your link is valid and this topic is indeed duplicate. The previous link was wrong. – Michael Rozenberg Oct 17 '17 at 12:10
  • 1
    @MartinSleziak, this question is duplicate indeed. I believe it is because of slightly different formulation I wasn't able to find it, so I decided to post it on my own. Considering second part of the question, I don't think that it can be considered as separate one, since it is related to the first part and can be solved by the same approach, which is slightly different from being completely separated question. In any case, if you think I have violated anything, please delete this post. – Arci Oct 17 '17 at 13:08
  • @MichaelRozenberg: That link is exactly what this question was closed as a duplicate of, before you reopened it (just look at https://math.stackexchange.com/posts/2474737/revisions). What "previous wrong link" are you referring to? – Martin R Oct 17 '17 at 13:30
  • @Martin R Your previous link was inequality. I think inequality and equality they are different things. – Michael Rozenberg Oct 17 '17 at 14:57

3 Answers3

8

It's $$\left(|x+y|\right)^2=\left(|x|+|y|\right)^2$$ or$$x^2+2xy+y^2=x^2+2|xy|+y^2$$ or $$|xy|=xy,$$ which is $$xy\geq0.$$ Done!

3

It's an "if and only if" sentence, so you prove it by:

  1. Proving that if $xy\geq 0$, then $|x+y| = |x|+|y|$. (you can do this by separating the cases where $x>0$ and $x<0$ and $x=0$)
  2. Proving that if $|x+y|=|x|+|y|$, then $xy\geq 0$. You can most easily prove this using the reverse, i.e. proving that if $xy<0$, then $|x+y|\neq|x|+|y|$, and again, you can prove this by separating the cases.

Same for the other one.

5xum
  • 123,496
  • 6
  • 128
  • 204
1

As for the first: If $xy<0$ it means that only one if them is negative, so $|y+x|$ is or $|y+(-x)|$ or $|(-y)+x|$ which is not equal to $|y|+|x|$, now if $xy\ge 0$ than both of them are positive or both negative, if both negative you have $|(-y)+(-x)|=|-(y+x)|=|y|+|x|$ and if both positive than $|(y)+(x)|=|y+x|=|y|+|x|$. Now if you want it to be "if and only if" you need to show that also if $|y+x|=|y|+|x|$ then $xy\ge 0$ You can do similar thing to the second one

ℋolo
  • 10,006
  • This really helped me with the first part. Thank you a lot. – Arci Oct 16 '17 at 08:54
  • @Anton do you need me to write how to do the second also? – ℋolo Oct 16 '17 at 09:00
  • no, I have finished it myself. Thank you very much. Actually, I was just reading first sentences of your answer as hint, trying to prove it by myself and reading the next sentence only if I struggle :) – Arci Oct 16 '17 at 09:09