Skip to content
EN - Language: English
MathematicsHigh school

What is a derivative? Explained step by step

· 10 min read

In short

A derivative tells you how fast a function is changing at a point. On the graph, it is the slope of the tangent at that point. We find it as the limit of the slopes of secants as the second point moves into the first.

Words to know

Secant
A straight line through two points of the graph.
Tangent
A straight line that runs exactly like the graph at one point.
Slope (gradient)
How much y goes up when x goes up by 1. In y = ax + b it is the number a.
Limit
The number something gets closer and closer to - here, as h gets closer to zero.

What do you think?

A car sets off, and after tt seconds it has covered s(t)=t2s(t) = t^2 metres. What does the speedometer show at exactly t=3t = 3 s?

The idea: a rate of change

A function says how one quantity depends on another: distance on time, temperature on the hour, cost on the number of items. The average rate of change over a stretch is easy: the change in yy divided by the change in xx.

The rate at a single point is harder. In a single instant the car covers no distance, so “distance over time” gives 00\frac{0}{0}. The derivative gets round this: we work out the average rate over shorter and shorter stretches and watch which number it closes in on.

The same idea turns up everywhere:

  • speed is the derivative of distance with respect to time, and acceleration is the derivative of speed,
  • how fast something warms up is the derivative of its temperature,
  • in economics, marginal cost says how much more it costs to make one more item.

From a secant to the tangent

On a graph, the average rate of change is the slope of a secant - a line through two points of the graph. Go through the animation step by step with the buttons or the arrow keys.

-0.50.511.522.53246hΔyQP

P = (1, 1)

Step 1 of 5
Steps of the animation. Arrow keys move between steps.

This is the graph of f(x) = x². We want to know about the point P = (1, 1): how fast does the function grow exactly here?

Notice that we never put h=0h = 0 - that would give 00\frac{0}{0}. We only look at what the secant’s slope gets close to. That is what a limit is.

Try it yourself: the derivative at every point

A derivative is not just one number. At every point of the graph the tangent has a different slope. Move the point x0x_0 and watch the tangent. Every position leaves a dot on the lower graph, at the height of the tangent’s slope. Before you show the whole graph of f′f', try to guess what it looks like.

Function
x₀ = 1
-2-112246
f(x₀)
1
slope of the tangent, f′(x₀)
2
near x₀ the function
rises

Every slope you try is a point of the graph of f′

-2-112-55

What to notice:

  • for f(x)=x2f(x) = x^2 the dots line up into the straight line y=2xy = 2x - the graph of the derivative,
  • where the function rises the derivative is positive, and where it falls the derivative is negative,
  • at a peak or a dip the tangent is flat, so the derivative is zero; for x3−3xx^3 - 3x that happens at x=−1x = -1 and x=1x = 1,
  • the graph of the derivative of sin⁡x\sin x is the graph of cos⁡x\cos x.

The definition

The derivative of a function ff at a point x0x_0 is the limit

f′(x0)=lim⁡h→0f(x0+h)−f(x0)h,f'(x_0) = \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h},

provided the limit exists and is finite. The fraction inside the limit is the difference quotient - the slope of the secant from the animation. Working out the derivative at every point gives a new function, f′(x)f'(x): it gives the slope of the tangent for every xx.

The tangent to the graph at the point (x0,f(x0))(x_0, f(x_0)) has slope f′(x0)f'(x_0), so its equation is

y=f′(x0)(x−x0)+f(x0).y = f'(x_0)(x - x_0) + f(x_0).

Example 1: the derivative of x² from the definition

We work out the difference quotient at any point xx and only at the very end let hh go to zero:

(x+h)2−x2h=2xh+h2h=2x+h  ⟶  2x.\begin{aligned} \frac{(x + h)^2 - x^2}{h} &= \frac{2xh + h^2}{h} \\ &= 2x + h \;\longrightarrow\; 2x. \end{aligned}

So (x2)′=2x(x^2)' = 2x. At x=1x = 1 that gives 22 - just what the animation showed.

