Absolute value (source code)

= Absolute value
{title2=$|x|$}
{wiki}

= Absolute value function
{synonym}

The absolute value function is convex by the triangle inequality:
$$
|tx+(1-t)y|\leq t|x|+(1-t)|y|.
$$

For a real number $x$, its <absolute value> is $x$ when $x\geq0$ and $-x$ otherwise; for a complex number $z$, it is the nonnegative magnitude $\sqrt{z\overline z}$.