Absolute Value Function is Convex

Theorem
Let $f: \R \to \R$ be the absolute value function on the real numbers.

Then $f$ is convex.

Proof
Let $x_1, x_2, x_3 \in \R$ such that $x_1 < x_2 < x_3$.

Consider the expressions:
 * $\dfrac {f \left({x_2}\right) - f \left({x_1}\right)} {x_2 - x_1}$
 * $\dfrac {f \left({x_3}\right) - f \left({x_2}\right)} {x_3 - x_2}$

The following cases are investigated:


 * $(1): \quad x_1, x_2, x_3 < 0$:

Then:


 * $(2): \quad x_1, x_2, x_3 > 0$:

Then:


 * $(3): \quad x_1 < 0, x_2, x_3 > 0$:


 * $(4): \quad x_1, x_2 < 0, x_3 > 0$:

Thus for all cases, the condition for $f$ to be convex is fulfilled.

Hence the result.