In the previous section, we discussed how functions change, looking at both average and instantaneous rates of change. The average rate of change, calculated over an interval, gives us a general idea, but often we need to know exactly how fast a function is changing at a specific point. Think about your car's speedometer. It doesn't show your average speed for the last hour; it shows your speed right now. This "right now" rate of change is what we're after, and it leads us to the concept of the derivative.
How can we visualize this instantaneous rate of change? Imagine zooming in very, very close to a point on the graph of a function. If the function is smooth (without sharp corners or breaks), the curve will start to look more and more like a straight line. This straight line, which just touches the curve at our single point of interest and has the same direction as the curve at that point, is called the tangent line.
Consider a secant line, which is a line drawn through two points on the curve. The slope of this secant line represents the average rate of change between those two points.
Now, imagine moving one of those points along the curve, getting closer and closer to the other point. As the distance between the two points shrinks, the secant line pivots and gets closer and closer to becoming the tangent line at the fixed point. The slope of the secant line approaches the slope of the tangent line.
The function f(x)=x2 (blue). As the second point of the secant line (orange, red) moves closer to the point at x=1, the slope of the secant line approaches the slope of the tangent line (green dashed) at x=1.
This leads us to the geometric definition of the derivative:
The derivative of a function f(x) at a point x=a is the slope of the tangent line to the graph of f(x) at that point.
Why is slope important? Remember that slope measures steepness, or the rate of change. A steeper slope means a faster change. The slope of the tangent line tells us precisely how fast the function's output y is changing with respect to its input x at that exact instant.
Mathematically, we express this idea of the secant line slope approaching the tangent line slope using limits. If the two points on the secant line are (x,f(x)) and (x+h,f(x+h)), the slope of the secant line is:
Slopesecant=ΔxΔy=(x+h)−xf(x+h)−f(x)=hf(x+h)−f(x)
To find the slope of the tangent line, we take the limit of this expression as the distance h between the points approaches zero:
Slopetangent=f′(x)=limh→0hf(x+h)−f(x)
This limit, if it exists, is the derivative of the function f at the point x. Don't worry too much about calculating limits directly right now. The important takeaway is this visual link: the derivative measures the instantaneous rate of change, and geometrically, this corresponds to the slope of the line tangent to the function's graph at that specific point. This connection is fundamental to understanding how we use derivatives to find optimal solutions in machine learning.
© 2025 ApX Machine Learning