Hide outline
Share guideFeedback
Guide
Partial Derivatives: Change One Input at a Time

Partial Derivatives: Change One Input at a Time

Learn to read and compute partial derivatives so you can predict how multivariable functions respond to one input, interpret slopes on surfaces and contour maps, and connect single-direction rates of change to the gradient for real modeling and optimization.

A function like f(x,y)f(x,y) can change for two reasons at once. If your output is temperature, cost, altitude, or loss, it is hard to say what is causing the change when xx and yy both move. Partial derivatives fix that by asking a simpler question. How fast does ff change when only one input changes and the others stay frozen? That one-at-a-time slope is the basic tool behind reading 3D graphs, navigating contour maps, and building linear approximations that work locally. Let’s see how the slope differs depending on which input we nudge:

Partial derivatives are one-direction slopes

At a point (x0,y0)(x_0,y_0), the partial derivative with respect to xx is the slope you see when you move in the xx direction and refuse to let yy drift. Formally, it is an ordinary derivative of a one-variable function created by freezing yy.

If ff depends on two variables, you get two first partials:

  • fx(x0,y0)\dfrac{\partial f}{\partial x}(x_0,y_0) measures change in ff per unit xx when yy is fixed at y0y_0
  • fy(x0,y0)\dfrac{\partial f}{\partial y}(x_0,y_0) measures change in ff per unit yy when xx is fixed at x0x_0

You can think of these as two different cross-sections through the same surface. One slice runs parallel to the xx axis, the other runs parallel to the yy axis.

Freeze the rest
When you take /x\partial/\partial x, every symbol except xx acts like a constant.

Notation that tells you what moved

The curly \partial is a reminder that the function has more than one input. The fraction-style notation tells you output over input, and the symbol in the denominator is the only one allowed to vary.

You will see several equivalent ways to write the same idea:

  • fx\dfrac{\partial f}{\partial x} and fxf_x both mean the partial derivative of ff with respect to xx
  • xf(x,y)\dfrac{\partial}{\partial x}f(x,y) emphasizes the operation, differentiate with respect to xx
  • fx(x0,y0)f_x(x_0,y_0) means evaluate the partial derivative at the specific point (x0,y0)(x_0,y_0)

Holding others constant means you temporarily treat them like numbers. If f(x,y)=x2y+7yf(x,y)=x^2y+7y, then while computing f/x\partial f/\partial x, the entire yy acts like a constant multiplier. While computing f/y\partial f/\partial y, the x2x^2 acts like a constant factor.

The language can be subtle. Independent variables are the inputs you are free to choose. The partial derivative tells you what happens if you change one independent variable while the rest are held fixed, even if in a real system they might be related. This is a modeling choice that isolates one effect.

Keep these terms close at hand as we use them:

Connect the formula to pictures and rates

A partial derivative is a rate per unit. If ff is measured in dollars and xx is measured in hours, then f/x\partial f/\partial x is dollars per hour, but only under the rule that the other inputs do not change.

Cross-sections on a surface

On a 3D surface z=f(x,y)z=f(x,y), freezing y=y0y=y_0 turns the surface into a 2D curve z=f(x,y0)z=f(x,y_0). The slope of that curve at x0x_0 is f/x(x0,y0)\partial f/\partial x(x_0,y_0). Doing the same with x=x0x=x_0 gives f/y(x0,y0)\partial f/\partial y(x_0,y_0).

Reading the same idea on a contour map

On a contour map, you do not see height directly. You see level curves, which are curves where f(x,y)f(x,y) stays constant. Large partial derivatives show up as tightly spaced contours in the direction you are moving, because a small horizontal move produces a big change in ff.

Units reveal meaning
If the units in f/x\partial f/\partial x feel wrong, the setup is wrong.

Here is the same function shown as a surface and as contours, so we can connect what f/x\partial f/\partial x is saying in each view:

Compute partial derivatives by pretending

A partial derivative is computed like an ordinary derivative, except you pretend every other variable is a constant. This is the whole method.

A featured-snippet way to remember it is this. To find fx\dfrac{\partial f}{\partial x}, differentiate with respect to xx while treating y,z,y,z, and any other variables as constants. To find fy\dfrac{\partial f}{\partial y}, differentiate with respect to yy while treating x,z,x,z, and the rest as constants. Only after differentiating do you plug in a point.

Quick examples

Let f(x,y)=3x2y+5y4sinxf(x,y)=3x^2y+5y-4\sin x.

  • fx=6xy4cosx\dfrac{\partial f}{\partial x}=6xy-4\cos x because yy is a constant multiplier and 5y5y becomes a constant
  • fy=3x2+5\dfrac{\partial f}{\partial y}=3x^2+5 because 3x23x^2 is constant with respect to yy and 4sinx-4\sin x becomes a constant

If f(x,y)=exyf(x,y)=e^{xy}, then

  • fx=yexy\dfrac{\partial f}{\partial x}=ye^{xy}
  • fy=xexy\dfrac{\partial f}{\partial y}=xe^{xy}

because xyxy is a product but only one factor varies at a time.

Try building your own f(x,y)f(x,y) terms and watch the two partials change:

Pitfalls that waste the most time

The rules are simple, but the mistakes are predictable.

One is forgetting what is frozen. When taking /x\partial/\partial x, any yy you see is treated like a constant, even if it is sitting inside something like sin(xy)\sin(xy).

Another is evaluating too early. You differentiate first to get a general expression, then substitute (x0,y0)(x_0,y_0). Doing it in the opposite order often erases the dependence you needed to differentiate.

A third is mixing up partial change with total change. If both xx and yy actually change, then f/x\partial f/\partial x alone does not describe the full change in ff. It describes the contribution from xx moving while yy is held fixed.

Differentiate, then plug
Points belong at the end, not in the middle.

Check these common gotchas against your own work:

From partials to the gradient

Once you have all first partial derivatives, you can bundle them into one object that points where ff increases fastest. Gradient means the vector of partial derivatives:

f(x,y)=fx(x,y),fy(x,y).\nabla f(x,y)=\left\langle \frac{\partial f}{\partial x}(x,y),\frac{\partial f}{\partial y}(x,y)\right\rangle.

At a point, f(x0,y0)\nabla f(x_0,y_0) points in the direction of steepest ascent on the surface, and it is perpendicular to the level curve through that point on a contour map. The two partials are still in there. They are just the components along the coordinate axes, while the gradient answers a broader question about the best direction to move.

The gradient field view makes this click quickly:

Next steps that make partials stick

Practice is fastest when you separate two skills. One is computing partials mechanically. The other is interpreting them with units and a picture. Pick a handful of functions, compute f/x\partial f/\partial x and f/y\partial f/\partial y, then evaluate them at the same point and explain what each number means in one sentence.

When that feels natural, move to optimization with critical points where f=0\nabla f=\vec{0}, and to linearization where partials become the coefficients of a local approximation. Write down one function you care about and we can choose points to interpret next.

Was this lesson helpful?
Dive Deeper

Generate a follow-up sub-lesson on any aspect of this topic

Related content