MATH 250 · Mathematics for Economics II

Partial Derivatives

Freeze every input but one and take an ordinary derivative: that is how economists measure one-at-a-time marginal effects.

Key takeaways

  • A partial derivative is the rate of change of the output when one input moves and all the others stay fixed.
  • To compute it, treat the other inputs as ordinary constants and use the usual derivative rules.
  • In economics, partial derivatives are marginal effects: marginal product, marginal utility, marginal cost of one input.
  • Second partial derivatives tell you how a marginal effect itself changes, and cross partials show how inputs interact.
  • Mixed partials taken in either order give the same answer for the smooth functions we use in this course.

Priya runs a bike repair shop. Last week she hired one more mechanic, and the shop fixed more bikes. This week she bought one more repair stand, and the shop fixed more bikes again. Her cousin asks a fair question: "Which was worth more, the mechanic or the stand?"

You cannot answer by adding both at once. You have to change one thing and hold the other steady, the way a scientist changes one setting per experiment. Math has a tool built for this. It is called the partial derivative, and it is the star of multivariable economics.

The idea: change one thing at a time

Recall the derivative as a marginal value: for a one-input function, f′(x) tells you how much the output rises when x rises by one small unit. Now suppose the output depends on two inputs, as in the last lesson. Priya's shop has output

Q(K, L) = 2 × K × L

where K is the number of repair stands and L is the number of mechanics. Suppose she has K = 3 stands and L = 4 mechanics. Then Q = 2 × 3 × 4 = 24 bikes a week.

Experiment one: freeze K at 3 and add a mechanic. With L = 5, Q = 2 × 3 × 5 = 30. The extra mechanic added 30 − 24 = 6 bikes.

Experiment two: freeze L at 4 and add a stand. With K = 4, Q = 2 × 4 × 4 = 32. The extra stand added 32 − 24 = 8 bikes.

Each experiment answers a different question, and each gives a different answer. The partial derivative is the tidy way to get these answers for tiny changes. We write the partial derivative of Q with respect to L as ∂Q/∂L (say "partial Q, partial L"). The curly ∂ replaces the straight d to warn you that other inputs exist and are being held still. You will also see the shorthand Q_L or f_L.

What a partial derivative says
∂Q/∂L = lim ΔQ/ΔL with K fixed ∂Q/∂L = Partial derivative How much output changes per extra unit of labor. lim ΔQ/ΔL = Ratio of changes Change in output divided by change in labor, as the change shrinks. K fixed = The frozen input Stands stay at their current number. ∂Q/∂L = lim ΔQ/ΔL with K fixed ∂Q/∂L = Partial derivative How much output changes per extra unit of labor. lim ΔQ/ΔL = Ratio of changes Change in output divided by change in labor, as the change shrinks. K fixed = The frozen input Stands stay at their current number.

The little curly d means: other inputs are frozen.

How to compute one

The rule is gentle: treat every other variable as a plain number, then differentiate as usual. If you can do one-variable derivatives, you already know almost everything. See the rules of differentiation if the power or product rule feels rusty.

For Q = 2KL:

  • Holding K fixed, 2K is just a number, like 2 × 3 = 6. So Q = (2K) × L, and the derivative with respect to L is the number in front: ∂Q/∂L = 2K.
  • Holding L fixed, Q = (2L) × K, so ∂Q/∂K = 2L.

At K = 3, L = 4: ∂Q/∂L = 2 × 3 = 6 and ∂Q/∂K = 2 × 4 = 8. These match the two experiments exactly, because this particular Q is straight in each input. Priya now has her answer: the stand is worth 8 bikes a week, the mechanic 6. (Whether the stand is a better buy depends on what each costs, a question for later.)

Taking a partial derivative in three steps
1 Pick the input Choose the one variable you are asking about, such as L. 2 Freeze the rest Treat every other variable as a constant number. 3 Differentiate Use the usual rules. The answer is the partial derivative. Pick the input Choose the one variable you are asking about, such as L. 1 Freeze the rest Treat every other variable as a constant number. 2 Differentiate Use the usual rules. The answer is the partial derivative. 3

A curved example

Most real functions are not straight, so let's try one that curves. Suppose Dara's happiness from x cupcakes and y coffees is

