# Prove that $|-x| = |x|$

Using only the definition of Absolute Value:

$\left|x\right| = \begin{cases} x & x> 0 \\ -x & x < 0 \\ 0 & x = 0,\end{cases}$

Prove that $|-x| = |x|.$

This seems so simple, but I keep getting hung up. I use the definition insert $-x$ into the definition, but I end up with:

$\left|-x\right| = \begin{cases} -x & x> 0 \\ -(-x) & x < 0 \\ 0 & x = 0\end{cases}$

which doesn't make sense to me. It certainly doesn't equal $|x|,$ does it?

I would use $|x| = \sqrt{x^2}$ but I am supposed to prove that identity later in the problem set. What am I doing wrong?

• You multiplied $x$ by $-1$ in your second piecewise function, but you forgot to do so for the inequalities $x>0$ and $x<0$. Jan 5 '16 at 22:43

$\left|-x\right| = \begin{cases} -x & \bbox[5px,border:2px solid #F0A]{-x> 0} \\ -(-x) & \bbox[5px,border:2px solid #F0A]{-x < 0} \\ 0 & \bbox[5px,border:2px solid #F0A]{-x = 0}\end{cases}$

Rather, you should have $$\lvert-x\rvert=\begin{cases}-x & -x>0\\-(-x) & -x<0\\0 & -x=0.\end{cases}$$ Can you take it from there?

• I totally understand where I was going wrong, and I now completely understand the problem and solution. Jan 6 '16 at 1:25

Here's an even quicker way. Use the property $|ab|=|a||b|$ on $|-x|$.

• Have these properties been proven yet though? Otherwise, how do you know this property is true? Jan 5 '16 at 22:48
• Good point, but I still think the idea is worth mentioning. Jan 5 '16 at 22:49
• Actually, one of the next problems was to prove this identity. Jan 7 '16 at 22:19

Good question! You need to flip the $>$ and $<$ signs in the definition.

It's for the same reason that you need to flip the sign when you multiply both sides of $a > b$ by $-1$, getting $-a < -b$.

Your substitutions show that $|-x|=-|x|$. which is false. The error comes from the fact that when introducing the minus sign you did not swap the sense of inequalities

once swapped

$|-x|= -x\quad (x<0)$

$|-x| = x\quad (x>0)$

$|-x| = 0\quad (x=0)$

you see that $|-x|$ definition matches that of $|x|$ again.

• Can you show us, besides $x=0$, where your first line is true? Also, the OP knows what you've answered with- what he doesn't understand is why the domains didn't match up (i.e., why his final result didn't resemble the original statement, if $|x|=|-x|$). Jan 5 '16 at 22:52
• The error comes from the fact that it does not switch the signs of domains. The expression of |-x| is false.
– Pete
Jan 5 '16 at 23:09
• Your edited answer is clearer; cool. Jan 6 '16 at 3:51

Proof by cases:

$1)$ $x \gt 0$, and so $-x \lt 0$

$|x|=x, |-x|=-(-x)=x$

$2)$$x=0$ (clear)

$3)$ $x \lt 0$, and so $-x \gt 0$

then $|x|=-(x)$

$|-x|=-(x)$

QED

You can just do case analysis. Check the cases of when $x>0$, $x=0$ and $x<0$