Absolute value is a function that takes some number and outputs the size of that number, regardless of the sign. By definition,
if
, and
if
.
For example,
- |2| = 2 because the input 2 is positive, so the input is unchanged;
- |-3| = -(-3) = 3 because the input -3 is negative, so the sign is switched.
What this means for this problem is that there are two cases to consider:
- If
, then
, so that

- On the other hand, if
, then
, so
