How does the triangle inequality work for $|x-y|$?

Solution 1:

Indeed, you are correct in your intuition. Moreover, we also have $$ |x-y|\ge \left|\; |x|-|y|\; \right| $$

Solution 2:

The proof of the "reverse triangle inequality" requested in the other comments: given the basic TE, $$\def\abs#1{\lvert#1\rvert}\abs{x + y} \leq \abs{x} + \abs{y},$$ subtract $\abs{y}$ from both sides: $$\abs{x + y} - \abs{y} \leq \abs{x}.$$ Now replace $x + y$ with $x$, and thus $x$ with $x - y$ (if you don't get this: use a new variable $z = x + y$, so $x = z - y$, and then replace $z$ with $x$ later because the names are meaningless): $$\abs{x} - \abs{y} \leq \abs{x - y}.$$ By symmetry of $x$ and $y$, we also have $$\abs{y} - \abs{x} \leq \abs{y - x} = \abs{x - y}.$$ Therefore $$\bigl\lvert\abs{x} - \abs{y}\bigr\rvert = \pm(\abs{x} - \abs{y}) \leq \abs{x - y}.$$