Absolute value
FoundationsThe absolute value of a real number is its distance from zero, so it is never negative.
On a number line, −5 and 5 are both five units from zero. Vertical bars record this distance: |−5| = |5| = 5. The absolute difference |a−b| measures how far two real numbers are apart without caring which comes first. That makes it useful when a process compares neighbouring values. For complex numbers, the same distance idea extends to the plane and is often called modulus.
Example |3−8| = 5 and |8−3| = 5.