Derivative as Slope of a Tangent Line: Formula, Examples

#Calculus
TL;DR
The derivative at a point is the slope of the tangent line there. This guide to the derivative as slope of a tangent line covers secants becoming tangents, the tangent equation, and where it fails.
BT
Bhanzu TeamLast updated on October 9, 202618 min read

What Does It Mean That The Derivative Is The Slope Of A Tangent Line?

The derivative as slope of a tangent line means that f′(a)f'(a), the derivative of ff at the input aa, equals the slope of the line that touches the graph of ff at the point (a,f(a))(a, f(a)) and runs in the same direction as the curve there. So yes, the derivative is the slope of the tangent line, whenever that slope exists.

The slope is defined by a limit of secant slopes. Either form below gives the same number:

f′(a)=lim⁡x→af(x)−f(a)x−a=lim⁡h→0f(a+h)−f(a)hf'(a) = \lim_{x \to a} \frac{f(x) - f(a)}{x - a} = \lim_{h \to 0} \frac{f(a+h) - f(a)}{h}

  • (a,f(a))(a, f(a)) is the fixed point where you want the tangent.

  • (x,f(x))(x, f(x)), or (a+h,f(a+h))(a+h, f(a+h)), is a second point on the curve that slides toward it.

  • The fraction is the difference quotient, the slope of the secant line through the two points.

  • The limit must exist and be a finite number. If it does not, the curve has no tangent slope at aa.

This page is the geometric reading. The same limit read as "how fast is the output changing?" is the derivative as rate of change, and the step-by-step limit algebra lives in the definition of the derivative. One limit has two readings: on the graph it is a slope, and over time it is a rate.

What Is A Tangent Line To A Curve?

A tangent line to a curve at a point is the line through that point whose slope is the limit of the secant slopes there. Near the point, it is the line the curve most closely hugs.

Most students first meet tangents on circles, where a tangent touches the circle at exactly one point. That picture helps, but "touches once" is not the calculus definition, and it fails on other curves:

  • The tangent to y=x3y = x^3 at (1,1)(1, 1) is y=3x−2y = 3x - 2. It touches at x=1x = 1 and crosses the curve again at x=−2x = -2, because x3−(3x−2)=(x−1)2(x+2)x^3 - (3x - 2) = (x - 1)^2(x + 2).

  • The tangent to y=x3y = x^3 at (0,0)(0, 0) is the xx-axis, y=0y = 0. It passes straight through the curve at the point of tangency, because the curve changes from bending down to bending up there.

  • A line can touch a curve at only one point and still not be a tangent. The vertical line x=0x = 0 meets y=x2y = x^2 once, but it cuts across the parabola instead of running along it.

What makes a line the tangent is direction, not the number of meeting points. The tangent matches the curve's direction at the point, which is exactly what the limit of secant slopes measures.

How Do Secant Lines Become The Tangent Line?

Secant lines become the tangent line when the second point slides along the curve toward the first and the secant slopes settle on one number. A line through a fixed point is pinned down by its slope, so when the slopes settle, the lines settle too.

Take f(x)=x3f(x) = x^3 and the fixed point (1,1)(1, 1). The secant slope to the point at x=1+hx = 1 + h simplifies, one step per line:

(1+h)3−1h=1+3h+3h2+h3−1h\frac{(1+h)^3 - 1}{h} = \frac{1 + 3h + 3h^2 + h^3 - 1}{h}

=3h+3h2+h3h= \frac{3h + 3h^2 + h^3}{h}

=3+3h+h2= 3 + 3h + h^2

Here are the secant slopes from both sides:

Second point xx

Step hh

Secant slope 3+3h+h23 + 3h + h^2

22

11

77

1.51.5

0.50.5

4.754.75

1.11.1

0.10.1

3.313.31

1.011.01

0.010.01

3.03013.0301

0.990.99

−0.01-0.01

2.97012.9701

0.90.9

−0.1-0.1

2.712.71

00

−1-1

11

