Slope and Derivative

Line can be used to represent all sorts of information, in math we often use line to show the rate at which the amount is changing.

Lets go ahead and explore the idea:

Suppose, you would like to invest in something where your could get better returns and below are 4 lines (say investment types) which talks about their returns

  • If we look at the first line, as the line is upwards we can infer that the amount of returns is increasing so probably you would like to invest here?
  • Second line is going downwards, so definitely you wouldn’t be interested in this as the returns would be in negatives and no one would like to loose their money!
  • The third the line is horizontal, neither increasing or decreasing, so the return that we could expect with this investment is constant
  • Finally, the fourth line is also increasing like the first one however if we closely observe this line is much steeper than the first one, which indicates the returns are much faster than the first one. So this is the investment type that you should prefer.

We decided the investment based on the measure of steepness.Now, rather than measuring the steepness just by eyeballing, wouldn’t it be great if we had some mechanism to measure this.

Now, lets be specific about how we describe the steepness of the line, and Slope helps us with that. The Slope of a line is a actual number which helps us describe steepness of the line

How do we calculate the slope?
Slope of a line can be defined as vertical change divided by horizontal change

The slope of a line tells us how much that line’s y value changes for any given change in x, but we do not use this term for curves or non-linear functions as by definition, our slope is constant: A line always has the same slope (constant slope all along its length). Every step we take along the x-axis, the change in our value of y remains constant. A positive slope indicates that y increases as x increases. A negative slope implies that y decreases as x increases. And a 0 slope implies that y is constant. We cannot have the slope of a vertical line (as x would never change) and slope of a horizontal line is zero.

We would also like to be able to talk about the slope of a curve, but unlike line slope is not the same at different points on the curve. However, it seems intuitively obvious that the slope of the curve at a particular point ought to equal the slope of the tangent line along that curve.

To understand that we need to first understand about tangent line.

What actually is a tangent line?

A tangent is a line that just touches the curve (curve could be parabola, ellipse, cubic, circle etc) at only a single point and then continues in either direction with exactly the slope of the curve at that point.

Tangent Line

The tangent line can help tell the rate of change of the curve at a specific point on the graph as long as we know the equation of the tangent line.

Consider a point on a curve P and then imagine another point on the curve as Q, if we draw a line that passed through P and Q then it would be a secant line.

Secant Line

Now if we let P move closer to A the secant line gets closer to tangent line and once P hits A, then secant line becomes tangent line. This is calculus definition of tangent line. A tangent line to point P is the limit of the secant line as Q approaches P. Tangent line is a line which is most similar to the curve at the point P.

If we zoom in on the graph of the function at some point so that the function looks almost like a straight line, the derivative at that point is the slope of the line.

Derivative is slope of the line, slope is a number and its a measure of steepness of the curve at point A, usually denoted by the letter m.

To find the slope of this point, 
– First, find a second point B on a curve and draw a secant line
– we then find the slope of the secant line between A and B
 slope(m) = Δy∕Δx 
This is slope of a secant line, where Δy and Δx are numbers
– Next, as we move point B towards A, secant line approaches tangent line and the slope approach the derivatives which is denoted as 
derivative = dy/dx, where dx and dy are differentials (infinitely small numbers)

A derivative of a function is a representation of the rate of change of one variable in relation to another at a given point on a function.

The slope describes the steepness of a line as a relationship between the change in y-values for a change in the x-values.

Conclusion

Slope and derivatives are very similar ideas. However, it is important to remember how to use the derivative to find the slope of a tangent line, but remember that the derivative itself is not a slope in and of itself. The derivative is a powerful idea used in many different ways and a key concept used in Machine learning and Deep Learning.

Hope this was helpful!

Leave a comment