Proof of $ |a-b| = |b-a| $

I like to use that $|x| = \sqrt{x^{2}}$. Then $$|a-b|=\sqrt{(a-b)^{2}}=\sqrt{(a^2-2ab+b^2)}=\sqrt{(b-a)^{2}}=|b-a|.$$


Use the definition of absolute value. If $a-b \geq 0$, then: $$|a-b| = a-b = -(b-a) = |b-a|,$$ where the last step is given because $a-b \geq 0 \implies b-a \leq 0$ and so $-(b-a) = |b-a|$. You treat the other case similarly.


Hint:

$$|a-b| = \begin{cases} a-b, & a - b > 0 \\ -(a-b), & a - b \leq 0 \end{cases}$$

$$|b-a| = \begin{cases} b-a, & b-a > 0 \\ -(b-a), & b-a \leq 0 \end{cases}$$


If $a=b$, this is trivial. WLOG, suppose $a<b$. Now $|a-b|=-(a-b)=b-a=|b-a|$.


You just need to have a look, how the absolute value is defined: For $x \in \Bbb R$, $$ \vert x \vert := \begin{cases} x \; , & \text{if $x \geq 0$} \\ -x \; , & \text{if } x < 0\end{cases} \; .$$

So let $a, b \in \Bbb R$. Let's first assume that $a > b$, then $a - b > 0$, and by the defintion of the absolute value we get $$ \vert a - b \vert = a - b \; . $$ Since $b - a < 0$, we get by the definition of the absolute value $$\vert b - a \vert = -(b-a) = a - b \; ,$$ so we conclude that $$\vert a-b \vert = \vert b - a\vert \; ,$$ if $a > b$. Do the same for the case $b > a$ and note, that the case $a=b$ is trivial.