From the right the slopes fall toward 33, and from the left they rise toward 33. Both sides agree, so f′(1)=3f'(1) = 3, and the tangent at (1,1)(1, 1) is the line through that point with slope 33.

A question asked on Quora puts the doubt exactly: is there a mathematical demonstration that the secant lines really tend to the tangent? In calculus, the tangent line is defined as the line through (a,f(a))(a, f(a)) whose slope is this limit. The demonstration is the algebra above. The slope 3+3h+h23 + 3h + h^2 gets as close to 33 as you like once hh is small enough, and every secant passes through (1,1)(1, 1), so the secants close in on the one line with slope 33 through that point.

Is The Derivative The Tangent Line Itself?

No. The derivative is not the tangent line. The derivative f′(x)f'(x) is a function that hands back the slope of the tangent line at each input, while each tangent line is a single straight line at one point. The CK-12 Flexi question "Is the tangent line the derivative?" comes from exactly this mix-up.

Take f(x)=x3−3xf(x) = x^3 - 3x. Its derivative is f′(x)=3x2−3f'(x) = 3x^2 - 3, found with the power rule. Feed in five inputs and you get five different tangent lines:

aa

Point (a,f(a))(a, f(a))

Tangent slope f′(a)f'(a)

Tangent line

−2-2

(−2,−2)(-2, -2)

99

y=9x+16y = 9x + 16

−1-1

(−1,2)(-1, 2)

00

y=2y = 2

00

(0,0)(0, 0)

−3-3

y=−3xy = -3x

11

(1,−2)(1, -2)

00

y=−2y = -2

22

(2,2)(2, 2)

99

y=9x−16y = 9x - 16

The sign of f′(a)f'(a) tells you the direction of the curve at a glance:

  • Positive slope: the tangent rises left to right, so the curve is climbing (a=±2a = \pm 2).

  • Zero slope: the tangent is horizontal, so the curve may be at a peak or a valley (a=±1a = \pm 1). These inputs are the critical points of ff.

  • Negative slope: the tangent falls, so the curve is dropping (a=0a = 0).

How Do You Write The Equation Of The Tangent Line?

You write the tangent-line equation from one point and one slope: the point is (a,f(a))(a, f(a)) and the slope is f′(a)f'(a). Put them into the point-slope form of a line:

y−f(a)=f′(a),(x−a)y - f(a) = f'(a),(x - a)

  1. Compute the height f(a)f(a).

  2. Compute the slope f′(a)f'(a) as a number.

  3. Substitute both into the point-slope form, then simplify if asked.

For f(x)=x3f(x) = x^3 at a=1a = 1: f(1)=1f(1) = 1 and f′(1)=3f'(1) = 3, so y−1=3(x−1)y - 1 = 3(x - 1), which simplifies to y=3x−2y = 3x - 2. Normal lines, tangents from an outside point and tangents with a given slope are worked through in tangent line equations.

When Does The Tangent Line Slope Fail To Exist?

The tangent slope fails to exist whenever the secant slopes from the two sides do not settle on one finite number. Four shapes cause it:

Shape

Example at x=0x = 0

Secant slopes from the left

Secant slopes from the right

Tangent line?

Corner

f(x)=∣x∣f(x) = \lvert x \rvert

−1-1

+1+1

No single tangent

Cusp

f(x)=x23f(x) = \sqrt[3]{x^2}

tend to −∞-\infty

tend to +∞+\infty

Vertical, but the curve reverses direction

Vertical tangent

f(x)=x3f(x) = \sqrt[3]{x}

tend to +∞+\infty

tend to +∞+\infty

Yes, the line x=0x = 0

Break

a jump in the graph

no single point to pivot on

no single point to pivot on

No

  • Corner: the absolute value function has two honest one-sided slopes, −1-1 and +1+1, that disagree. Two directions means no single tangent.

  • Cusp: the curve comes down steeply into the point and leaves steeply upward, so the one-sided slopes blow up with opposite signs.

  • Vertical tangent: here a tangent line does exist, the vertical line x=0x = 0, but its slope is an undefined slope. The derivative is a number, and no finite number can describe it.

  • Break: a function must be continuous at a point before it can have a tangent there.

