What is absolute value?
The absolute value of a number is its distance from zero on the number line, without regard to direction. For example, both 5 and -5 have an absolute value of 5 because each is five units from zero.
Absolute value is written with vertical bars: |x|. It is always non-negative. For any positive number or zero the absolute value equals the number itself; for any negative number it equals the number with the sign flipped.
|x| = x if x >= 0, |x| = -x if x < 0
The piecewise definition of absolute value.