# Absolute value

In mathematics, the absolute value or modulus |x| of a real number x is the non-negative value of x without regard to its sign. Namely, |x| = x for a positive x, |x| = −x for a negative x (in which case x is positive), and |0| = 0. For example, the absolute value of 3 is 3, and the absolute value of −3 is also 3. The absolute value of a number may be thought of as its distance from zero.

${\begin{cases}\ \;\,\ \ x&\mathrm {if} \ x\geq 0\\\ \;\,-x&\mathrm {otherwise} \end{cases}}$ The modulus of a complex number is given by

$|x+iy|={\sqrt {x^{2}+y^{2}}}\$ ## Properties

### Real numbers

For any real number x the absolute value of x is denoted by | x | (a vertical bar on each side of the quantity) and is defined as

$|x|={\begin{cases}x,&{\mbox{if }}x\geq 0\\-x,&{\mbox{if }}x<0.\end{cases}}$ The absolute value of x is always either positive or zero, but never negative. From an analytic geometry point of view, the absolute value of a real number is that number's distance from zero along the real number line. The absolute value of the difference of two real numbers is the distance between them.

In calculus, the absolute value function is differentiable except at 0. It is everywhere continuous.

Compare the norm of a vector.

The square-root notation without sign represents the positive square root. So, it follows that

 $|a|={\sqrt {a^{2}}}$ (1)

which is sometimes used as a definition of absolute value.

The absolute value has the following four main properties:

 $|a|\geq 0$ (2) Non-negativity $|a|=0\iff a=0$ (3) Positive-definiteness $|ab|=|a||b|\,$ (4) Multiplicativeness $|a+b|\leq |a|+|b|$ (5) Subadditivity

Other important properties of the absolute value include:

 $||a||=|a|\,$ (6) Idempotence (the absolute value of the absolute value is the absolute value) $|-a|=|a|\,$ (7) Symmetry $|a-b|=0\iff a=b$ (8) Identity of indiscernibles (equivalent to positive-definiteness) $|a-b|\leq |a-c|+|c-b|$ (9) Triangle inequality (equivalent to subadditivity) $|a/b|=|a|/|b|{\mbox{ (if }}b\neq 0)\,$ (10) Preservation of division (equivalent to multiplicativeness) $|a-b|\geq ||a|-|b||$ (11) (equivalent to subadditivity)

Two other useful properties concerning inequalities are:

$|a|\leq b\iff -b\leq a\leq b$ $|a|\geq b\iff a\leq -b{\mbox{ or }}b\leq a$ These relations may be used to solve inequalities involving absolute values. For example:

 $|x-3|\leq 9$ $\iff -9\leq x-3\leq 9$ $\iff -6\leq x\leq 12$  Diagram showing $|z|$ , the modulus of z.

### Complex numbers

For a complex number $z=x+iy$ , where x is the real part of z and iy is the imaginary part of z,

$|z|=|x+iy|={\sqrt {x^{2}+y^{2}}}\$ 