Derivative of a Constant

Look at the speedometer of a parked car. The car's position is a perfectly good function of time — at 3 pm it's outside your house, at 4 pm it's outside your house, at midnight it's still outside your house — and the needle reads exactly 0 the entire time. Position isn't changing, so the rate of change of position is zero. Not "roughly zero", not "too small to measure" — zero.

The world is full of quantities like this. A shelf bolted to the wall: its height above the floor is the same at breakfast as at bedtime, so its height changes at a rate of 0 metres per hour. Your adult height: the growth chart that shot upward through childhood has gone flat, and "flat" means the growth rate is zero. The number of sides of a triangle, this year and next year: three, changing at a rate of zero triangles-sides per year.

Today we start building the toolkit of derivative rules — the shortcuts that let you differentiate without grinding through a limit every time — and we start with the simplest rule there is. A constant function returns the same number no matter what you feed it,

f(x) = c,

and since nothing about its output ever changes, the question a derivative asks — how fast is the output changing? — has the easiest possible answer: it isn't. Its derivative is 0, everywhere. This page makes that claim precise, proves it honestly from the limit definition, and shows you the two classic traps hiding inside such an innocent-looking fact.

Read it off the graph: a flat line has slope zero

The graph of f(x) = c is a horizontal line at height c — every input, same output. And the derivative at a point is the slope of the graph at that point: rise over run for the tangent line. Walk along a flat road and you climb nothing — a rise of 0 over any run, so

\text{slope} = \frac{\text{rise}}{\text{run}} = \frac{0}{\text{run}} = 0.

Notice something a flat line does that almost no other graph does: the tangent line at any point is the line itself. Usually a tangent kisses the curve at one point and peels away; here the "curve" already is a straight line, so its tangent lies exactly on top of it — a horizontal line of slope 0, at every single x.

Try it below. The first slider moves the whole line up and down (changing c); the second drags a point along the line, with a short tangent segment riding along. Two things never change, no matter what you do: the tangent stays flat, and the readout stays \text{slope} = 0. Even at c = 0, where the line lies on the axis itself, the story is the same.

The height of the line is irrelevant to its slope. y = 100 is no steeper than y = 1 — a high shelf is just as flat as a low one. That's the whole rule, seen geometrically: the derivative of a constant doesn't depend on which constant.

Proving it: the tamest limit in calculus

Pictures persuade; proofs settle. When you computed the derivative at a point from the definition, the difference quotient always began life as a \tfrac{0}{0} disguise, and you had to expand and cancel before the limit would talk. Watch how differently a constant behaves. Take f(x) = c and run the definition, step by step.

Step 1 — the two ingredients. A constant function ignores its input, so stepping from x to x + h changes nothing:

f(x + h) = c, \qquad f(x) = c.

Step 2 — the difference quotient. Subtract and divide by the step h:

\frac{f(x+h) - f(x)}{h} = \frac{c - c}{h} = \frac{0}{h} = 0 \quad \text{for every } h \neq 0.

Pause on that last equality, because this is where the constant rule differs from every harder derivative you'll meet. The numerator is exactly zero for every honest nonzero step — a step of h = 5, of 0.001, of -1{,}000{,}000. And zero divided by any nonzero number is just 0. There is no \tfrac{0}{0} drama here, nothing to expand, nothing to cancel: the quotient is the constant 0 before the limit even enters the room.

Step 3 — the limit. The limit of something that is already stuck at 0 is, unsurprisingly, 0:

f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} = \lim_{h \to 0} 0 = 0.

And notice what we never used: the value of c, or the value of x. The proof works for every constant at every point in one stroke. That's our first rule, and it deserves its formal statement:

Average rate of change over any interval: zero. Instantaneous rate at any point: zero. It is the one derivative where the average and the instantaneous story agree perfectly at every scale — because nothing ever happened at any scale.

Spot the constant

The rule is easy; recognising when it applies is where the marks are won and lost. A constant is any expression whose value doesn't depend on x — and constants love to dress up as something more exotic. The test is always the same: is there an x anywhere in it? If not, it's a number in costume, and its derivative is 0.

Run the test on this line-up:

One more disguise worth naming: a letter can be a constant. In f(x) = c, or "the line y = k", or "for a fixed number a", the letters c, k, a stand for numbers that are held still while x varies. Only the variable of differentiation — the x in \tfrac{d}{dx} — gets to move. Everything else is furniture.

Two traps, both sprung on almost every calculus class:

A function and its derivative, side by side

Here is the rule as a single picture. The solid line is the constant function f(x) = 2, holding its height. The dashed line is its derivative f'(x) = 0 — and being zero everywhere, it lies flat along the x-axis. Two horizontal lines: the function flat at its own height, the derivative flat at zero.

This "graph the function, then graph its derivative underneath" habit is worth forming now, while the pictures are easy — every later rule has such a portrait, and they get much more interesting. Note the asymmetry, too: the function's height matters (f(x) = 5 would draw its solid line higher), but the derivative's line would not move a hair. Every constant function on Earth shares the identical derivative portrait: the x-axis itself.

Here's a strange consequence of today's innocent little rule. Differentiate these three different functions:

\frac{d}{dx}\left[x^2\right] = 2x, \qquad \frac{d}{dx}\left[x^2 + 5\right] = 2x + 0 = 2x, \qquad \frac{d}{dx}\left[x^2 - 3\right] = 2x.

Three different functions — one identical derivative. The added constant contributes exactly 0, so differentiation wipes it out without a trace. Graphically it's obvious why: adding a constant slides the whole curve straight up or down, and sliding a curve vertically doesn't tilt it — the slope at each x is untouched. All three parabolas below are exactly equally steep at every x:

Now flip the question around, the way calculus eventually will. Suppose all you know is that some mystery function has derivative 2x — can you recover the function? Not quite. It might be x^2, or x^2 + 5, or x^2 - 3, or x^2 plus any constant whatsoever. Differentiation is lossy: the constant is the one piece of information it destroys, so no amount of cleverness can rebuild it from the derivative alone.

That is why, when you later run derivatives in reverse — the indefinite integral — every answer must end with a mysterious "+\,C": \int 2x\,dx = x^2 + C. That famous +\,C isn't bureaucratic fussiness. It's an honest confession that a constant was murdered on the way here, and by today's rule the crime is untraceable — so we name the unknown victim C and move on.

The first rung of the ladder

You now own one derivative fact outright, proved from the definition with no hand-waving:

\frac{d}{dx}\bigl[\,c\,\bigr] = 0.

It looks small, but it's the base camp for everything that follows. The plan is to climb one power at a time — next comes the derivative of x itself, then x^2, then x^3 — each proved the same honest way, until the pattern practically shouts its own general formula: the power rule. Keep a running table as you climb; today it has one proud row in it:

\begin{array}{c|c} f(x) & f'(x) \\ \hline c & 0 \end{array}

And whenever the later rules get heavy, remember the moral of this one: a derivative only cares about change. Whatever refuses to change — however grand its symbols — contributes exactly nothing.