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.
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!