Equation of a Tangent Line
To find the equation of a tangent line to y = f(x) at x = a, you need a point and a slope. The point is (a, f(a)). The slope is the derivative f'(a). Put both into point-slope form: y - f(a) = f'(a)(x - a). Then simplify to slope-intercept form if you like.
Before this lesson: Power Rule, Definition of the Derivative and Point-Slope Form
What a tangent line is
A tangent line touches a curve at one point and has the same steepness as the curve there. Zoom in close to that point, and the curve and the line look almost the same.
In instantaneous rate of change, you saw that the slope of this line is the limit of secant slopes. That limit is the derivative. So the derivative f'(a) is the slope of the tangent line at x = a.
Any line needs only two things: one point on it and its slope. The function gives the point, and the derivative gives the slope.
Equation of a tangent line formula
The tangent line to y = f(x) at x = a is
y - f(a) = f'(a)(x - a)
- Find the point: compute f(a). The point of tangency is (a, f(a)).
- Find the derivative f'(x), usually with the power rule.
- Find the slope: compute m = f'(a).
- Substitute into y - f(a) = m(x - a).
- If asked, solve for y to get the form y = mx + b.
Plug a into f for the point, but into f’ for the slope. Mixing these up is the most common error.
Tangent line examples
Example 1: A parabola
Find the equation of the tangent line to f(x) = x^2 at x = 2.
f(2) = 2^2 = 4
Find the point: substitute x = 2 into f. The point is (2, 4).
f'(x) = 2x
Differentiate with the power rule.
f'(2) = 2(2) = 4
Find the slope: substitute x = 2 into f’.
y - 4 = 4(x - 2)
Substitute the point and slope into point-slope form (see point-slope form).
y - 4 = 4x - 8
Distribute the 4 (see distributive property).
y = 4x - 4
Add 4 to both sides.
Answer: y = 4x − 4. This is the line in the graph above.
Example 2: A cubic
Find the tangent line to f(x) = x^3 - 4x + 1 at x = 2.
f(2) = 2^3 - 4(2) + 1
Find the point: substitute x = 2 into f.
f(2) = 8 - 8 + 1 = 1
Simplify. The point is (2, 1).
f'(x) = 3x^2 - 4
Differentiate term by term with the power rule.
f'(2) = 3(2)^2 - 4
Substitute x = 2 into f’.
f'(2) = 12 - 4 = 8
Simplify. The slope is 8.
y - 1 = 8(x - 2)
Use point-slope form.
y - 1 = 8x - 16
Distribute the 8.
y = 8x - 15
Add 1 to both sides.
Answer: y = 8x − 15.
Example 3: A square root
Find the tangent line to f(x) = \sqrt{x} at x = 4.
f(4) = \sqrt{4} = 2Find the point. The point is (4, 2).
f(x) = x^{1/2}Rewrite the root as a power (see rational exponents).
f'(x) = \frac{1}{2}x^{-1/2}Power rule: \frac{1}{2} - 1 = -\frac{1}{2}.
f'(x) = \frac{1}{2\sqrt{x}}Rewrite with a positive exponent.
f'(4) = \frac{1}{2\sqrt{4}} = \frac{1}{4}Substitute x = 4. The slope is 1/4.
y - 2 = \frac{1}{4}(x - 4)Use point-slope form.
y - 2 = \frac{1}{4}x - 1Distribute the 1/4.
y = \frac{1}{4}x + 1Add 2 to both sides.
Answer: y = \frac{1}{4}x + 1.
Example 4: Horizontal tangent lines
Find every point where f(x) = x^3 - 3x^2 + 4 has a horizontal tangent line, and write each tangent line.
f'(x) = 3x^2 - 6x
Differentiate. A horizontal line has slope 0, so set f'(x) = 0 next.
3x^2 - 6x = 0
Set the derivative equal to 0.
3x(x - 2) = 0
Factor out 3x (see factoring out the GCF).
x = 0 \text{ or } x = 2Set each factor equal to 0 (see solving quadratic equations by factoring).
f(0) = 0 - 0 + 4 = 4
Find the height at x = 0. The point is (0, 4).
f(2) = 8 - 12 + 4 = 0
Find the height at x = 2. The point is (2, 0).
Answer: the horizontal tangent lines are y = 4 at (0, 4) and y = 0 at (2, 0). A horizontal line through (a, b) is just y = b.
Example 5: Word problem with a ball’s height
A ball’s height after t seconds is h(t) = -16t^2 + 48t + 4 feet. Write the tangent line at t = 1. Then use it to estimate the height at t = 1.1 seconds.
h(1) = -16 + 48 + 4 = 36
Find the point: at t = 1 the ball is 36 feet up. The point is (1, 36).
h'(t) = -32t + 48
Differentiate with the power rule.
h'(1) = -32 + 48 = 16
Find the slope: the ball rises at 16 ft/s at t = 1.
y - 36 = 16(t - 1)
Use point-slope form with t in place of x.
y - 36 = 16t - 16
Distribute the 16.
y = 16t + 20
Add 36 to both sides.
y = 16(1.1) + 20 = 37.6
Estimate: substitute t = 1.1 into the tangent line.
Answer: the tangent line is y = 16t + 20, and it estimates a height of about 37.6 feet at t = 1.1. The exact height is h(1.1) = 37.44 feet, so the estimate is off by only 0.16 feet. Near the point of tangency, the line is a good stand-in for the curve.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Using f'(x) instead of f'(a) as the slope | For x^2 at x = 2: y − 4 = 2x(x − 2) | The slope is a number. Substitute first: f'(2) = 4. |
| Using f'(a) as the y-coordinate | For x^3 at x = 2: point (2, 12) | The point uses f(a): (2, 8). The slope is f'(2) = 12. |
| Switching the signs in point-slope form | y + 4 = 4(x + 2) for the point (2, 4) | Subtract the coordinates: y − 4 = 4(x − 2). |
| Forgetting to distribute to both terms | y − 4 = 4x − 2 | 4(x − 2) = 4x − 8. |
| Thinking a tangent line touches the curve only once | Rejecting y = 1 as tangent to x^4 - 2x^2 + 2 because it touches at x = −1 and x = 1 | A tangent line can meet the curve again elsewhere. What matters is matching the slope at the point. |
| Writing the answer as just a slope | “The tangent line is 4.” | Give a full equation, such as y = 4x − 4. |
Related methods
Normal lines
The normal line at a point is perpendicular to the tangent line there. Its slope is the negative reciprocal, -\frac{1}{f'(a)} (see parallel and perpendicular lines). For f(x) = x^2 at (2, 4), the tangent slope is 4. So the normal line is y - 4 = -\frac{1}{4}(x - 2).
Tangent lines as estimates
Example 5 used a tangent line to estimate a value. This idea is called linear approximation. It works well close to the point of tangency and gets worse farther away.
Tangent lines that don’t exist
If f is not differentiable at x = a, as at a corner or cusp, there is no single tangent line there. At a vertical tangent, the line is x = a, which has no slope. See differentiability.
Practice problems
- Find the tangent line to f(x) = x^2 + 1 at x = 2.
- Find the tangent line to f(x) = 3x^2 - 5x at x = 1.
- Find the tangent line to f(x) = x^3 at x = −1.
- Find the tangent line to f(x) = \frac{4}{x} at x = 2.
- Find the tangent line to f(x) = 2\sqrt{x} at x = 9.
- Find the tangent line to f(x) = x^4 - 2x^2 at x = 1.
- Find the point where f(x) = x^2 - 6x + 5 has a horizontal tangent line.
- Find the point on f(x) = x^2 where the tangent line is parallel to y = 6x − 2. Then write that tangent line.
- Find the normal line to f(x) = x^2 at x = 1.
- A store’s revenue from selling x shirts is R(x) = 50x - 0.5x^2 dollars. Write the tangent line at x = 20 and use it to estimate R(21).
Show answers
1.
f(2) = 4 + 1 = 5
Find the point: (2, 5).
f'(x) = 2x
Differentiate.
f'(2) = 4
Find the slope.
y - 5 = 4(x - 2)
Point-slope form.
y - 5 = 4x - 8
Distribute.
y = 4x - 3
Add 5 to both sides.
Answer: y = 4x − 3
2.
f(1) = 3 - 5 = -2
Find the point: (1, −2).
f'(x) = 6x - 5
Differentiate.
f'(1) = 6 - 5 = 1
Find the slope.
y - (-2) = 1(x - 1)
Point-slope form.
y + 2 = x - 1
Simplify both sides.
y = x - 3
Subtract 2 from both sides.
Answer: y = x − 3
3.
f(-1) = (-1)^3 = -1
Find the point: (−1, −1).
f'(x) = 3x^2
Differentiate.
f'(-1) = 3(-1)^2 = 3
Find the slope.
y - (-1) = 3(x - (-1))
Point-slope form.
y + 1 = 3x + 3
Simplify and distribute.
y = 3x + 2
Subtract 1 from both sides.
Answer: y = 3x + 2
4.
f(2) = \frac{4}{2} = 2Find the point: (2, 2).
f(x) = 4x^{-1}Rewrite as a power of x (see negative exponents).
f'(x) = -4x^{-2}Power rule.
f'(2) = -\frac{4}{4} = -1Find the slope.
y - 2 = -1(x - 2)
Point-slope form.
y - 2 = -x + 2
Distribute.
y = -x + 4
Add 2 to both sides.
Answer: y = −x + 4
5.
f(9) = 2\sqrt{9} = 6Find the point: (9, 6).
f(x) = 2x^{1/2}Rewrite as a power.
f'(x) = x^{-1/2}Power rule: 2 \cdot \frac{1}{2} = 1.
f'(9) = \frac{1}{\sqrt{9}} = \frac{1}{3}Find the slope.
y - 6 = \frac{1}{3}(x - 9)Point-slope form.
y - 6 = \frac{1}{3}x - 3Distribute.
y = \frac{1}{3}x + 3Add 6 to both sides.
Answer: y = \frac{1}{3}x + 3
6.
f(1) = 1 - 2 = -1
Find the point: (1, −1).
f'(x) = 4x^3 - 4x
Differentiate.
f'(1) = 4 - 4 = 0
Find the slope. A slope of 0 means a horizontal line.
y - (-1) = 0(x - 1)
Point-slope form.
y = -1
Simplify.
Answer: y = −1
7.
f'(x) = 2x - 6
Differentiate.
2x - 6 = 0
A horizontal tangent has slope 0.
x = 3
Add 6, then divide by 2.
f(3) = 9 - 18 + 5 = -4
Find the height.
Answer: (3, −4), where the tangent line is y = −4
8.
f'(x) = 2x
Differentiate.
2x = 6
Parallel lines have equal slopes, so set the slope equal to 6.
x = 3
Divide by 2.
f(3) = 9
Find the point: (3, 9).
y - 9 = 6(x - 3)
Point-slope form.
y = 6x - 9
Distribute, then add 9 to both sides.
Answer: the point is (3, 9), and the tangent line is y = 6x − 9
9.
f(1) = 1
Find the point: (1, 1).
f'(1) = 2(1) = 2
The tangent slope is 2.
m = -\frac{1}{2}The normal slope is the negative reciprocal of 2.
y - 1 = -\frac{1}{2}(x - 1)Point-slope form.
y - 1 = -\frac{1}{2}x + \frac{1}{2}Distribute.
y = -\frac{1}{2}x + \frac{3}{2}Add 1 to both sides.
Answer: y = -\frac{1}{2}x + \frac{3}{2}
10.
R(20) = 1000 - 200 = 800
Find the point: (20, 800).
R'(x) = 50 - x
Differentiate: −0.5(2x) = −x.
R'(20) = 50 - 20 = 30
Find the slope.
y - 800 = 30(x - 20)
Point-slope form.
y - 800 = 30x - 600
Distribute.
y = 30x + 200
Add 800 to both sides.
y = 30(21) + 200 = 830
Estimate R(21) with the tangent line.
Answer: y = 30x + 200, so R(21) is about $830. (The exact value is R(21) = $829.50.)
Tangent line FAQ
How do you find the equation of a tangent line?
Find the point (a, f(a)), find the slope f'(a), and put both into point-slope form: y - f(a) = f'(a)(x - a).
Is the derivative the tangent line?
No. The derivative f'(a) is the slope of the tangent line, a single number. The tangent line is a full equation built from that slope and a point.
How do you find where a tangent line is horizontal?
Set f'(x) = 0 and solve for x. Then substitute each solution into f to find the points.
What is the difference between a tangent line and a normal line?
The tangent line has slope f'(a). The normal line goes through the same point but is perpendicular, with slope -\frac{1}{f'(a)}.
Summary
- The tangent line at x = a passes through (a, f(a)) and has slope f'(a).
- Formula: y - f(a) = f'(a)(x - a).
- Use f for the point and f’ for the slope.
- Horizontal tangents happen where f'(x) = 0.
- Near the point, the tangent line is a good estimate of the curve.
Previous lesson: Power Rule
Next lesson: Higher-Order Derivatives
Back to the Calculus 1 Index