Skip to content

MATHPLAY 01 / PARTIAL DERIVATIVES

Two inputs.
Two slopes.

What changes when
only one input moves?

For a curve with one input, a derivative is the tangent slope at a point. A surface has two inputs, x and y. The slope depends on which direction you move, so one number is not enough.

This English page has a short interactive preview. The 13-step lesson, including least squares, is currently available in Japanese.

TRY MATH / MOVE THE POINTINTERACTIVE

One point, two cuts through the surface

The surface is f(x, y) = x² + xy + y². Cyan follows x while y stays fixed; magenta follows y while x stays fixed.

At P (1.00, −1.00), the x-slope is +1.00 and the y-slope is −1.00.

Change one coordinate at a time. The other slope may change too, because this surface contains an xy term.

FROM A CURVE TO A SURFACE

Hold one input fixed, then take the slope.

Keep y fixed and move only x: that cross-section is a curve, and its tangent slope is ∂f/∂x = 2x + y. Keep x fixed instead, and the other slope is ∂f/∂y = x + 2y.

At P = (1, −1), the two slopes are +1 and −1. A small move (Δx, Δy) changes the height by approximately (∂f/∂x)Δx + (∂f/∂y)Δy. These two slopes form the gradient, ∇f = (∂f/∂x, ∂f/∂y).

The full lesson follows these ideas into the tangent plane and the bottom of a least-squares surface, where both partial derivatives are zero.

// CONTINUE IN STATPLAY

Simple regression shows the fitted line move with the data. Multiple regression shows what changes when another predictor enters the model.