[Math] Proof of $ |a-b| = |b-a| $

absolute value

While working out some intriguing qualities of absolute values for my studies of calculus, I frequently used the formula below.

I know that the formula below is clearly correct but how would I prove it?
$$ |a-b| = |b-a| $$ $$ a,b \in\mathbb R $$

Believing that I require an actual proof for the formula I used so often I attempted to prove that formula "by cases". It appeared, however, that there is a more elegant proof somewhere out there.

Thanks in advance.

Best Answer

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

Related Question