Why is $|x|$ not differentiable at $x=0$? The definition of a derivative is the slope of a function tangent to a point. It is also defined as $$\lim_{h\to0} \frac{f(x+h)-f(x)}{h}$$
If we apply this to $f(x)= |x|$, we get that it is $\lim\limits_{h\to 0} \dfrac{|h|}{h}$, which is undefined. However, if we look at the graph of $|x|$, we see that there can exist a tangent line at x=0, with slope 0. So why is the derivative undefined instead of 0?
 A: Let $f(x) = |x|$. For $x > 0$, the gradient is $1$, whereas for $x < 0$, the gradient is $-1$. At $x = 0$, you have infinitely many lines,  which are represented by the subgradient $[-1,1]$.
A: The following expressions could all be "tangent" lines of $|x|$ at $x=0$ if one were to use a naive definition of tangent:
\begin{align}
y_1(x) &= \frac12x\\
y_2(x) &= 0\\
y_3(x) &= -\frac13x
\end{align}
since they all have exactly the point $(0,0)$ in common with $|x|$. So the derivative of $|x|$ at $x=0$ should be $1/2$, $0$, and $-1/3$?
A tangent line only really makes sense as a limit of secant lines which you see by your limit does not make sense for $|x|$ at $x=0$.
By the way, the weak derivative of $|x|$ is actually the function you described, which is $-1$ when $x<0$, $0$ when $x=0$, and $1$ when $x>0$.
A: Consider $f(x)=x$ and $f(x)=-x$ separately. Clearly the equation of the derivative has a discontinuity at $x=0$. 
A: $f(x)=|x|=\begin{cases}
x \text{ if } x>0\\
0 \text{ if } x=0\\
-x \text{ if } x<0
\end{cases}$
$\lim_{x\to 0^-}\frac{|x|}{x}=\lim_{x\to 0^-}=\frac{-x}{x}=-1$ but similarly if we check the right hand limit, we see that we get $\lim_{x\to 0^+}\frac{|x|}{x}=1$, and since $1\neq -1$, we don't have have a derivative at the point $x=0$.
A: What does "tangent line" mean? Intuitively, it means a line that provides a good linear approximation to the function near that point. More precisely, suppose $f: \mathbb{R} \to \mathbb{R}$ is a function, $L: \mathbb{R} \to \mathbb{R}$ is a function whose graph is a line, and $p \in \mathbb{R}$ is a point. We say "$L$ is tangent to $f$ at $p$" if and only if, as $x \to p$, we have
$$
f(x) = L(x) + o(x - p).
$$
In other words, the difference between $f(x)$ and $L(x)$ shrinks faster than linearly as $x$ approaches $p$. (One can check that this is equivalent to the usual definition of derivative; however, this formulation also generalizes more readily to higher dimensions.)
The reason $f(x) = \lvert x \rvert$ has no tangent line at $x = 0$ is that there is no such "good linear approximation". For example, consider the line $L(x) = 0$ with slope zero: we have $f(x) - L(x) = \lvert x \rvert$, which shrinks linearly as $x$ approaches zero. Similarly, if we chose $L(x) = -x$, then we'd have $f(x) - L(x) = \lvert x \rvert + x$, which is equal to $2x$, a linear function, for $x > 0$.
A: If you draw the graph of the equation, you will get a v-shaped configuration with the vertex located at x=0, y=0.
If you try to put a tangent at that vertex point, you will see that the line can take on one of innumerable slopes and still be "touching at one point". It's undefined.
