# Isn't the line $y = 0$ a tangent line to $y = |x|$?

It's well known that the derivative of the function $|x|$ is not defined at $x = 0$ because the left and right limits are different. But consider that the tangent line is a line that touches a curve in only one point. Even though the derivative doesn't exist, $y = 0$ meets the requirements of being a tangent line of $|x|$ at $x = 0$, doesn't it? What am i missing on the definition of a derivative as the slope of the tangent line? Is there an extra condition not being considered?

What is the exact definition of the tangent line of a curve in the derivative context?

• There are many lines that pass the test you want. Take $y=\frac 12x$ for example. – lulu Sep 10 '17 at 18:27
• It depends a lot on the definition of "tangent". If touching the curve in only one point is the definition, you have an infinity of tangents. If you define tangent only for differentiable functions, there would be no tangent. There are also other ways of defining a tangent. – Momo Sep 10 '17 at 18:27
• For that matter, every line of the form $y=mx$ (with $m\neq \pm 1$) is a tangent under your definition. If you add the condition that the "tangent" stay on one side of the graph then you get $|m|<1$. – lulu Sep 10 '17 at 18:28
• more common to say it is a support line for $y \geq |x|$ – Will Jagy Sep 10 '17 at 18:29
• Yes $y = 0$ was only an example. Many sources i've read doesn't specify what they mean by tangent line. So if there are tangent lines where the slope is a real number, the definition of derivative as the slope of the tangent line doesn't seem appropriate. I've edited the question. – Victor Hugo Sep 10 '17 at 18:47

Defining the tangent as the line which touches the graph of the function at only one point is insufficient, because, for any given $x_0$, there could be many such lines. For example, if we have $f(x) = x$, the line $y=\frac{1}{2}x$ would be a "tangent" to the graph at $x=0$ under this definition, which is of course absurd.
Furthermore, somewhat counterintuitively, it's not even always true that a tangent line intersects the graph of a function at only one point. For example, if you consider $f(x) = x^2\sin \frac{1}{x}$ with $f(0) = 0$ defined on $\mathbb{R}$, the line $y=0$ is a tangent to the graph of $f$ at $x=0$, but in every neighbourhood of $0$, the line intersects with $f$ countably infinite many times.
The tangent line of $f$ at $x_0$ is better thought of as being the unique line $l(x)$ which intersects the graph of $f$ at the point $(x_0, f(x_0))$ and is locally the best linear approximation to $f$ in the sense that $f(x) - l(x) = o(x-x_0)$. If such a line exists, $f$ is said to be differentiable at $x_0$.
For $f(x)=|x|$, the subgradient is $1$ when $x>0$, $-1$ when $x<0$, and $[-1,1]$ at $x=0$.