All four are points where ff is not differentiable. The precise conditions, including why continuity alone is not enough, are covered in differentiability of a function.

Why Is The Tangent Line The Best Straight-Line Approximation?

The tangent line is the best straight-line approximation because, near the point of tangency, the gap between the curve and the tangent shrinks faster than the distance from the point. The zoom in the first picture showed this. Close in, the curve and the tangent are almost indistinguishable.

That makes the tangent a practical estimating tool:

f(x)≈f(a)+f′(a),(x−a)for x near af(x) \approx f(a) + f'(a),(x - a) \quad \text{for } x \text{ near } a

For f(x)=xf(x) = \sqrt{x} at a=4a = 4, with f(4)=2f(4) = 2 and f′(4)=14f'(4) = \frac{1}{4} (worked out in Example 3 below):

4.1≈2+14(0.1)=2.025\sqrt{4.1} \approx 2 + \frac{1}{4}(0.1) = 2.025

A calculator gives 4.1=2.0248\sqrt{4.1} = 2.0248 to four decimal places, so the tangent estimate is off by less than 0.00020.0002. Move further from aa and the estimate drifts, because the curve bends away from its tangent. How fast it bends away is a second-derivative question (curvature), which you will meet later.

Examples Of The Derivative As Slope Of A Tangent Line

Example 1

Find the slope of the tangent line to f(x)=x2f(x) = x^2 at x=3x = 3, and the tangent line itself.

Differentiate with the power rule:

f′(x)=2xf'(x) = 2x

f′(3)=6f'(3) = 6

The point of tangency is (3,f(3))=(3,9)(3, f(3)) = (3, 9). Use point-slope form:

y−9=6(x−3)y - 9 = 6(x - 3)

y=6x−9y = 6x - 9

Final answer: the tangent slope is 66, and the tangent line is y=6x−9y = 6x - 9.

Example 2

Find the tangent line to f(x)=x2−4x+5f(x) = x^2 - 4x + 5 at x=3x = 3.

The tempting route uses the derivative formula itself as the slope. With f(3)=2f(3) = 2 and f′(x)=2x−4f'(x) = 2x - 4, that gives:

y−2=(2x−4)(x−3)y - 2 = (2x - 4)(x - 3)

y=2x2−10x+14y = 2x^2 - 10x + 14

That is a parabola, not a line. It passes through (3,2)(3, 2), but a tangent line has to be straight, so something has gone wrong. The slope of a tangent line is one number, the derivative evaluated at x=3x = 3, not the formula 2x−42x - 4.

The correct route evaluates the slope first:

f′(3)=2(3)−4=2f'(3) = 2(3) - 4 = 2

y−2=2(x−3)y - 2 = 2(x - 3)

y=2x−4y = 2x - 4

Final answer: y=2x−4y = 2x - 4.

Example 3

Use the limit of secant slopes to find the tangent slope of f(x)=xf(x) = \sqrt{x} at x=4x = 4, then write the tangent line.

Set up the secant slope:

4+h−2h\frac{\sqrt{4+h} - 2}{h}

Substituting h=0h = 0 gives 00\frac{0}{0}, so rationalise the numerator by multiplying top and bottom by 4+h+2\sqrt{4+h} + 2:

(4+h)−4h(4+h+2)=hh(4+h+2)\frac{(4+h) - 4}{h\left(\sqrt{4+h} + 2\right)} = \frac{h}{h\left(\sqrt{4+h} + 2\right)}

=14+h+2= \frac{1}{\sqrt{4+h} + 2}

Now let h→0h \to 0:

f′(4)=12+2=14f'(4) = \frac{1}{2 + 2} = \frac{1}{4}

The point is (4,2)(4, 2), so the tangent line is:

y−2=14(x−4)y - 2 = \frac{1}{4}(x - 4)

y=14x+1y = \frac{1}{4}x + 1

Final answer: the tangent slope is 14\frac{1}{4}, and the tangent line is y=14x+1y = \frac{1}{4}x + 1.

