How to check for convexity of function that is not everywhere differentiable? I have a question. I have just been introduced to the subject of convex sets and convex functions. 
I read this in wikipedia that a practical test for convexity is - 
to check whether the 2nd derivative (Hessian matrix) of a continuous differentiable function in the interior of the convex set is non-negative (positive semi-definite).
So how to check for the convexity of functions like $f(x)=|x|$ which is differentiable at all points except at $x=0$ which coincidentally is actually its global minimum?
Thanks all for answering.

It suffices to write $f$ as the pointwise supremum of some family of affine functions, here $f=\sup\{g,h\}$ with $g:x\mapsto x$ and $h:x\mapsto-x$, since every such supremum defines a convex function and every convex function can be written as such a supremum.
