# Lipschitz continuity of $x \mapsto|x|$ over $\mathbb{R}$

Is $|x|$ Lipschitz continuous? I have started studying Lipschitz continuity. I think it is Lipschitz continuous, if you take the bound M, as per definition as 2. Then it will be Lipschitz continuous at zero. Am I right?

## 2 Answers

You are right.

One may observe that, for any real numbers $x,y$, we have $$||x|-|y||\leq 1\cdot|x-y|,$$ thus $|\cdot|$ is $k$-Lipschitz continuous with $k=1$.

What is Lipschitz continuity? It says that $|f(x)-f(y)| \leq M|x-y|$ for some constant $M$, for all $x,y$.

If $f(x) = |x|$, then we basically have to prove that $||x|-|y|| \leq M|x-y|$ for some constant $M$. This is a known equality and can be proved as follows:

Since $x + (x-y) = y$, we have by the triangle inequality that $|x-y| \geq |y| - |x|$.

Similarly, since $y + (y-x) = x$, we have by the triangle inequality that $|y-x| \geq |x| - |y|$.

The above reduces to $|x-y| \geq ||x|-|y||$. Hence, with $M=1$ the Lipschitz condition is satisfied.

However, $f$ is not differentiable at zero, so the absolute value function provides an important example of a Lipschitz continuous non-differentiable function.