1

I'm in High School and my textbooks have like skipped a lesson of modulus,i.e. $|x|$ in previous classes. I know that $$|-4|=4 $$ but how does

$$|x|=\begin{cases} x &\text{ if } x\geq0\\-x&\text{ if } x<0\end{cases}$$

This negative value of $x$ is what I don't get. If modulus gives positive values, how can $f(x)$ give a negative value?

Ps: I have found these problems while learning sets.

Eric Wofsey
  • 342,377

2 Answers2

7

(this negative value of x is what i dont get. If modulus gives positive values,how can f(x) give a negative value)

The definition might seem confusing at first, but it is in fact very logical: $$|x| = \begin{cases} x & x \ge 0 \\ -x & x< 0\end{cases}$$ You should read this as follows:

The absolute value of $x$, written as $|x|$, is equal to:

  • $x$ itself if $x$ is positive;
  • $-x$ if $x$ is negative.

Indeed: when $x$ is negative, $-x$ is positive!

Take an example, for $x = -3$ you would get: $$|\color{red}{-3}| = -(\color{red}{-3}) = 3$$


Or put differently: we probably think of $|-3|=3$ as "dropping the minus sign", but that's hard to put into symbols if we want to write down a symbolical definition. We can however easily add an extra minus and of course this achieves the exact same thing since $-(-x) = x$.

StackTD
  • 28,371
3

Remember that $-x$ doesn't mean that the number is negative (even though there's a negative sign!) When $x$ is already negative, $-x$ is positive.

Michael Burr
  • 33,866