Derivative of a Constant
Let's start the simplest place there is. A constant function always
returns the same number, no matter what you put in:
f(x) = c
Its graph is a perfectly flat horizontal line at height
c. Nothing about the output changes as
x moves — so the question we always ask of a
derivative,
how fast is the output changing?, has an easy answer here: it isn't.
A flat line has slope zero
The derivative measures slope — the steepness of the curve at a point.
Walk along a flat road and you climb nothing: rise 0 over any
run. So the slope of f(x) = c is 0
everywhere. Drag the point along the line below and read its slope off live — it
never budges from zero.
The same answer from the difference quotient
We can prove it instead of just seeing it. The
difference quotient
measures the average rate of change over a tiny step h:
\frac{f(x+h) - f(x)}{h} = \frac{c - c}{h} = \frac{0}{h} = 0
Both outputs are the same constant c, so the top is
c - c = 0. The ratio is 0 before we
even shrink h, so the limit is 0 too.
That gives our very first rule:
\frac{d}{dx}\bigl[\,c\,\bigr] = 0
See it together
On the left is the constant function f(x) = 2; on the right its
derivative f'(x) = 0. The function sits at a fixed height, and
its slope is flat on the axis — zero at every input.