The step students skip here is the rationalising multiplication. Without it, they either stop at 00\frac{0}{0} or cancel the hh illegally, inside the square root.

Example 4

Find every point on f(x)=x3−3xf(x) = x^3 - 3x where the tangent line has slope 99.

Set the derivative equal to the required slope:

3x2−3=93x^2 - 3 = 9

x2=4x^2 = 4

x=−2orx=2x = -2 \quad \text{or} \quad x = 2

Find the heights:

f(−2)=−8+6=−2f(-2) = -8 + 6 = -2

f(2)=8−6=2f(2) = 8 - 6 = 2

Final answer: the tangent slope is 99 at (−2,−2)(-2, -2) and at (2,2)(2, 2). The two tangent lines are parallel, y=9x+16y = 9x + 16 and y=9x−16y = 9x - 16.

Example 5

Does f(x)=∣x2−4∣f(x) = \lvert x^2 - 4 \rvert have a tangent slope at x=2x = 2?

Check the secant slopes from each side. For a small step hh, (2+h)2−4=4h+h2(2+h)^2 - 4 = 4h + h^2.

From the right (h>0h > 0), 4h+h2>04h + h^2 > 0, so the absolute value changes nothing:

4h+h2h=4+h→4\frac{4h + h^2}{h} = 4 + h \to 4

From the left (h<0h < 0 but close to 00), 4h+h2<04h + h^2 < 0, so the absolute value flips the sign:

−(4h+h2)h=−4−h→−4\frac{-(4h + h^2)}{h} = -4 - h \to -4

Final answer: no. The one-sided slopes are −4-4 and 44, so the graph has a corner at (2,0)(2, 0), and f′(2)f'(2) does not exist.

Example 6

A ball's height is H(t)=20t−5t2H(t) = 20t - 5t^2 metres after tt seconds. Find the slope of the tangent to the height graph at t=1t = 1, explain what it means, and find where the tangent is horizontal.

Differentiate:

H′(t)=20−10tH'(t) = 20 - 10t

H′(1)=10H'(1) = 10

The point is (1,H(1))=(1,15)(1, H(1)) = (1, 15), so the tangent line is y=10t+5y = 10t + 5. On the graph, slope 1010 means the curve is rising 1010 metres per second at that instant: the ball is going up at 10,m/s10,\text{m/s}.

A horizontal tangent needs slope 00:

20−10t=020 - 10t = 0

t=2t = 2

H(2)=40−20=20H(2) = 40 - 20 = 20

Final answer: the tangent slope at t=1t = 1 is 1010 (rising at 10,m/s10,\text{m/s}), and the tangent is horizontal at (2,20)(2, 20), the top of the flight. At t=3t = 3, the slope is −10-10, and the ball is falling.

Why Did Mathematicians Want The Slope Of A Tangent?

They wanted it because "the tangent tells you where a curve turns". Finding the highest or lowest point of a curve, the steepest climb, or the direction a moving point is heading all reduce to one question: what is the slope of the tangent here?

  • The turning-point problem. Pierre de Fermat (1601 to 1665, France) worked on maxima and minima from around 1629 and circulated a Method for determining Maxima and Minima and Tangents to Curved Lines. He linked the two questions: at a peak or valley, the tangent is horizontal.

  • A general method for any curve. Gottfried Wilhelm Leibniz (1646 to 1716, Germany) published his differential calculus in 1684 under a title that promised a new method for maxima, minima and tangents. His dd notation turned "slope of the tangent" into a calculation anyone could carry out with rules.

Before this, tangents were found curve by curve with clever geometry, and each new curve needed a new trick. The derivative replaced the tricks with one limit that works on every smooth curve, which is why Example 6 can find the top of a ball's flight in three lines.

Where Is The Slope Of A Tangent Line Used In Real Life?