Example 2: the tangent to x³ at 2

(2+h)3−8h=12h+6h2+h3h=12+6h+h2⟶12.\begin{aligned} \frac{(2 + h)^3 - 8}{h} &= \frac{12h + 6h^2 + h^3}{h} \\ &= 12 + 6h + h^2 \\ &\longrightarrow 12. \end{aligned}

The tangent to y=x3y = x^3 at the point (2,8)(2, 8) has slope 1212, and its equation is y=12(x−2)+8y = 12(x - 2) + 8, that is y=12x−16y = 12x - 16.

Your turn

Use the definition to find the derivative of f(x)=3x2−2xf(x) = 3x^2 - 2x at x0=1x_0 = 1.

Hintshow

Work out f(1+h)f(1 + h) and f(1)f(1) separately, subtract and divide by hh. Cancel the hh before you think about the limit.

Solutiontry it on your own first

f(1+h)=3(1+2h+h2)−2(1+h)=1+4h+3h2f(1 + h) = 3(1 + 2h + h^2) - 2(1 + h) = 1 + 4h + 3h^2, and f(1)=1f(1) = 1. So

f(1+h)−f(1)h=4h+3h2h=4+3h  ⟶  4.\begin{aligned} \frac{f(1 + h) - f(1)}{h} &= \frac{4h + 3h^2}{h} \\ &= 4 + 3h \;\longrightarrow\; 4. \end{aligned}

So f′(1)=4f'(1) = 4. A check with the rule you will learn in the course: f′(x)=6x−2f'(x) = 6x - 2, so f′(1)=4f'(1) = 4.

Common mistakes

  • Putting h=0h = 0 straight away. That gives 00\frac{0}{0}, which is not a number. Simplify the quotient first (cancel the hh), and only then look at what it tends to.
  • Mixing up f′(x0)f'(x_0) and f′(x)f'(x). f′(1)=2f'(1) = 2 is a number - the slope at one point. f′(x)=2xf'(x) = 2x is a function - the slope at every point.
  • “A tangent touches the graph at only one point.” Not always. The tangent to y=x3y = x^3 at (1,1)(1, 1) is y=3x−2y = 3x - 2, and it crosses the graph again at (−2,−8)(-2, -8). A tangent is about the direction of the graph at one place, not about how many points they share.
  • “Every function has a derivative everywhere.” The graph of ∣x∣|x| has a corner at zero: secants on the right have slope 11 and on the left −1-1. There is no limit, so there is no derivative at zero.

In exams

In Poland, derivatives are part of the extended-level maths matura: students must work them out (including with the sum, product and quotient rules), use them to find where a function increases or decreases, and solve optimisation problems - the largest area, the lowest cost. In 2026, students scored 47% of the points on average on the task that combined a derivative with optimisation (CKE report, in Polish). At university, derivatives are one of the main topics of first-year calculus, together with the rules of differentiation, L’Hôpital’s rule and curve sketching.

Check yourself

Test yourself

What is the slope of the tangent to the graph of f(x)=x2f(x) = x^2 at x0=2x_0 = 2?

You know that f′(x0)=−3f'(x_0) = -3. What follows?

The difference quotient of f(x)=x2f(x) = x^2 at 11, that is f(1+h)−f(1)h\frac{f(1 + h) - f(1)}{h}, simplifies to:

Where is the tangent to the graph of f(x)=x3−3xf(x) = x^3 - 3x flat?

What is the equation of the tangent to the graph of f(x)=x2f(x) = x^2 at (2,4)(2, 4)?

Flashcards for review

Flip a card and say whether you knew the answer. The ones you did not know come back at the end of the deck. Why it pays to come back to them in a few days is explained in the guide Spaced repetition.

