# Question on absolute values, mainly about their piece-wise functions

When breaking an absolute value function such as $$y = |2-x|$$ into parts for a piece-wise function, would $$2-x$$ be the piece for $$x < 2$$, and $$x-2$$ be the piece for $$x ≥ 2?$$

If so, is it because $$y = |2-x|$$ is the same as $$|-x+2| = |-(x-2)| = x-2?$$ In other words, is $$y = |2-x|$$ already given in its negative form, so there would be no need to repeat the process of doing $$-(2-x)$$ when finding the piece for $$x < 2?$$

For example, for $$y = |x|$$, in order to find the piece for $$x < 0$$, you would have to apply the negative sign outside of $$|x|$$ and then becoming $$-|x|$$ then $$-(x)$$ and then $$-x$$ . But when finding the piece for $$x < 2$$ of $$y = |2-x|$$, is applying the negative sign outside of the absolute value bars not needed since $$|2-x|$$ is already the piece for $$x < 2$$, since $$|2-x| = |-x+2| = |-(x-2)| = -|x-2|= -(x-2) = 2-x?$$

It's kind of difficult to explain but is this the correct reason why $$|2-x|$$ is still $$2-x$$ when $$x < 2$$ instead of $$-(2-x)$$ in the piece-wise function?

EDIT1: When I say "$$y = |2-x|$$ already given in its negative form" I mean that there's no need to apply the negative sign outside of the absolute value brackets to obtain the piece for $$x < 2$$. For example, with something like $$y = |x|$$, you would have to apply the negative signs outside to obtain $$-x$$, which is the piece for $$x<0$$.

• Placing a negative sign outside the absolute value bars changes the sign of the expression unless the quantity inside the absolute value bars is equal to zero. When you write an absolute value in piecewise form, what matters is the sign of the quantity inside the absolute value bars. – N. F. Taussig Sep 29 '19 at 7:50
• So basically |2-x| is already in its negative form, since there already was a negative sign applied to the quantity inside the absolute value bars? E.g. |2-x| = |-(x-2)| – Patrick Pichart Sep 29 '19 at 7:53
• I know y = |x| and y = |-x| are equivalent when graphed, but what's the difference between them? – Patrick Pichart Sep 29 '19 at 7:57
• Note that $|2 - x| = |(-1)(x - 2)| = |-1||x -2| = 1|x - 2| = |x - 2|$ and that $|-x| = |(-1)x| = |-1||x| = |x|$. – N. F. Taussig Sep 29 '19 at 8:01
• My question is why does y = |-x| remain the same as in what's in the inside, when finding the piece for x<0? For example, for x < 0 for y = |x|, you have to apply the negative signs on the inside to get -x, but for y = |-x|, you just leave it as is. – Patrick Pichart Sep 29 '19 at 8:05

The absolute value of a real number is its distance from $$0$$ on the real number line.

For instance, $$|5| = 5$$ since $$5$$ is five units from $$0$$, and $$|-4| = 4$$ since $$-4$$ is four units from $$0$$.

If $$x \geq 0$$, the distance of $$x$$ from $$0$$ is just $$x$$. If $$x < 0$$, the distance of $$x$$ from $$0$$ is $$-x$$. This gives us the piecewise definition $$|x| = \begin{cases} x & \text{if x \geq 0}\\ -x & \text{if x < 0} \end{cases}$$ that you stated.

Let's look at $$|2 - x|$$. Observe that \begin{align*} 2 - x & \geq 0\\ 2 & \geq x \end{align*} Hence, the quantity inside the absolute value bars is nonnegative when $$x \leq 2$$. It is negative otherwise. Thus, \begin{align*} |2 - x| & = \begin{cases} 2 - x & \text{if x \leq 2}\\ -(2 - x) & \text{if x > 2} \end{cases}\\ & = \begin{cases} 2 - x & \text{if x \leq 2}\\ -2 + x & \text{if x < 2} \end{cases} \end{align*} Notice that the piecewise definition of $$|2 - x|$$ is determined by the sign of the quantity $$2 - x$$. When $$2 - x \geq 0$$, $$|2 - x| = 2 - x$$. On the other hand, if $$2 - x < 0$$, $$|2 - x| = -(2 - x) = -2 + x = x - 2 > 0$$.

Since the absolute value of a number cannot be negative, $$|x - 2| = x - 2$$ is only true if $$x - 2 \geq 0$$, which occurs when $$x \geq 2$$. If $$x < 2$$, then $$x - 2 < 0$$, so $$|x - 2| = -(x - 2) = -x + 2 = 2 - x > 0$$.
The statement $$|-(x - 2)| = -|x - 2|$$ is only true if $$x - 2 = 0$$. If $$x \neq 2$$, the expression on the left-hand side is positive, while the quantity on the right-hand side is negative, making the statement false. What you should have written is $$|-(x - 2)| = |(-1)(x - 2)| = |-1||x - 2| = 1|x - 2| = |x - 2|$$
• The absolute value of a number is always nonnegative. When the quantity inside the absolute value is nonnegative, it is equal to its absolute value. When the quantity inside the absolute value is negative, we must multiply it by $-1$ to obtain its absolute value. – N. F. Taussig Sep 29 '19 at 11:32