# Absolute value

The absolute value of a number is a measure of the size of that number. The absolute value of x is written | x | .

If x is a positive number, then | x | = x.
If x is a negative number, then | x | = x.
If x = 0 then | x | = 0.

Absolute value has several useful properties. One is the multiplicative property. If x and y are two numbers, then $|xy| = |x| \times |y|$. Another is the triangle inequality, which is the fact that $|x+y| \leq |x| + |y|$. For example, if x = 3 and y = − 5, then | x + y | = | 3 + ( − 5) | = | 3 − 5 | = | − 2 | = 2, while | x | + | y | = | − 5 | + | 3 | = 5 + 3 = 8. In this case, the triangle inequality is the fact that 2 is not more than 8.

Complex numbers also have an absolute value. If z = x + iy is a complex number with real part x and imaginary part y, then $|z| = \sqrt{x^2 + y^2}$. If we represent z as a point in the complex plane with coordinates (x,y), then | z | is the distance from this point to the origin. The absolute value of complex numbers also has the multiplicative property and satisfies the triangle inequality.