Derivative of y = x

Set off walking at a steady one metre per second. After 1 second you've gone 1 metre. After 7 seconds, 7 metres. After 42 seconds, 42 metres. Your distance is the time — the two numbers agree forever, because you are covering exactly one metre for every second that passes. Plot distance against time and you get the tidiest graph in mathematics:

f(x) = x

Whatever goes in comes straight back out — mathematicians call it the identity function, and its graph is the mirror line through the origin at 45^\circ, the line every input can see its own reflection on. It is the function that changes at exactly its own pace: one unit of rise for one unit of run, at every single point.

We've just seen that a flat line — a constant function — has slope 0 everywhere: change the input, and the output doesn't budge. Now let the line tilt to its simplest possible slope. This page proves the second rung of the ladder we're climbing (constant, then x, then x^2, then x^3, then every power at once):

\frac{d}{dx}\bigl[\,x\,\bigr] = 1

It looks almost too small to bother proving. It isn't. Slope 1 is the calibration point for every slope you will ever meet: a curve with derivative 3 is climbing three times as fast as y = x; a derivative of \tfrac12 means half its pace; a derivative of -1 is the same tilt, mirrored downhill. Once you own this line, every other steepness is measured against it.

A line through the origin: y = mx

Before we zoom in on y = x, look at the whole family it belongs to. Any straight line through the origin can be written

y = mx

where m is the slope. Slope is \dfrac{\text{rise}}{\text{run}}: take a run of 1 to the right and the line rises by exactly m, so \dfrac{\text{rise}}{\text{run}} = \dfrac{m}{1} = m — and it's the same at every point on the line. A straight line is the one graph whose steepness never varies: that's what "straight" means. Drag the point along the line, and move the m slider to tilt it: the run stays 1 while the rise tracks m.

Now set m = 1. The line is our y = x: a run of 1 gives a rise of 1, so its slope is exactly 1 — the same at x = 0, at x = 2.5, at x = -1{,}000{,}000. Park the point anywhere you like: the little rise-over-run staircase never changes shape. That constant slope is the derivative we're after. While you're here, try m = 0 too — the line goes flat, and you're looking at the previous lesson's rule from this lesson's point of view.

The proof: drop f(x) = x into the difference quotient

A picture is persuasive, but calculus runs on the difference quotient, so let's earn the rule properly. The recipe never changes: write down f(x+h), subtract f(x), divide by h, and see what happens as h shrinks.

Step 1 — the two ingredients. The identity function makes these embarrassingly easy. The output at x + h is just x + h (whatever goes in comes back out), and the output at x is x:

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

Step 2 — subtract and divide.

\frac{f(x+h) - f(x)}{h} = \frac{(x+h) - x}{h} = \frac{h}{h} = 1.

The x's cancel completely — the starting position doesn't matter, only the step does. And notice the cancellation \tfrac{h}{h} = 1 is perfectly legal: throughout the algebra h is a genuine nonzero step, so we never divided by zero. We only send h \to 0 at the very end.

Step 3 — the limit. Usually this is where the interesting shrinking happens. Here there is nothing left to shrink — the quotient is already the constant 1 for every step size, big or small:

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

That's the geometric fact in algebraic dress: on a straight line, every secant already is the tangent. Take a huge step (h = 100) or a tiny one (h = 0.001) — the line through your two points is the line itself, slope 1 either way. The limit has nothing to do because the answer arrived before the shrinking started.

Two slips catch nearly everyone on this rung of the ladder:

See it together

Here are the function and its derivative on one set of axes. The line f(x) = x (solid) climbs at a steady 45^\circ; its derivative f'(x) = 1 (dashed) is a flat line at height 1, because the slope is the constant 1 everywhere.

Read the pair the way a physicist would: if the solid line is your distance–time graph (walking at one metre per second), the dashed line is your speedometer — pinned at 1 for the whole journey. Compare it with the previous rung: a constant function's derivative was the flat line at height 0; the identity's derivative is the flat line at height 1. In both cases a straight graph produces a flat derivative — steepness that never changes. The first curve whose derivative actually varies is waiting on the next rung, y = x^2.

Slide it up: the derivative of x + c

Now combine today's rule with the last one. What is the derivative of f(x) = x + 5? Think about the walk again — but this time you start with a 5-metre head start. After t seconds you're at t + 5 metres. You're always five metres ahead of before, but your speed hasn't changed at all: still one metre per second. A head start changes where you are, never how fast you're going.

The difference quotient agrees — the constant rides along and cancels itself out:

\frac{f(x+h) - f(x)}{h} = \frac{\bigl[(x+h) + 5\bigr] - \bigl[x + 5\bigr]}{h} = \frac{h}{h} = 1.

The 5's met each other in the subtraction and vanished, exactly as the x's did. And nothing about the argument used the number 5 — any constant c would have cancelled the same way:

\frac{d}{dx}\bigl[\,x + c\,\bigr] = 1 \quad \text{for every constant } c.

Geometrically, adding c just slides the whole line straight up (or down, if c is negative) without tilting it — the three lines below are perfectly parallel, so they share the slope 1. An infinite family of different functions, one and the same derivative.

Functions of the form y = mx are everywhere, because they are the conversions: seconds to minutes, pounds to pence, kilometres to miles. "Multiply by 60" turns minutes into seconds — s = 60m — and that 60 is the slope: every extra minute costs exactly 60 extra seconds, no matter how many minutes you already have. A conversion is a function whose derivative is the exchange rate, constant everywhere.

And the identity y = x? It's the conversion that converts nothing: metres to metres, at a rate of 1. That sounds useless, but "do-nothing" elements are quietly load-bearing all over mathematics. The number 1 is the do-nothing of multiplication (1 \times a = a); 0 is the do-nothing of addition; the identity function is the do-nothing of function machines — feed anything through, get it back unchanged. Whole branches of modern mathematics (group theory, linear algebra, category theory) begin by demanding: first, show me your do-nothing element. So it's rather satisfying that the do-nothing function's derivative is 1 — the do-nothing number. Do-nothing in, do-nothing out.

Worked examples, start to finish

Example 1 — a slope at a named point. Find the gradient of y = x at x = 137. No computation needed once you own the rule: f'(x) = 1 for all x, so f'(137) = 1. The whole point of a rule is that the once-and-for-all proof replaces a fresh limit calculation at every point.

Example 2 — a shifted line. Find \dfrac{dy}{dx} for y = x - 12. This is x + c with c = -12: the line y = x slid down 12, still tilted at 45^\circ. Answer: \dfrac{dy}{dx} = 1.

Example 3 — the tangent line. Write the equation of the tangent to y = x at the point (3, 3). The tangent has slope f'(3) = 1 and passes through (3,3), so it is y - 3 = 1 \cdot (x - 3), i.e. y = xthe line itself. Of course: a straight line is its own tangent, at every one of its points. That's the cleanest possible check that the tangent-line machinery is working.

Example 4 — a reading question. A lift rises so that its height in metres equals the time in seconds since it started: h(t) = t. How fast is it rising at t = 30? The rate of change of t with respect to t is h'(t) = 1, so it's rising at 1 metre per second — at t = 30, at t = 3, and at every other moment of the trip.