AI Glossary / Mathematics and optimization / Intermediate

Partial derivative

Definition

A partial derivative measures how a function changes as one input variable changes while its other input coordinates are held fixed. It is an instantaneous, local rate of change, defined when the appropriate limit exists. In machine learning, partial derivatives of a loss with respect to model parameters are the components used to form a gradient.

What it means

A function can depend on several quantities at once. Asking how the output changes with one quantity requires specifying what happens to the others. A partial derivative answers the particular mathematical question in which they remain fixed.

For a function f(x, y), the notation ∂f/∂x means differentiation with respect to x while treating y as constant. It does not mean y has no influence on the function. The derivative itself can depend on the current value of y, so sensitivity to one variable can vary with the setting of another.

How it works

Compare the function at the original point and at a nearby point where only the selected coordinate has changed. Divide the output difference by the coordinate change and consider the limit as that change approaches zero. If the limit exists, it is the partial derivative at that point.

For a differentiable scalar function, collecting all coordinate partial derivatives forms the gradient. The gradient gives a first-order approximation to the change caused by small simultaneous input changes through its dot product with the change vector.

When inputs are linked by another relationship, the relevant rate along that relationship requires the chain rule. Holding a variable fixed and allowing it to move with another variable are different questions. Furthermore, the existence of coordinate partial derivatives at a point alone does not guarantee full differentiability there.

Three practical examples

1. Model training: calculate how a small change in one coefficient affects training loss while the other parameter coordinates remain fixed.

2. Sensitivity analysis: inspect how a simulation's output responds locally to one modeled input under a stated fixed-input comparison.

3. Implementation checking: compare an analytic or automatically computed partial derivative with a finite-difference approximation on a small, smooth test case.

Think of it this way

Think of adjusting one knob on a mixing desk while leaving the others in place. The observed local change tells you that knob's sensitivity at the current configuration. The analogy has limits: physical controls can be coupled, and finite knob movements can produce nonlinear effects that a local derivative only approximates.

Worked example

Let f(x, y) = x²y + 3y². Holding y fixed gives ∂f/∂x = 2xy. Holding x fixed gives ∂f/∂y = x² + 6y.

At x = 2 and y = 3, the function value is 12 + 27 = 39. Its partial derivatives are 12 and 22. Increasing only x by 0.01 gives f(2.01, 3) = 39.1203, an actual increase of 0.1203. The local linear approximation predicts 12 × 0.01 = 0.12.

Increasing only y by 0.01 instead gives f(2, 3.01) = 39.2203. Its increase of 0.2203 is close to the derivative-based prediction 22 × 0.01 = 0.22. The small differences arise from second-order terms, not incorrect differentiation.

Now suppose y must move according to y = 1.5x. At the same point (2, 3), the rate of change along this path is ∂f/∂x + (∂f/∂y)(dy/dx) = 12 + 22 × 1.5 = 45.

Thus the partial rate 12 and the path rate 45 are both correct answers to different questions. Substituting y = 1.5x first gives f = 1.5x³ + 6.75x², whose ordinary derivative at x = 2 is also 45. These calculations are original and hand-checked.

Illustrative case study

Fictional case: Fern Operations uses a differentiable simulation to explore process settings. An analyst reports the partial derivative of output with respect to a speed setting as if it described the actual operating response.

An engineer points out that a second setting is automatically adjusted whenever speed changes. The team calculates the rate along that linked adjustment policy and labels the fixed-coordinate sensitivity separately. It checks small perturbations within the allowed operating range before relying on either calculation. This scenario illustrates the meaning of a derivative, not a measured process benefit or a causal guarantee from observational data.

Common misconceptions and mistakes

A partial derivative is not the same as a finite difference: the derivative is a limit, while a finite difference uses a chosen nonzero step. Very large steps can miss local behavior, and extremely small numerical steps can suffer from floating-point cancellation.

Zero partial derivatives do not automatically mean a minimum. A point can be a maximum, saddle point, or another stationary configuration. A derivative can also fail to exist at a corner, such as the absolute-value function at zero.

Finally, a model's sensitivity is not automatically a real-world causal effect. The function and its assumptions determine what the mathematical calculation describes.

Business use

Partial derivatives help teams inspect model updates and understand local sensitivity, but their units and conditioning must be clear. A derivative measured per dollar is not directly comparable with one measured per thousand dollars without adjustment.

Record which coordinates are fixed and whether the investigated change stays inside the valid input domain. For constrained or coupled decisions, examine feasible directions rather than suggesting changes that the real system cannot make independently.

People also ask

Does a partial derivative ignore other inputs entirely?

No. Their values are held fixed for the differentiation, but they may influence its result.

Can it be negative?

Yes. A negative value indicates a local decrease as that coordinate increases, under the stated fixed-coordinate comparison.

Is a partial derivative itself a prediction?

It predicts a first-order change for a sufficiently small perturbation, not generally the complete output after a large change.

Check your understanding

If y changes with x, is ∂f/∂x alone usually the full rate of change along the resulting path?

Answer: No. The chain rule adds the contribution from y's change and any other dependent inputs.

Related terms

  • Gradient
  • Chain rule
  • Directional derivative
  • Jacobian
  • Automatic differentiation
  • derivative
  • finite difference

Learn next

derive a gradient from coordinate partial derivatives, then compare a coordinate change with a feasible direction in a constrained model.

  • Gradient

More in Mathematics and optimization

  • Absolute error loss - Absolute error loss measures a numerical prediction's error as the absolute difference between its predicted and reference values: L(y,y-hat)=|y-y-hat|.
  • Active-set method - An active-set method is an optimization approach that works with a changing subset of constraints believed to be tight at the solution.
  • Adjoint state method - The adjoint state method computes how a chosen objective changes when the parameters of a mathematical model change.
  • Σ-algebra
  • Algebraic connectivity - Algebraic connectivity is the second-smallest eigenvalue of a graph's Laplacian matrix.
  • Algorithm IMED - Algorithm IMED, short for Indexed Minimum Empirical Divergence, is a method for choosing actions in a stochastic multi-armed bandit problem.

Sources

Primary sources: Aalto Dictionary of Machine Learning, partial derivative: https://aaltodictionaryofml.github.io/ADictML_Main.pdf ; Google's Machine Learning Glossary: https://developers.google.com/machine-learning/glossary#partial-derivative . The definitions were read. The polynomial, path comparison, and fictional case are original illustrations.

Previous: Partial Dependency Next: Partial information

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer