Strictly speaking, the derivative is the rate of change of a function, process or pattern.
So far, to calculate the gradient of a given function we always computed the change in the y coordinates divided by the change in the x coordinates. This gives the rate of change from a point A to a point B. However, if we require the rate of change at a specific point, our current method no longer works and has to be amended.
What we do is we introduce the concept of the limit. We introduce a step length called dx, and claim that a step length of the limit of dx tending towards 0 from point A will be a very small increase. Therefore, if we define point B to be at (f(x+dx),x+dx), the gradient function will be calculated as follows:
lim dx->0 (f(x+dx)-f(x))/(dx)
This is basically calculating the gradient of the function at point A, and is the formal definition of the derivative of a function i.e the rate of change/ gradient/slop at a specific instance.