TITLE: Absolute value problem $|x-y|=|y-x|$
QUESTION [7 upvotes]: My question is from Apostol's Vol. 1 One-variable calculus with introduction to linear algebra textbook.
Page 43. Problem 1 Prove each of the following properties of absolute values.
(c) $|x-y|=|y-x|$.
The attempt at a solution: I solved similar problem, which was this: $|x|-|y|\le|x-y|$, by manipulating triangle inequality, I guess this one might be similar but I don't see it. Please help.
So far I have proven following properties:
$|x|=0$ if and only if $x=0$.
$|-x|=|x|$.
Also, absolute value is defined in such way: If $x$ is a real number, the absolute value of $x$ is a nonnegative real number denoted by $|x|$ and defined as follows: $|x|=\begin{cases}
x,  & \text{if $x\ge0$,} \\
-x, & \text{if $x\le0$.}
\end{cases}$.

REPLY [8 votes]: You say that you have proven that $|x|=|-x|$, then it immediately follows that
$$|x-y| = |-(x-y)| =|-x+y| =  |y-x|. $$