Why Start with a Linear Function?
A linear function has a constant slope: equal changes in the input produce equal changes in the output. The derivative is defined through a limit of nearby secant slopes, so a line provides a direct setting in which to see how that definition works. In particular, the calculation shows that the derivative at a point is the line’s slope and does not depend on which point is chosen.
We will derive this result from the difference quotient, rather than assume a differentiation rule. The only function considered here is \(f(x)=mx+b\), where \(m\) and \(b\) are real constants.
The Derivative at a Point
For a function \(f\), the derivative at \(x=a\), when it exists, is the limit of the difference quotient as a nonzero increment \(h\) approaches zero:
The quotient compares the change in function value, \(f(a+h)-f(a)\), with the change in input, \(h\). It is the slope of the secant line through the points on the graph with inputs \(a\) and \(a+h\). The derivative is the limit of those slopes as the second input approaches \(a\).
The condition \(h\ne 0\) matters: before taking the limit, the quotient is defined only for nonzero increments. We simplify it for such \(h\), then determine its limit as \(h\to 0\).
Deriving the Derivative of a Linear Function
Let \(f(x)=mx+b\), with \(m,b\in\mathbb R\), and choose any point \(a\in\mathbb R\). Since this function is defined for every real input, both \(a\) and \(a+h\) are in its domain for every real \(h\). For \(h\ne 0\), substitute the function into the difference quotient:
The cancellation of \(h\) in the last step is valid because the difference quotient is being evaluated for \(h\ne 0\). The quotient is therefore exactly \(m\) for every nonzero \(h\). Its limit as \(h\) approaches zero is also \(m\).
This conclusion comes from the calculation itself. The terms \(ma\) cancel because both function values use the same base input \(a\), and the terms \(b\) cancel because the same constant is added to both values. The remaining change in output is \(mh\). Dividing by the input change \(h\) leaves \(m\).
Worked Examples
Worked Example: A Line with Positive Slope
Find the derivative of \(f(x)=4x-7\) at \(a=3\) from the definition. Here \(m=4\), \(b=-7\), and \(a=3\).
First evaluate the function at the two inputs in the quotient:
For \(h\ne 0\), form and simplify the difference quotient:
Because the quotient equals \(4\) for every nonzero \(h\), its limit as \(h\to 0\) is \(4\). Thus \(f'(3)=4\). Checking against the quotient, the proposed derivative is precisely its constant value, so taking the limit gives the same answer.
Worked Example: A Line with Negative Slope
Find the derivative of \(g(x)=-2x+5\) at \(a=-1\) from the definition. Here \(m=-2\), \(b=5\), and \(a=-1\).
Compute each function value, keeping the parentheses around the negative input:
For \(h\ne 0\), the quotient becomes
The quotient is \(-2\) for every nonzero \(h\), so \(\lim_{h\to 0}\frac{g(-1+h)-g(-1)}{h}=-2\). Therefore \(g'(-1)=-2\). As a check, the computed quotient itself is constant at \(-2\), confirming that its limit has that value.
Worked Example: A Constant Function
A constant function is included in the form \(f(x)=mx+b\) by taking \(m=0\). Find the derivative of \(q(x)=6\) at an arbitrary point \(a\in\mathbb R\). For this function, \(q(a+h)=6\) and \(q(a)=6\).
For \(h\ne 0\), the difference quotient is
The quotient is zero for every nonzero \(h\), and therefore its limit as \(h\to 0\) is zero. Thus \(q'(a)=0\) for every real \(a\). Checking the result directly, the function has no change in output between \(a\) and \(a+h\), so its difference quotient is indeed zero.
Why the Derivative Does Not Depend on the Point
In the general derivation, \(a\) was not assigned a particular value. It represented any real point. After substitution, the base-point terms \(ma\) and \(-ma\) cancel, leaving a quotient that contains neither \(a\) nor \(b\). Since the resulting quotient is \(m\) for every allowed increment, its limit is \(m\) at every point.
There is also a direct interpretation in terms of changes. Starting at any input \(a\), moving to \(a+h\) changes the function value by
The output change is \(m\) times the input change. Thus the ratio of output change to input change is \(m\), regardless of the starting point. The intercept \(b\) shifts every function value by the same amount and so contributes nothing to a difference of function values.
For the graph of a linear function, this agrees with its geometric meaning: the slope of every secant through two distinct points on the line is \(m\). As the second point approaches the first, the secant slope stays \(m\), so the limiting tangent slope is \(m\) as well. The difference-quotient calculation establishes this without needing to infer it from a drawing.
A Common Mistake: Substituting Zero Too Soon
A tempting but incorrect approach is to set \(h=0\) immediately in the difference quotient. For example, at a point \(a\) for \(f(x)=3x+2\), this gives
It is incorrect to conclude from this calculation that the derivative does not exist. The difference quotient is defined for \(h\ne 0\), and the derivative asks for the limit of those quotient values as \(h\) approaches zero. The value \(h=0\) is not substituted into the quotient.
Instead, simplify while \(h\ne 0\):
Now the limit is immediate: the quotient equals \(3\) for every nonzero \(h\), so its limit as \(h\to 0\) is \(3\). The correction is to simplify the quotient on its domain before taking the limit, not to evaluate the original quotient at the excluded value.
When This Result Applies
The conclusion depends on the function having the form \(f(x)=mx+b\), with fixed real constants \(m\) and \(b\), and on evaluating at a real point in its domain. Here the domain is all of \(\mathbb R\), so the difference quotient is available for every nonzero real \(h\). The proof does not establish a formula for other kinds of functions; their difference quotients may require different simplifications and separate limit arguments.
For a line, the derivative at every point is its slope. This gives a basic reference case for interpreting the derivative as a local rate of change: a constant rate produces a constant derivative. The role of the definition remains essential, because it shows exactly why the rate is constant and why neither the chosen point nor a vertical shift changes it.
Check Your Understanding
Use the definition of the derivative to reason through these questions.
- For \(f(x)=7x-4\), write the difference quotient at \(x=a\) and simplify it for \(h\ne 0\).
- For \(g(x)=-5x+1\), what is the derivative at \(a=2\)? Show which terms cancel in the quotient.
- Why is it valid to cancel \(h\) in the difference quotient, and why is it not valid to set \(h=0\) first?
- In the derivation for \(f(x)=mx+b\), identify separately why the terms involving \(a\) and the terms involving \(b\) disappear.
- What does the calculation imply about the derivative of a constant function, viewed as a linear function with \(m=0\)?