Rate of change

The green line is the line that connects two points of the red graph g(x), which is call secant. Drag point B nearer to point A to view the slope of the line AB, . You will find that as B is getting nearer and nearer to A, the green line is approaching the purple line, , which is the tangent of point A. Thus, the slope of secant is about the slope of tangent as the two points get closer.