Essay · Two-variable functions
Implicit differentiation is a level curve's slope
where dy/dx = −fx/fy comes from, and why the minus sign was never arbitrary
An equation in x and y is a level curve of a surface:
the set of floor points whose height comes out the same. Walking along it means
refusing to change altitude, so the slope in your walking direction has to be
zero — and writing that one condition down hands you
dy/dx = −fx/fy, minus sign and all.
Implicit differentiation is usually taught as a manoeuvre. Differentiate both sides, remember that
y is secretly a function of x so its derivative picks up a
dy/dx, collect the terms, divide. It works, and it explains nothing: not where the
minus sign came from, not why fy ended up underneath, and not what you were
taking the derivative of.
The surface hiding inside the equation
Take x² + y² = 25. The left-hand side is a machine that eats two numbers and
returns one: f(x, y) = x² + y². Feed it every point of the floor and the
outputs trace a surface overhead, here a bowl. The equation isn't asking about the whole surface.
It is picking out the floor points where the bowl happens to be exactly 25 high.
That set of points is a level curve, the same thing a map calls a contour line: one height, all the places that reach it. In this case it is the circle of radius 5, which is the only reason the equation looked like a circle in the first place.
So "the slope of x² + y² = 25" is a question about a curve drawn on the
floor, and the surface overhead is what decides where that curve goes.
Every direction has its own slope
Stand at one point of the floor. On a line there were only two ways to nudge, forward and back. On a floor there are three hundred and sixty degrees of them: the ground climbs one way, falls another, and does something in between everywhere else. Each direction has a slope of its own.
Two of those directions come with names. Nudge one step east, holding north fixed, and the rise is
fx, the partial derivative with respect to x. Nudge one step
north and the rise is fy. Call them α and
β.
Every other direction is built out of those two. A unit step at angle θ is
cosθ of the east block plus sinθ of the north block, and
because the surface is locally a tilted plane, the rise is built the same way:
rise = α cosθ + β sinθ
That is the directional derivative, and it is the same counting of building blocks that makes the columns of a matrix the landing spots of the basis vectors. Two measurements, and all three hundred and sixty directions come along for free.
Staying level is asking for a slope of zero
Now put a hiker on the level curve. Walking along it means the altitude never budges, which means the slope in the direction of walking is zero. Set the rise to zero and see what that forces:
α cosθ + β sinθ = 0
sinθ / cosθ = −α / β
tanθ = −α / β
And tanθ is rise over run in the plane you are standing on, north-change over
east-change, which is precisely dy/dx. So
dy/dx = −fx / fy
One line, no chain rule, and the two features that always look arbitrary have arrived with reasons
attached. The minus sign came from setting a sum to zero. The fy in the
denominator came from dividing by it.
Why the minus sign had to be there
Suppose the ground rises as you walk east, and rises again as you walk north. Both partials are positive. If you want to hold your altitude, going east is now a debt: you have gained height, and the only way to pay it back is to go south. East and north cannot both be increasing along a path that stays flat.
That is all the minus sign says. One of the two moves has to undo the other, so their signs must
disagree. The ratio α/β sets how much undoing is needed; the minus sign
settles who does it.
What happens when the denominator dies
If fy = 0 at your point, moving north or south does not change your height
at all. Then the level curve is the north-south line itself: you can walk it forever without
climbing. A north-south line in the xy-plane has a vertical slope, and
dy/dx has no finite value there.
The formula does not hide that. The denominator goes to zero and hands you the failure in the open,
which is more than the memorised procedure ever did. On the circle
x² + y² = 25 those are the two points (±5, 0), where the
circle is standing straight up.
The same sentence in gradient language
Collect the two partials into one vector, ∇f = (fx, fy).
Then the rise in direction u is the dot product ∇f · u, and
the level-curve condition is
∇f · u = 0
A dot product of zero is the definition of perpendicular. So "walking along a contour keeps you level" and "the gradient is perpendicular to every contour line" are one fact wearing two costumes. It is also why the gradient is the steepest way up: it is exactly the direction you are refusing to take when you stay level.
Three that take ten seconds each
| Equation | fx | fy | dy/dx | At a point |
|---|---|---|---|---|
x² + y² = 25 | 2x | 2y | −x/y | at (3, 4): −3/4 |
xy = 12 | y | x | −y/x | at (3, 4): −4/3 |
x³ + y³ = 9xy | 3x² − 9y | 3y² − 9x | −(x² − 3y)/(y² − 3x) | at (2, 4): 4/5 |
The first row is worth checking against something you already trust. At (3, 4) the
radius has slope 4/3, and a tangent perpendicular to it has slope
−3/4. Which is what the formula said, and also what "the gradient is
perpendicular to the contour" said, since the gradient (6, 8) points straight out along
that radius.
Why an economics series stops here
Because an indifference curve is a level curve. A utility function U(x, y) is a surface
over a floor of bundles, and an indifference curve is one contour of it: every bundle that leaves
you equally happy. The marginal rate of substitution is minus the slope of that curve, so the
formula above already says
MRS = −dy/dx = Ux / Uy = MUx / MUy
which most students meet as a definition and never as a consequence. The same reading turns
isoquants and MRTS into the identical sentence with different letters, and it sets up
the tangency condition MRS = Px/Py: where the indifference curve
just touches the budget line the two curves run the same way, so their gradients line up. Every one
of those is a derivative in a business suit.
Go stand on it
Contour lines are easier to believe when the hill is under your feet. Open World Discover builds its terrain from a function you type in, so you can walk a level curve and watch the height readout refuse to move.