Differentiating Linear Functions

A straight line has one gradient everywhere.

One gradient everywhere

The line y = 3x + 1 passes through (0, 1), (1, 4), (2, 7) and (4, 13). From (0, 1) to (1, 4) it rises 3 over a run of 1. From (2, 7) to (4, 13) it rises 6 over a run of 2, and 6 ÷ 2 = 3 again. Any two points of the line give a gradient of 3.

On a curve, the chords through a point change their gradient as they shrink, and the derivative is where they settle. On a straight line every chord lies along the line itself, so every chord has gradient 3, however short. There is nothing to settle: the gradient at every point is 3.

xy1326

The line y = 3x + 1. A run of 1 from (0, 1) gives a rise of 3, and a run of 2 from (2, 7) gives a rise of 6. Both make a gradient of 3.

First principles on y = mx + c

For f(x) = mx + c, the rise over a step h is f(x + h) − f(x) = m(x + h) + c − (mx + c) = mh. The c cancels, and dividing by h gives exactly m. No h is left, so the limit as h tends to 0 is m. The derivative of mx + c is m, the same number at every x.

So y = 3x + 1 has derivative 3, y = −2x + 5 has derivative −2, and y = x has derivative 1. Read m off the line however it is written: y = 7 − 4x is −4x + 7, so its derivative is −4, and y = x/2 − 3 is 0.5x − 3, so its derivative is 0.5.

The constant lifts the line

Compare y = 3x + 1 with y = 3x + 6. At every x the second is 5 higher than the first: at x = 2 the heights are 7 and 12. One line is the other lifted straight up by 5, so the two are parallel, and both have gradient 3.

That is why the constant c plays no part in the derivative. It sets where the line crosses the y-axis, not how steeply it climbs, and in f(x + h) − f(x) it cancels.

xyy = 3x + 1y = 3x + 65

The lines y = 3x + 1 and y = 3x + 6. At x = 2 they are 5 apart, and they are 5 apart at every x: the same line lifted by 5, with the same gradient 3.

A flat line

The line y = 6 is level: every point on it has height 6. From (1, 6) to (4, 6) the run is 3 and the rise is 0, so the gradient is 0 ÷ 3 = 0. It is the line y = mx + c with m = 0 and c = 6, so its derivative is 0.

So the derivative of a constant is 0. From first principles, f(x + h) − f(x) = 6 − 6 = 0, and 0 / h = 0 for every h that is not 0. A constant does not change, so its rate of change is 0.

xyy = 6run 3, rise 0

The level line y = 6. A run of 3 from (1, 6) to (4, 6) has a rise of 0, so the gradient is 0 at every point.

A steady rate

A straight-line graph is a quantity changing at a steady rate. A candle 20 centimeters tall burns down 1.5 centimeters an hour, so after t hours its height is H = 20 − 1.5t centimeters. Its derivative is dH/dt = −1.5: the height falls 1.5 centimeters an hour, at the start, after 4 hours and at every other time.

The 20 is the starting height. A candle 25 centimeters tall burning at the same rate has H = 25 − 1.5t and the same dH/dt = −1.5.

The usual mistakes

Adding the constant into the gradient: answering 4 for y = 3x + 1. The + 1 lifts the line and never tilts it, so the derivative is 3.

Keeping the x: answering 3x. The gradient of a straight line is one fixed number, the same at every point.

Giving the constant as its own derivative: answering 6 for y = 6. A level line has gradient 0.

Answering 0 for y = x. The line y = x climbs 1 for every 1 across, so its derivative is 1.

Reading the first number as m. In y = 7 − 4x the gradient is −4, not 7.

Practice Differentiating Linear Functions in the app