Proving that changing signs inside absolute value is valid for any two real numbers: $\forall x,y\in\mathbb{R}[\rvert x-y \lvert = \rvert y-x \lvert]$

60 Views Asked by At

I am just beginning learning about proofs, which is pretty cool, and I wanted to prove that $\forall x,y\in\mathbb{R}[\rvert x-y \lvert = \rvert y-x \lvert]$. I was wondering if my proof is correct:

Let $x,y\in\mathbb{R}$.

Case 1: $\enspace x-y> 0$. Then $\lvert x - y\rvert = x - y = -1\cdot(y - x)=\lvert -1\rvert\cdot\lvert y-x\lvert = \lvert y-x\lvert$

Case 2: $\enspace x - y < 0$. Then $\lvert x - y\rvert = -(x-y) = y - x =\lvert y-x\rvert$

$\square$

2

There are 2 best solutions below

0
On BEST ANSWER

Your proof needs work. In your first case, you claim that $$-1\cdot(y-x) = |-1|\cdot|y-x|$$ which is not justified.

If you already know that $|ab| = |a||b|$, then your proof is needlesly complicated, since you can just say $|x-y| = |(-1)\cdot(-1)\cdot(x-y)| = |-1|\cdot |(-1)\cdot(x-y) = 1\cdot |-x - (-y)| = |y-x|$

0
On

You can write $$|y-x|=|(-1)(x-y)|=|(-1)||x-y|=|x-y|$$ since $$|ab|=|a||b|$$