U(x, y) = x² × y

(Made up, but it says cupcakes matter more than coffee.) At x = 3 and y = 4, U = 9 × 4 = 36.

To find ∂U/∂x, treat y as a constant. Then U = y × x², and the power rule gives 2x, so

∂U/∂x = 2 × x × y = 2 × 3 × 4 = 24

To find ∂U/∂y, treat x as constant. Then U = x² × y, a constant times y, so

∂U/∂y = x² = 9

Economists call these the marginal utility of cupcakes (24) and of coffee (9) at that basket. Reality check: raise x from 3 to 3.01. Then U = (3.01)² × 4 = 9.0601 × 4 = 36.2404. The gain is 0.2404 for a step of 0.01, so the rate is 0.2404 ÷ 0.01 = 24.04. Very close to 24. The partial derivative is the limit of that ratio as the step shrinks to nothing.

Here is what that looks like. Freeze y = 4 and U = 4x². That is an ordinary curve in x. The partial derivative at x = 3 is the slope of the line that just touches that curve.

A slice of U = x² × y with y frozen at 4
Utility (U) U = 4x² Tangent at x = 3 x = 3 Slope there = 24 Cupcakes (x) Utility (U) U = 4x² Tangent at x = 3 x = 3 Slope there = 24 Cupcakes (x)

Check the tangent points: from (3, 36) with slope 24, going back one step gives 36 − 24 = 12 at x = 2, and forward gives 36 + 24 = 60 at x = 4. Those are the two ends of the dashed line.

Second partials and cross partials

You can differentiate again. The second partial ∂²U/∂x² (also written U_xx) asks how the marginal utility of cupcakes changes as you eat more cupcakes. For U = x²y:

U_x  = 2xy
U_xx = 2y   = 2 × 4 = 8  (at y = 4)
U_y  = x²
U_yy = 0

A positive U_xx says each extra cupcake is worth more than the last, which is unusual in real life. We chose a function that is easy to compute, not the most realistic one. In later lessons on second-order conditions, you will meet functions where the marginal value falls as you get more, the usual case.

The more interesting object is the cross partial: differentiate with respect to x, then with respect to y.

U_x  = 2xy
U_xy = ∂(2xy)/∂y = 2x = 2 × 3 = 6

Do it the other way: U_y = x², and then ∂(x²)/∂x = 2x = 6. Same answer. This is no accident. For smooth functions (continuous second partials), the order does not matter. The result is called Young's theorem, and it saves work: compute whichever order is easier.

What does the cross partial mean? U_xy = 6 says that having more coffee raises the marginal utility of a cupcake. The two goods complement each other. If the cross partial were negative, more of one good would make the other less valuable, as with two substitutes. For the bike shop, Q_KL = 2 is positive: a mechanic is more productive when there are more stands to work at. That is common sense, now with a number on it.

Units, and a second story

Always attach units to a partial derivative. The answer 6 for ∂Q/∂L means 6 bikes per week for each extra mechanic. The answer 8 for ∂Q/∂K means 8 bikes per week for each extra stand. Units keep you honest: you cannot compare "per mechanic" with "per stand" until you attach prices.

Let's do exactly that. Suppose a mechanic costs Priya $900 a week and a stand costs $1,000 a week to rent. Then at K = 3 and L = 4:

Bikes per dollar, mechanic: 6 ÷ 900 = 0.00667
Bikes per dollar, stand:    8 ÷ 1,000 = 0.008

The stand wins, by a small margin. A manager who sees this might shift money from mechanics to stands. As she does, though, the partial derivatives change. With more stands, ∂Q/∂L = 2K rises, so each mechanic becomes more productive. The process stops when the bikes per dollar of each input are equal. That balancing rule is a famous result in economics, and you will derive it properly in the lesson on Lagrange multipliers.

Now a cost example. A food truck's weekly cost depends on the number of burgers b and the number of salads s it makes:

C(b, s) = 200 + 3b + 2s + 0.01 × b × s

The $200 is a fixed cost. Each burger costs $3 in ingredients, each salad $2, and the last term says that making both together causes a little extra crowding in the kitchen. Then:

∂C/∂b = 3 + 0.01s
∂C/∂s = 2 + 0.01b