The slope of a tangent line is used wherever a direction or a turning point matters at one exact place on a curve. Here are some common uses:

  • Finding roots fast: Newton's method slides down the tangent line to where it crosses the xx-axis, then repeats. Calculators and solvers use this idea to find square roots and solve equations.

  • Best values: a horizontal tangent marks a possible peak or valley. Designers use this to find the least material, the lowest cost or the highest output.

  • Motion and direction: a car that skids on a curve continues roughly along the tangent at the point where it lost grip, so road designers treat tangent direction as a safety question.

  • Computer graphics: smooth curves in drawing and font software are joined so that the tangent directions match at each joint, which removes visible kinks.

Common Errors When Working With Tangent Slopes

Most tangent-slope errors come from carrying a picture from circle geometry into calculus, or from trusting a graph that looks smooth from far away.

Mistake 1: Believing A Tangent Touches The Curve Only Once

Where it slips in: A student checks a proposed tangent by asking whether it meets the curve at a second point.

Don't do this: Reject y=3x−2y = 3x - 2 as the tangent to y=x3y = x^3 at (1,1)(1, 1) because it also meets the curve at (−2,−8)(-2, -8).

The correct way: Check the slope at the point of tangency only. Since f′(1)=3f'(1) = 3 and the line passes through (1,1)(1, 1) with slope 33, it is the tangent, whatever happens far away.

The first instinct here comes straight from circle geometry, where "touches once" really is the test. The second-guesser is hit hardest: they compute the tangent correctly, notice the second crossing and talk themselves out of a right answer.

Mistake 2: Assuming A Continuous Graph Always Has A Tangent Slope

Where it slips in: Graphs with absolute values or piecewise rules, such as f(x)=∣x2−4∣f(x) = \lvert x^2 - 4 \rvert.

Don't do this: Differentiate x2−4x^2 - 4 and report f′(2)=4f'(2) = 4, because the graph has no gap at x=2x = 2.

The correct way: At any point where the formula changes, compute the secant slopes from each side. In Example 5 they are −4-4 and 44, so there is a corner and no derivative.

Students who sketch the graph before differentiating spot corners like this almost every time. Students who go straight to symbol-pushing usually miss them, because ∣x2−4∣\lvert x^2 - 4 \rvert looks perfectly ordinary written down.

Mistake 3: Reading A Vertical Tangent As A Slope Of Zero

Where it slips in: f(x)=x3f(x) = \sqrt[3]{x} at x=0x = 0, or any graph that stands straight up at a point.

Don't do this: Write f′(0)=0f'(0) = 0, or say the curve has no tangent line at all.

The correct way: The tangent line exists and is the vertical line x=0x = 0. Its slope is undefined, so f′(0)f'(0) does not exist. Horizontal tangent: slope 00. Vertical tangent: no finite slope.

The silent understander often gets this right on a graph but cannot say why. Wait, it is worth being precise about what goes wrong for everyone else: they treat "the tangent is a special line" and "the slope is a special number" as the same statement, and at a vertical tangent they come apart. (It is the one case in this topic where a tangent line exists but the derivative does not, and it trips up careful students too.)

Mistake 2 has a real-world version in railway engineering. A track cannot go from a straight section into a curve with a sharp change, because the train's sideways acceleration would jump suddenly.

Engineers insert transition curves that ease the curvature in gradually. Practical use in the UK began from 1845, and Rankine's 1862 work reviewed earlier proposals. The geometry problem behind it is the one in Mistake 2: where two pieces of a path meet, the directions have to match.

Practice Problems On Derivative As Slope Of A Tangent Line

