Home / Maths for AI / Symbols / Calculus

Derivative

Say it: "f prime of x", "d f d x"

What it means

The rate of change (slope) of ff at xx, also written dfdx\frac{df}{dx}. Positive: ff is increasing; zero: flat (maybe a minimum or maximum).

Example

f(x)=x2  ⇒  f′(x)=2x,f′(3)=6f(x) = x^2 \;\Rightarrow\; f'(x) = 2x, \quad f'(3) = 6

At x = 3 the curve rises 6 for each step to the right.

In code

f = lambda x: x ** 2
h = 1e-6
print(round((f(3 + h) - f(3)) / h, 3))

Output

6.0

Where it appears in machine learning

Training follows derivatives downhill; backpropagation computes them for every weight.

Related symbols

Learn it properly in the free lesson Derivatives & the Chain Rule, with practice questions that check your answers.