At b = 100 burgers and s = 50 salads, the marginal cost of one more burger is 3 + 0.01 × 50 = $3.50, and of one more salad 2 + 0.01 × 100 = $3.00. Notice that the marginal cost of a burger depends on how many salads are being made. The cross partial C_bs = 0.01 is positive: the two products compete for the same kitchen, so each makes the other a little more costly. Economists call such products related in production.

Partial derivatives also appear in the demand for goods. If the quantity of burgers demanded depends on the burger price and on the salad price, the partial with respect to the salad price shows whether salads are substitutes or complements for burgers. You will use that idea again and again in comparative statics.

A common mistake

The most frequent slip is forgetting to freeze. Students differentiate U = x²y with respect to x and write 2xy + x², as if y changed too. That extra x² comes from also differentiating y, which belongs to the other partial derivative. If you are asked for ∂U/∂x, y is a number. Period.

A second mistake is mixing up the notation: ∂U/∂x is not a fraction you can cancel the ∂ from. Read it as one symbol, "the partial of U with respect to x."

A third: assuming a partial derivative tells the whole story of a move that changes both inputs. If Priya adds a stand and a mechanic together, you cannot just add 8 and 6. The two effects interact through the cross partial. The next lesson, total differentials and the chain rule, handles moves where everything changes at once.

Words to know

Partial derivative the rate of change of a function with respect to one input while all other inputs are held fixed.

Marginal product the extra output from one more unit of one input, found as a partial derivative of the production function.

Marginal utility the extra happiness from one more unit of one good, found as a partial derivative of utility.

Second partial derivative the partial derivative of a partial derivative, showing how a marginal effect itself changes.

Cross partial the second partial taken with respect to two different inputs, showing how the inputs interact.

Young's theorem for smooth functions, the two cross partials are equal, so the order of differentiation does not matter.

Check yourself

  1. For Q = 2KL, find ∂Q/∂K and ∂Q/∂L at K = 5, L = 2.
  2. For U = x²y, find the marginal utility of coffee (∂U/∂y) at x = 5, y = 1.
  3. Find both partial derivatives of f(x, y) = 3x + 5y + xy at the point (2, 4).
  4. For Q = 2KL the one-unit step gave exactly the partial derivative (6 bikes), but for U = x²y the step from x = 3 to x = 4 gains 28 while the partial at x = 3 is 24 (with y = 4). Explain why.
  5. A student writes ∂(x²y)/∂x = 2xy + x². What went wrong?
  6. If U_xy is positive, are the two goods more like complements or substitutes? Explain.
Show the answers
  1. ∂Q/∂K = 2L = 2 × 2 = 4 and ∂Q/∂L = 2K = 2 × 5 = 10.
  2. ∂U/∂y = x² = 25, so the marginal utility of coffee is 25.
  3. f_x = 3 + y = 3 + 4 = 7 and f_y = 5 + x = 5 + 2 = 7.
  4. Q = 2KL is straight in each input, so any step has the same slope as the tangent; U = 4x² curves (U goes from 36 to 64, a gain of 28), so a big step picks up the bend, and only tiny steps match the derivative of 24.
  5. The student also differentiated y, which should have been held fixed; the correct answer is 2xy.
  6. Complements: a positive cross partial means more of one good raises the marginal value of the other.

A free self-study program written for 4Economics with AI writing tools and not reviewed line by line by a person. It is not an accredited degree and awards no credit. Check anything you rely on against a textbook or primary source. Report an error.

In this unit: Several variables

  1. Functions of Several Variables and Level CurvesLearn how a payoff that depends on two or more things is described, and how level curves turn a 3D hill into a flat map.11 min
  2. Partial DerivativesFreeze every input but one and take an ordinary derivative: that is how economists measure one-at-a-time marginal effects.10 min
  3. Total Differentials and the Chain RuleAdd up each input's marginal effect to estimate the full change in output, then follow that change through time.11 min
  4. Implicit Differentiation and Comparative StaticsFind how a market's price and quantity respond to a change in income or taxes without ever solving for the equilibrium.11 min
  5. Homogeneous Functions and Euler's TheoremSee what happens to output when every input is scaled up together, and why paying inputs their marginal products can use up all output.11 min

In the news