Derivative of |x|
The derivative of |x|, the absolute value of x is x/|x|, and none at 0, by the piecewise definition. Not differentiable at x = 0.
📐 The piecewise definition
|x| = x for x ≥ 0 and −x for x < 0, so differentiate each piece.
d/dx |x| = x/|x| (1 for x > 0, −1 for x < 0; undefined at 0).
✍️ Differentiating |x|
- For x > 0, |x| = x, so the derivative is 1.
- For x < 0, |x| = −x, so the derivative is −1.
- At x = 0 the left-hand slope is −1 and the right-hand slope is +1; they disagree, so |x| has no derivative at 0.
- In one formula: d/dx |x| = x/|x| = |x|/x for x ≠ 0 (the sign of x).
🔍 Where the rule comes from
A function is differentiable at a point only if the graph has one tangent there; the V-shape of |x| at the origin has two. In general d/dx |u| = (u/|u|)·u′, which is how |x2 − 1| or |sin x| are differentiated away from their corners.
📍 The slope of |x| at a point, and the tangent line
f′(a) is the slope of the graph at x = a, and the tangent line there is y = f′(a)(x − a) + f(a). Values to four decimal places; the calculator below gives any other point.
| Point | |x| | f′(x) | Tangent line |
|---|---|---|---|
| x = −2 | 2 | −1 | y = −x |
| x = −1 | 1 | −1 | y = −x |
| x = −0.5 | 0.5 | −1 | y = −x |
| x = 0.5 | 0.5 | 1 | y = x |
| x = 1 | 1 | 1 | y = x |
| x = 2 | 2 | 1 | y = x |
| x = 3 | 3 | 1 | y = x |
👪 Rules and special cases: the derivatives side by side
The same rule, or the same trap, runs through the whole family; each row has its own worked page.
⚠️ The mistakes that lose the marks
- Writing 1 for every x: the derivative is −1 on the negative side.
- Claiming a derivative at x = 0: there is none.
🧮 Calculator
The answer appears here, with the working in words.
✏️ Five questions, answers hidden
1. Differentiate |x| at x = −3.
Answer: −1
2. Differentiate |2x|.
Answer: 2x/|2x| = 2·sign(x)
3. Differentiate |x − 1|.
Answer: (x − 1)/|x − 1|, undefined at x = 1
4. Differentiate x|x|.
Answer: 2|x|
5. Differentiate |x^2 − 4|.
Answer: 2x·(x^2 − 4)/|x^2 − 4|, undefined at x = ±2
📚 The class this belongs to
Derivatives are taught in AP Calculus AB and BC and in Calculus 1 in the US (the power, product, quotient and chain rules, trigonometric, exponential and logarithmic derivatives, implicit differentiation), in A-level Maths (Year 12 and 13, Pure) in the UK, in IB Mathematics Analysis and Approaches (Topic 5), in Class 11 and 12 in CBSE (NCERT Limits and Derivatives, Continuity and Differentiability) and in Mathematical Methods (Units 3 and 4) and Specialist Mathematics in Australia.
If this page is the homework and the method is not sticking, that is what a 1-on-1 class fixes: one tutor with a master's degree, one child, on a shared whiteboard, in your time zone, about US$10 to $13 an hour. How 1-on-1 online tutoring works.
