Why a Linear Function Is a Useful First Example
A derivative describes how a function changes near an input. The limit definition can involve substantial algebra for some functions, but a linear function makes the central idea especially clear: its rate of change is already the same over every interval. We can verify this directly, without relying only on that geometric observation.
In this tutorial, a linear function has the form \(f(x)=mx+b\), where \(m\) and \(b\) are fixed real numbers. The number \(m\) is the slope, and \(b\) is the vertical intercept. We will calculate the difference quotient at an arbitrary input and take its limit.
The Derivative from the Limit Definition
For a function \(f\), its derivative at an input \(a\), if the limit exists, is defined by the limit of the difference quotient. In the \(h\)-form, the input changes from \(a\) to \(a+h\), where \(h\) is nonzero while the quotient is formed.
The derivative definition is not the same as substituting \(h=0\) into the quotient. At \(h=0\), the denominator would be zero, so the quotient would not be defined. Instead, we simplify the quotient for \(h\ne 0\), then determine its limit as \(h\) approaches zero.
Deriving the Derivative of \(f(x)=mx+b\)
Let \(a\) be any real input. Since \(f(x)=mx+b\), evaluate the function at \(a+h\) and at \(a\):
Substitute these expressions into the difference quotient. In the simplification, the terms \(ma\) and \(b\) cancel, leaving a factor of \(h\) in the numerator. Because the quotient is being formed for \(h\ne 0\), that factor can be canceled.
This calculation shows more than just what happens near zero: for every nonzero \(h\), the difference quotient is exactly \(m\). Therefore, as \(h\) approaches zero, the quotient remains equal to \(m\), and its limit is \(m\).
For completeness, the limit claim can be checked directly. Given any \(\varepsilon>0\), choose \(\delta=1\). Whenever \(0<|h|<\delta\), the simplified quotient \(Q(h)\) equals \(m\), so \(|Q(h)-m|=0<\varepsilon\). This is precisely the condition that \(Q(h)\) tends to \(m\) as \(h\) tends to zero. The result holds for every real \(a\), so the derivative value is the same at every input.
The proof also explains why \(b\) does not affect the derivative: the same \(b\) appears in both function values and cancels in their difference. The slope \(m\), by contrast, is the coefficient that remains after the changing input contributes the factor \(h\).
Worked Examples
Worked Example: A Positive Slope at a Specific Input
Find the derivative of \(f(x)=3x+2\) at \(a=4\) using the limit definition.
First calculate the two function values in the difference quotient:
For \(h\ne0\), substitute and simplify:
Taking the limit as \(h\to0\) gives \(f'(4)=3\). To check the calculation, the quotient equals \(3\) for every nonzero \(h\), so its limit is indeed \(3\). This agrees with the function’s slope.
Worked Example: A Negative Slope at a Negative Input
Find \(f'(-1)\) for \(f(x)=-2x+5\) from the limit definition.
Evaluate the function at the two required inputs:
Now form the quotient, keeping \(h\ne0\):
Thus \(f'(-1)=\displaystyle\lim_{h\to0}(-2)=-2\). The check is direct: the quotient is \(-2\) for every allowed increment, so the limit is \(-2\), including when the input \(a\) is negative.
Worked Example: Finding the Derivative at an Arbitrary Input
For \(f(x)=\frac{1}{2}x-3\), find the derivative at an arbitrary real input \(c\). This example uses the \(x\)-to-\(a\) form, in which the nearby input is \(x\) and \(x\ne c\) while the quotient is formed.
First evaluate the function at \(x\) and \(c\):
Subtract and factor the numerator before dividing:
As \(x\to c\), the quotient remains \(\frac{1}{2}\), so \(f'(c)=\frac{1}{2}\) for every real \(c\). To check, the quotient equals \(\frac{1}{2}\) at every allowed \(x\), and therefore its limit is \(\frac{1}{2}\). The constant \(-3\) cancels when the function values are subtracted.
How the Two Quotient Forms Express the Same Change
The \(h\)-form compares \(f(a+h)\) with \(f(a)\). The \(x\)-to-\(a\) form compares \(f(x)\) with \(f(a)\), with \(x\ne a\). They describe the same difference quotient under the substitution \(x=a+h\), or \(h=x-a\). As \(h\to0\), the corresponding input \(x=a+h\) approaches \(a\).
For a linear function, both forms reduce to \(m\). In the \(x\)-to-\(a\) form, the calculation for any \(a\) is:
Because this quotient is constant for every \(x\ne a\), its limit as \(x\to a\) is \(m\). This provides the same derivative result using the other common form of the limit definition.
A Common Mistake: Setting the Increment to Zero Too Soon
A tempting but invalid calculation is to put \(h=0\) in the original quotient. For example, for \(f(x)=3x+2\) at \(a=4\), the quotient is \(\frac{3h}{h}\). Substituting \(h=0\) before simplifying gives \(\frac{0}{0}\), which is undefined. It does not give the derivative, and it does not mean that the limit fails to exist.
The correction is to remember that the quotient is defined for \(h\ne0\). For those values, \(\frac{3h}{h}=3\). Only after simplifying do we take the limit, obtaining \(\displaystyle\lim_{h\to0}3=3\). Canceling \(h\) is valid here because the calculation is made for nonzero \(h\), not because \(h\) has been set equal to zero.
A second useful check is to keep track of what each term does. The constant term cancels; the slope coefficient remains. If a calculation leaves \(b\) in the final derivative, or makes the result depend on the input \(a\), revisit the subtraction and simplification.
Why the Result Matters
This direct calculation connects the limit definition to a familiar property of straight lines. Every secant line between two distinct points on the graph of \(f(x)=mx+b\) has slope \(m\): for inputs \(x_1\ne x_2\), the change in output is \(m(x_2-x_1)\), and dividing by the input change gives \(m\). The limit calculation confirms that the instantaneous rate at any input is that same value.
The result also gives a simple way to check a derivative calculation. If the function is of the form \(mx+b\), its derivative at every input must be \(m\). This conclusion comes from the definition itself, not from a shortcut rule: the worked algebra shows exactly why the limit exists and what it equals.
Check Your Understanding
Use the limit definition where requested, and keep the increment nonzero until after simplifying the quotient.
- For \(f(x)=5x-1\), write and simplify the \(h\)-form difference quotient at an arbitrary input \(a\). What is \(f'(a)\)?
- Use the limit definition to find \(g'(2)\) when \(g(x)=-4x+7\).
- For \(q(x)=\frac{3}{2}x+6\), simplify \(\frac{q(x)-q(c)}{x-c}\) for \(x\ne c\). What does its limit as \(x\to c\) equal?
- Why is substituting \(h=0\) into the original difference quotient not a valid way to evaluate the derivative?
- In the calculation for \(f(x)=mx+b\), which term cancels, and which coefficient remains in the derivative?