# Absolute value definition

Is it true that $\dots$ $$\left| y \right| = \begin{cases} y \hspace{1cm} y \geq 0 \\ -y \hspace{0.7cm} y < 0 \end{cases}$$

I'm a little bit confused with the second case, where $|y| = -y$ then $y<0$, for example : $$\left| 2x-4 \right|=-(2x-4)$$ if we assume that $y=2x-4$ then \begin{align*} y&<0 \\ 2x-4&<0 \\ 2x&<4 \\ x&<2 \end{align*} in the other way, we can solve it like this \begin{align*} |y| \geq 0 \\ |2x-4| \geq 0 \\ -(2x-4) \geq 0 \\ 2x-4 \leq 0 \\ x \leq 2 \end{align*}

why is it giving the different answers?

• If you know $x<0$, $|x|>0$. Also, @your 2nd sentence, if $|x|=-x$, you know $x \leq 0$ (not necessarily $x<0$, since $x=0$ does satisfy $|x|=-x$). – Mauve Jan 7 '18 at 15:39
• warning $ax-b<0\iff ax<b$ you wrote $ax<-b$ (think of it as adding $b$ both sides) – zwim Jan 7 '18 at 15:40
• i'm sorry for that @zwim – Hansen Frenico Jan 7 '18 at 15:42
• @Useless many references said like that , images.slideplayer.com/25/7667598/slides/slide_9.jpg – Hansen Frenico Jan 7 '18 at 15:46
• "Is it true that ...". Yes, this is the definition. – user370967 Jan 7 '18 at 15:47

You should train to read formulas without reference to specific variables. The definition $$|x|=\begin{cases} x & x\ge0 \\[4px] -x & x<0 \end{cases}$$ it is meant that

the absolute value of a number is

1. the number itself if it is greater than or equal to $0$,
2. the negative of the number if it is less than $0$.

You should also avoid using a variable with two different meanings in the same statement.

It seems that you want to see when $|2x-4|=-(2x-4)$. According to the definition, this happens if and only if

1. $2x-4<0$, or
2. $2x-4=0$.

Why the second case? Because $0=-0$. On the other hand, if $2x-4>0$, then we cannot have $(2x-4)=-(2x-4)$, because one term is positive and the other one is negative.

One might make the initial definition more symmetric by declaring $$|x|=\begin{cases} x & x>0 \\[4px] 0 & x=0 \\[4px] -x & x<0 \end{cases}$$ but you can also note that $$|x|=\begin{cases} x & x>0 \\[4px] -x & x\le0 \end{cases}$$ would be a completely equivalent definition.

The absolute value make a function simmetrical with respect to the $x$-axis. Then we have pay attention when the function assumes negative value. In your example we have:

$$|2x−4|=\begin{cases}2x-4 \quad\text{if} \quad 2x-4\ge0\implies x\ge2\\ 4-2x\quad \text{if} \quad 2x-4 <0\implies x<2\end{cases}$$

The graphic of your function in fact is:

$\hspace{6cm}$

It is a bit confusing to use the same letter $x$ for your substitution.

Let set $y=2x-4$.

Then $|y|$ is $\begin{cases}+y&=2x-4&\quad\text{when}\quad y\ge0\iff 2x-4\ge 0\iff x\ge 2\\-y&=4-2x&\quad\text{when}\quad y<0\iff 2x-4<0\iff x<2\end{cases}$

Indeed for $x=1$ then $x<2$ then $|y|=|2\times 1-4|=|-2|=2=4-2\times 1$

And for $x=3$ then $x\ge 2$ then $|y|=|2\times 3-4|=|2|=2=2\times 3-4$

• thanks for the suggestion, but why $x<2$ and not $x \leq 2$? $|2 \times 2-4| = 4-2 \times 2$ – Hansen Frenico Jan 7 '18 at 15:55
• Both are valid since $+0=-0=0$. I just copy/pasted you own definition of $|y|$ where you said $|y|=-y$ when $y<0$, but $y\le 0$ also works. – zwim Jan 7 '18 at 16:29

Note that in general the definition is

$$\left| f(x) \right| = \begin{cases} f(x) \hspace{1cm} f(x) \geq 0 \\ -f(x) \hspace{0.7cm} f(x) < 0 \end{cases}$$