Start the course

Derivatives

What is a derivative? Slope, rate of change, and the definition

8 min readUpdated

Quick answer

A derivative measures how fast a function's output is changing at one exact input: its instantaneous rate of change. On a graph it is the slope of the tangent line. It is defined as a limit: f′(a)= limh→0f(a+h)−f(a)h, the average rate of change over shorter and shorter intervals.

Key points
  • The derivative f′(a) is the slope of the tangent line at x=a and the instantaneous rate of change there.
  • It is the limit of average rates of change (secant slopes) as the interval shrinks to zero width.
  • Notations: f′(x), dydx and ddxf(x) all mean the same thing.
  • Its units are output units per input unit, such as meters per second.
  • A derivative doesn't exist at a corner, a vertical tangent, or a break in the graph.

What problem does the derivative solve?

Suppose a car's position, in meters, is known at every second. Its average speed over a stretch of time is easy: the change in position divided by the change in time. But a speedometer shows the speed at one instant, and over an instant no time passes, so the same division would be 00. The derivative is how calculus answers the instantaneous question. It works for any quantity that changes, not just position: the rate a tank fills, the rate a cost rises, the rate a population grows.

What is the average rate of change?

For a function f, the average rate of change from x=a to x=b is the change in the output divided by the change in the input:

average rate of change=f(b)−f(a)b−a

On a graph this is the slope of the secant line: the straight line through the two points (a,f(a)) and (b,f(b)). For f(x)=x2 from x=3 to x=4, the average rate of change is 16−94−3=7.

What is the definition of a derivative?

To get the rate at one instant, make the interval shorter and shorter. Write the second input as a+h, where h is the width of the interval. The average rate of change is then f(a+h)−f(a)h, called the difference quotient. Letting h shrink to 0 gives the rate at a itself:

Definition: derivative

The derivative of f at x=a is f′(a)= limh→0f(a+h)−f(a)h, if this limit exists. It is read "f prime of a".

The limit is needed because putting h=0 straight in gives 00. As in any 00 limit, we simplify until the h on the bottom cancels, then let h→0.

Worked example: A derivative from the definition

For f(x)=x2, find f′(3).

  1. Write the difference quotient: f(3+h)−f(3)h= (3+h)2−9h.
  2. Multiply out the bracket: (3+h)2=9+6h+h2, so the top is 9+6h+h2−9=6h+h2.
  3. Factor h out of the top and cancel: h(6+h)h= 6+h, for h≠0.
  4. Let h→0: 6+h→6.

Answer: f′(3)=6

What does a derivative mean on a graph?

As h shrinks, the second point slides along the curve toward (a,f(a)), and the secant line swings toward a limiting position: the tangent line, the line that just touches the curve at that point and points in the direction the curve is heading there. The derivative f′(a) is its slope.

123451015secant, slope 7tangent, slope 6
y=x2: the secant line through x=3 and x=4 has slope 7; the tangent line at x=3 has slope f′(3)=6.

Since we know a point on the tangent line, (a,f(a)), and its slope, f′(a), its equation follows from the point-slope form of a line:

y=f(a)+f′(a)(x−a)
Worked example: A tangent line

Find the tangent line to y=x2 at x=3.

  1. The point: f(3)=9, so the line passes through (3,9).
  2. The slope: f′(3)=6, from the example above.
  3. Point-slope form: y=9+6(x−3).
  4. Simplify: y=9+6x−18=6x−9.

Answer: y=6x−9

What is the derivative as a function?

Doing the calculation at a general input x instead of one number gives a new function, f′(x), whose output at each x is the slope of f there. This is called the derivative function, or simply the derivative of f.

Worked example: The derivative function

For f(x)=x2−4x, find f′(x) from the definition.

  1. f(x+h)= (x+h)2−4(x+h)= x2+2xh+h2−4x−4h.
  2. Subtract f(x)=x2−4x: the top is 2xh+h2−4h.
  3. Divide by h: h(2x+h−4)h= 2x+h−4.
  4. Let h→0: f′(x)=2x−4.

Answer: f′(x)=2x−4. For example, the slope at x=3 is f′(3)=2, and at x=2 it is 0: the bottom of the parabola.

Tip

Working from the definition every time would be slow. The derivative rules are shortcuts proved from this definition; for example the power rule gives ddxx2=2x in one step.

What are the different notations for derivatives?

NotationRead asUsually used when
f′(x)"f prime of x"the function has a name
dydx"dy by dx"the output is called y; it reminds you the derivative is a change in y over a change in x
ddx(x2)"the derivative of x2"differentiating an expression directly
y′, s′(t), dVdtprime or Leibniz forms with other lettersthe variables have other names, such as time t

The dydx form, called Leibniz notation, isn't a fraction you can cancel, but it behaves like one in useful ways, as the chain rule shows.

What does a derivative tell you in real life?

A derivative is a rate, so it carries units: the output's units divided by the input's units. If s(t) is a position in meters after t seconds, then s′(t) is in meters per second: it is the velocity. If C(x) is the cost in dollars of making x items, C′(x) is in dollars per item: about how much one more item costs.

Worked example: Interpreting a derivative

A ball's height is s(t)=20t−5t2 meters after t seconds, so s′(t)=20−10t. Find and interpret s′(1) and s′(3).

  1. s′(1)=20−10=10: one second in, the ball is rising at 10 meters per second.
  2. s′(3)=20−30=−10: at three seconds it is falling at 10 meters per second; the minus sign means the height is decreasing.

Answer: 10 m/s (rising) and −10 m/s (falling).

Common mistake

Confusing f(a) with f′(a). f(a) is the value (how high the graph is, or where the ball is); f′(a) is the rate (how steep the graph is, or how fast the ball moves). A function can be large while its derivative is 0, at the top of a hill.

When does a derivative not exist?

The limit in the definition must exist, and there are three common ways it fails:

  • A corner, like |x| at 0: the slopes from the left and right disagree, so there's no single tangent line.
  • A vertical tangent, like x3 at 0: the tangent line is vertical, and a vertical line has no slope.
  • A break in the graph (a discontinuity): if a function isn't continuous at a, it can't have a derivative there.
-2-112-0.50.511.522.5slope −1slope 1corner
y=|x| has slope −1 on the left and 1 on the right, so at the corner x=0 there is no derivative.

Learn it step by step

The full lessons in the course explain this from the ground up, with graphs, worked examples, and practice problems that each have a complete worked solution.

Open the lesson

Frequently asked questions

What is a derivative in simple terms?

It's how fast something is changing at one instant. On a graph, it's how steep the curve is at a point: the slope of the tangent line.

What is the difference between a derivative and a slope?

A straight line has one slope everywhere. A curve's steepness changes from point to point, and the derivative gives the slope at each point, as the slope of the tangent line there.

Why is the derivative defined with a limit?

Because a rate at a single instant would mean dividing by an interval of zero width, which gives 00. The limit finds the value the average rates approach as the interval shrinks.

What does it mean if the derivative is zero?

The function is momentarily not changing: the tangent line is horizontal. This happens at the tops and bottoms of hills, which is why derivatives are used to find maximum and minimum values.

What does a negative derivative mean?

The function is decreasing at that point: as the input increases, the output goes down, and the tangent line slopes downward.

Do I always have to use the limit definition?

No. Once the rules are learned (power, product, quotient and chain rules), you only use the definition when a problem asks for it or to understand where a rule comes from.