# Prove $\lvert x\rvert$ = $\lvert-x\rvert$ for all real numbers $x$ [closed]

Been at this one for a long time. I'm trying to use the fact that $|x|$ = $x$ if $x$ is greater than or equal to 0, and $|x|$ = $-x$ if $x$ is less than 0. Then I want to split the proof into these 2 cases. I'm not sure if I'm supposed to use anything other than that definition for absolute value.

## closed as off-topic by Shailesh, Did, user91500, Claude Leibovici, colormegoneJan 22 '16 at 8:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Shailesh, Did, user91500, Claude Leibovici, colormegone
If this question can be reworded to fit the rules in the help center, please edit the question.

• The definition is enough. Have you actually tried this approach? – Wojowu Jan 22 '16 at 7:06
• Tried it for hours. I'm just beginning proofs so I'm having a difficult time figuring out what I can or can't assume. – Chris Jan 22 '16 at 7:18

If $x \geq 0$ then $-x \leq 0$, so that $\lvert-x\rvert = -(-x) = x = \lvert x\rvert$.

If $x < 0$ then $-x > 0$, so that $\lvert-x\rvert = -x = \lvert x\rvert$.

You don't really have much except the definition to go on.

If you can prove that if 1) if $x < 0$ then $-x > 0$ and 2) that $-(-x) = x \forall x$ you are done.

Proving those will depend on depend on the field definitions and axioms you are given to work with.

$-(-x) = 0$ is a direct result of the definition of additive inverse (and the assumption that $\mathbb R$ is an ordered field so every element has a unique additive inverse). [x + (-x) = 0 so x = -(-x)]

If x > 0 then -x < 0 and vice versa, is a basic proposition from the order field axioms (assuming $\mathbb R$ was presented as an ordered field). [ if x > 0 then 0 = -x + x > -x + 0 = -x]

So if $x \ge 0$ then $-x \le 0$ so $|-x| = -(-x) = x = |x|$.

If $x < 0$ then $- x > 0$ so $|-x| = -x = |x|$.

The map $x \mapsto \sqrt{x}$ is bijective on $[0,\infty)$, hence it is sufficient to show that $|x|^2 = |-x|^2$ for all $x$. No need to deal with cases here.

I propose an Algorithmic Proof in the hope it will appear as “trivial”

Assumptions

• H1: $| x | = x$ if $x \ge 0$
• H2: $| x | = -x$ if $x < 0$

Thesis

• T: $| x | = | -x | \quad \forall x \in \mathbb{R}$

Proof

Step 1 :

• Let’s evaluate $| x |$ so if $x \ge 0$ then goto Step 2.1 otherwise goto Step 3.1

Step 2.1 :

• Use H1 as conditions holds and get $| x | = x$

Step 2.2:

• Evaluate $| -x |$ but for sure $-x \le 0$ (as we are in the $x \ge 0$ branch) so immediately use H2 then $| -x | = -(-x) = x$

Step 2.3:

• Finally observe that $| x | = x = | -x |$ and this branch concludes

Step 3.1:

• Use H2 as condition holds and get $| x | = -x$

Step 3.2:

• Evaluate $| -x |$ but for sure $-x > 0$ (as we are in the $x < 0$ branch) so immediately use H1 then $| -x | = -x$

Step 3.3:

• Finally observe that $| x | = -x = | -x |$ and this branch concludes

Finally observe that whatever the branch the conclusion is always $| x | = | -x |$ hence T holds