Try each one before checking. Every answer has been verified.

  1. Find the slope of the tangent to f(x)=2x2−3xf(x) = 2x^2 - 3x at x=2x = 2, and the tangent line.

  2. Answer to Question 1: slope 55, and the tangent is y=5x−8y = 5x - 8.

  3. Find the tangent line to f(x)=1xf(x) = \frac{1}{x} at x=2x = 2.

  4. Answer to Question 2: f′(2)=−14f'(2) = -\frac{1}{4}, so y=−14x+1y = -\frac{1}{4}x + 1.

  5. At what point does the tangent to f(x)=x2+2xf(x) = x^2 + 2x have slope 66?

  6. Answer to Question 3: at x=2x = 2, the point (2,8)(2, 8).

  7. Does f(x)=∣x−3∣f(x) = \lvert x - 3 \rvert have a tangent slope at x=3x = 3? Give the one-sided secant slopes. Answer to Question 4: no. The left slope is −1-1 and the right slope is 11, so the graph has a corner.

  8. Find the tangent to y=x3y = x^3 at x=−1x = -1, and the other point where it meets the curve.

  9. Answer to Question 5: y=3x+2y = 3x + 2, which meets the curve again at (2,8)(2, 8).

  10. Use the limit of secant slopes to find the tangent slope of f(x)=x2f(x) = x^2 at x=5x = 5.

  11. Answer to Question 6: the secant slope simplifies to 10+h10 + h, so the tangent slope is 1010.

Bottom Line

  • The derivative as slope of a tangent line means f′(a)f'(a) is the slope of the line that matches the curve's direction at (a,f(a))(a, f(a)).

  • That slope is the limit of secant slopes, and it must agree from both sides and be finite.

  • The tangent-line equation is y−f(a)=f′(a)(x−a)y - f(a) = f'(a)(x - a), with f′(a)f'(a) evaluated as a number first.

  • Corners, cusps, vertical tangents and breaks are where the tangent slope fails to exist.

  • A tangent can meet the curve again elsewhere: direction at the point, not the number of meetings, makes it a tangent.

Where To Go From Here

Work through Practice Problems 1 to 6. If Problem 2 comes out as a curve instead of a line, return to Example 2 and evaluate the slope before writing the equation. If Problem 4 confuses you, reread "When Does The Tangent Line Slope Fail To Exist?".

Want a teacher to check your tangent lines with you? Book a free demo class with a Bhanzu trainer.

Read More

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

How do you write an expression for the slope of the tangent line at the point (2, f(2))?
Use the limit of secant slopes at a=2a = 2: lim⁡h→0f(2+h)−f(2)h\lim_{h \to 0} \frac{f(2+h) - f(2)}{h}, which is f′(2)f'(2) when the limit exists.
If the derivative as slope of a tangent line is right, doesn't it break for a cubic, since the derivative of a cubic is a parabola?
No. The derivative of x3+3x2+1x^3 + 3x^2 + 1 is 3x2+6x3x^2 + 6x, and its graph is a parabola, but that parabola is not a tangent line. It is a list of slopes. Each height on the parabola is the slope of one tangent line to the cubic. The tangent lines themselves are all straight.
What is the difference between a derivative and slope?
Slope belongs to a straight line and is the same all along it. A derivative belongs to a curve and gives a slope at each point, the slope of the tangent line there. For a straight line the two agree everywhere, so the derivative as slope of a tangent line is the curve version of ordinary slope.
What is the slope of the tangent line to g(x) = (9/8)x + 1 at (−8, −8)?
It is 98\frac{9}{8}. The graph of gg is a straight line, and a line's tangent at any point is the line itself, so the tangent slope equals the line's own slope. The point (−8,−8)(-8, -8) does lie on it, since 98(−8)+1=−8\frac{9}{8}(-8) + 1 = -8.
For f(x) = x² − 9, what is f'(x), and what are the tangent slopes at x = −4 and x = 0?
f′(x)=2xf'(x) = 2x. At x=−4x = -4 the tangent slope is −8-8, so the curve is falling steeply. At x=0x = 0 it is 00, so the tangent is horizontal at the vertex (0,−9)(0, -9).
What is the difference between a vertical tangent and a vertical cusp?
Compare the signs of the one-sided slopes. At a vertical tangent, such as x3\sqrt[3]{x} at 00, both sides head to +∞+\infty (or both to −∞-\infty), and the curve passes smoothly through, standing upright. At a vertical cusp, such as x23\sqrt[3]{x^2} at 00, one side heads to −∞-\infty and the other to +∞+\infty, so the curve comes in and turns back sharply. Neither has a derivative at that point.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →