The Difference Quotient

The average rate of change needs two input values. There is a tidy way to write it when the second input is just a little step h past the first.

Start at x. Step forward by h to land at x + h. Using function notation, the average rate of change between those two inputs is the difference quotient:

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

The run is simply h, so the denominator collapses to h. The numerator is the rise: how much the output changed over that step.

It is the slope of a secant

Geometrically, the difference quotient is the slope of the secant line joining \big(x, f(x)\big) to \big(x + h, f(x + h)\big). Slide h and watch the second point move along the curve while the secant tilts to match.

The base point is fixed at x = 1 on f(x) = x^2. As h shrinks, the two points get closer and the secant settles toward a single steepness — a hint of what is coming next.

Simplify it for f(x) = x^2

The real power of the difference quotient is that the algebra often simplifies. Watch what happens with f(x) = x^2. First expand f(x + h) = (x + h)^2 = x^2 + 2xh + h^2, then subtract f(x) = x^2:

\frac{(x^2 + 2xh + h^2) - x^2}{h} = \frac{2xh + h^2}{h}

Now factor an h out of the top and cancel it with the h on the bottom (this is legal as long as h \neq 0):

\frac{h(2x + h)}{h} = 2x + h

The pesky h in the denominator is gone. The whole secant slope is just 2x + h — a clean expression you can read off for any step size.

See the algebra animated

The numerator and denominator change together as the step h plays out. Press play to build the difference quotient for f(x) = x^2 at x = 1.

Watch it explained

Sal Khan finds the slope of a secant line for an arbitrary difference — exactly the difference quotient.