Use absolute value.
Geometrically, the absolute value of a number a, written 0 a 0, is the distance on the number line from 0 to a. For example, the absolute value of 5 is the same as the absolute value of
– 5 because each number lies five units from 0. That is,
Because absolute value represents distance, and distance is always positive
(or 0), the absolute value of a number is always positive (or 0).
The formal definition of absolute value follows.
The second part of this definition, = –a if a is negative, requires careful
thought. If a is a negative number, then – a, the additive inverse or opposite
of a, is a positive number, so is positive.