This applet lets you investigate the gradient of a straight line,
or gradient of the tangent at a point on a curve of a function.
The rate of change of y with respect to x between two points
is the change in y divided by the change in x ie. [math]\frac{Change\;in\;y}{Change\;in\;x}[/math]
For the straight line you will note that the gradient is constant throughout the line, between points P & Q.
For the curve, gradient of a point C between points P & Q changes (vary) as the point C is moved.
The "average gradient" is the gradient of a straight line joining P & Q.
The instantaneous rate of change at P, is the gradient (rate of change)at which the change in x is made very very small
(ie by moving point Q towards P)