Math Playground
Calculus

Partial derivatives

When a function has many inputs, slope it one variable at a time.

When a function depends on more than one variable, you can ask 'what's the slope in the x-direction?' or 'in the y-direction?'. Each is a partial derivative.

Quick check

For f(x, y) = x²y + 3y, what is ∂f/∂y?

One slope per direction

A surface z = f(x, y) doesn't have a single slope — it tilts differently depending on which way you walk. ∂f/∂x is the slope facing the x-direction (freeze y, differentiate as usual); ∂f/∂y is the slope facing the y-direction (freeze x). Everything you know about single-variable derivatives still applies — you just hold the other variables still.

Gradient

Bundle the partials into a vector: it points in the direction of steepest ascent, and its length is how steep that is. This is the heart of gradient descent in machine learning.

Your turn

f(x, y) = x³ + 4xy² − y³. Find ∂f/∂x and ∂f/∂y.

Partial derivative notation

Slope in the x-direction, holding y constant

Try it

f(x, y) = x²y + 3y. Find ∂f/∂x.

Treat y as a constant: ∂f/∂x = 2xy.