4

Why is the following true? $$ |x|= \begin{cases} x,&x\ge 0\\ -x,&x<0 \end{cases} $$ Isn't the modulus of a number always positive? According to the above formula $|-4|=-4$ because $4<0$, which is incorrect. Please explain this to me. Thank you.

egreg
  • 238,574
Tamás
  • 239

6 Answers6

18

No, the formula says that $|-4|=-(-4)=4$. The $x$ in this case is $-4$, and $-(-4)=4$, not $-4$. When you get the value $-4$, you’re not applying the definition correctly: you’re taking the negative of $4$, not of $-4$, but the number inside the absolute value is not $4$.

Brian M. Scott
  • 616,228
8

According to the above formula, $|-4| = -(-4)$, which is perfectly fine.

Dan Shved
  • 15,862
  • 39
  • 55
6

According to your sentence : "Isn`t the modulus of a number always positive? According to the above formula |-4|=-4 because 4<0, which is incorrect." . You have said , "4<0" ? Is it right ? infact -4 < 0 . Infact , $ |-4| = -(-4) $ which is perfectly fine.

6

You may prefer $|x|:=\sqrt{x^2}$, hence $|-4|=\sqrt{16}=4$.

Michael Hoppe
  • 18,103
  • 3
  • 32
  • 49
1

$\vert x\rvert\ge0$ for any $x \in \mathbb{R}$. The piecewise-defined function for $\lvert x\rvert$ is

$$ \vert x\rvert= \begin{cases} x& x>0\\ 0& x=0\\ -x& x<0 \end{cases} $$

We read it literally as

$$ \vert x\rvert= \begin{cases} x& \text{if $x$ is a positive real number}\\ 0& x=0\\ -x& \text{if $x$ is a negative real number} \end{cases} $$

If $x$ is a negative real number then $-x$ is a positive real number. I think it is obvious!

1

The prefix unary operand - changes the sign of its operand. So a negative number's sign is changed to positive by this operation.

ncmathsadist
  • 49,383