Flashcards

  1. What does the derivative of a function at a point tell you?

    How fast the function is changing at that point. On the graph, it is the slope of the tangent.
  2. What is the definition of the derivative f′(x0)f'(x_0)?

    f′(x0)=lim⁡h→0f(x0+h)−f(x0)hf'(x_0) = \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h}, provided the limit exists and is finite.
  3. What is the difference quotient?

    The fraction f(x0+h)−f(x0)h\frac{f(x_0 + h) - f(x_0)}{h} - the slope of the secant through the points of the graph at x0x_0 and x0+hx_0 + h.
  4. What is the equation of the tangent to the graph at (x0,f(x0))(x_0, f(x_0))?

    y=f′(x0)(x−x0)+f(x0)y = f'(x_0)(x - x_0) + f(x_0)
  5. What is the derivative of x2x^2?

    (x2)′=2x(x^2)' = 2x
  6. What follows from f′(x0)<0f'(x_0) < 0?

    Near x0x_0 the function falls - the tangent slopes downwards.
  7. How is f′(1)f'(1) different from f′(x)f'(x)?

    f′(1)f'(1) is a number - the slope at one point. f′(x)f'(x) is a function - the slope at every point.
  8. Does ∣x∣|x| have a derivative at zero?

    No. Secants on the right have slope 11 and on the left −1-1, so there is no limit.
  9. Velocity and acceleration are the derivatives of what?

    Velocity is the derivative of position with respect to time; acceleration is the derivative of velocity.

Sources

We checked the facts on this page against these sources. All of them may be reused freely: they carry an open licence or are not covered by copyright.

  1. Wikipedia - Derivative · CC BY-SA 4.0
  2. Wikipedia - Tangent (the equation of the tangent line) · CC BY-SA 4.0
  3. Wikipedia - Differentiable function (|x| at zero) · CC BY-SA 4.0
  4. Wikipedia - Acceleration · CC BY-SA 4.0
  5. Wikipedia - Marginal cost · CC BY-SA 4.0
  6. Active Calculus (Matthew Boelkins, Grand Valley State University) - 1.1 How do we measure velocity? (instantaneous velocity as the limit of average velocities, the speedometer) · CC BY-SA 4.0
  7. Active Calculus (Matthew Boelkins, Grand Valley State University) - 1.3 The derivative of a function at a point (difference quotient, secant and tangent, the definition) · CC BY-SA 4.0
  8. Active Calculus (Matthew Boelkins, Grand Valley State University) - 1.4 The derivative function (f′(a) as a number, f′(x) as a function) · CC BY-SA 4.0
  9. Active Calculus (Matthew Boelkins, Grand Valley State University) - 1.5 Interpreting, estimating, and using the derivative (the rate of change of a temperature, the cost of making one more unit) · CC BY-SA 4.0
  10. Active Calculus (Matthew Boelkins, Grand Valley State University) - 1.6 The second derivative (acceleration as the rate of change of velocity) · CC BY-SA 4.0
  11. Active Calculus (Matthew Boelkins, Grand Valley State University) - 1.7 Limits, Continuity, and Differentiability (|x| has no derivative at 0) · CC BY-SA 4.0
  12. Active Calculus (Matthew Boelkins, Grand Valley State University) - 1.8 The Tangent Line Approximation (the equation of the tangent line) · CC BY-SA 4.0
  13. Active Calculus (Matthew Boelkins, Grand Valley State University) - 2.2 The sine and cosine functions (the derivative of sin x is cos x) · CC BY-SA 4.0
  14. Active Calculus (Matthew Boelkins, Grand Valley State University) - 2.8 Using Derivatives to Evaluate Limits (L’Hôpital’s rule) · CC BY-SA 4.0
  15. Active Calculus (Matthew Boelkins, Grand Valley State University) - 3.1 Using derivatives to identify extreme values (f′(c) = 0 at a peak or a dip, increasing and decreasing functions) · CC BY-SA 4.0
  16. Silvanus P. Thompson - Calculus Made Easy, 2nd edition (1914), chapters VIII, X and XI, Project Gutenberg (velocity and acceleration as derivatives, dy/dx as the slope of the curve, dy/dx = 0 at a maximum or minimum) · public domain
  17. CKE - Report on the 2026 matura in mathematics, task 12.2 (in Polish) · official document

Practise next

More explainers