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

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.

• Write it as $(a-b)=(-1)(b-a)$ May 22, 2015 at 15:37
• sqare both sides of thze equation May 22, 2015 at 15:37
• The answer depends on how you define the absolute value. If it is defined by cases, the proof is likely to work that way, too. Jul 4, 2015 at 16:01

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

• Elegent . +1 ^^ May 22, 2015 at 17:19

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.

$$|a - b|$$

= $$|-b + a|$$ (commutative)

= $$|-(b - a)|$$ (distributive)

= $$||-(b - a)||$$ (identity)

= $$|(b - a)|$$ (absolute value)

= $$|b - a|$$ (associative)

Q.E.D.

I recently proved this statement using only a few basic properties of real numbers and the definition of absolute value. So it may be a bit easier to grasp than some of the other proofs presented here.

Proof:

Suppose a and b are real numbers. By trichotomy law only one of the following relation holds: a = b, a > b, or a < b.

Case 1: a = b

|a - b| = |0 - 0| = |0| = 0.

|b - a| = |0 - 0| = |0| = 0.

Because |0| = 0 by definition of absolute value.

Hence |a - b| = |b - a|

Case 2: a > b

Starting with a > b,

a - b > b - b

a - b > 0

Starting with a > b,

a - a > b - a

0 > b - a

By definition of absolute value, |a - b| = a - b because a - b > 0. And |b - a| = -(b - a) = a - b because b - a < 0.

Hence |a - b| = |b - a|

Case 3: a < b

Starting with a < b,

a - b < b - b

a - b < 0

Starting with a < b,

a - a < b - a

0 < b - a

By definition of absolute value, |a - b| = -(a - b) = b - a because a - b < 0. And |b - a| = b - a because b - a > 0.

Hence |a - b| = |b - a|

In all three cases |a - b| = |b - a|, therefore for any real numbers a and b, |a - b| = |b - a|.

Q.E.D.

References: