MATH 250 · Mathematics for Economics II

Functions of Several Variables and Level Curves

Learn how a payoff that depends on two or more things is described, and how level curves turn a 3D hill into a flat map.

Key takeaways

  • A function of several variables takes two or more inputs and returns one output, such as utility from cupcakes and coffee.
  • With two inputs, the graph is a surface, like a hill over a floor map. The floor is the plane of inputs.
  • A level curve joins all the input combinations that give the same output. Mapmakers call it a contour line.
  • Level curves of utility are indifference curves; level curves of output are isoquants.
  • Curves that are close together mean a steep hill; curves far apart mean a gentle slope.

Picture Dara on a free Saturday. She likes cupcakes and she likes iced coffee, and her happiness depends on both. One cupcake and twelve coffees? Too much coffee. Twelve cupcakes and one coffee? Sticky and thirsty. Somewhere in the middle is the sweet spot, and finding it is a real math problem.

Until now, your functions had one input. You fed in a quantity and got out a cost, or a price, or a profit. Real economic life is not that tidy. A bakery's output depends on workers and ovens. A family's spending depends on income and prices. A country's growth depends on machines, people and ideas. This lesson gives you the basic tool for all of it: the function of several variables, and a clever way to draw it on flat paper.

From one input to many

Remember the one-variable idea from lines and graphs: a rule that gives each input exactly one output. We wrote y = f(x). Now we allow more than one input. For two inputs we write z = f(x, y). The letters x and y are the inputs. The letter z is the single output.

Here is Dara's rule. Let x be the cupcakes she eats and y be the cups of coffee she drinks. Suppose her happiness, which economists call utility, is

U(x, y) = x × y

This is a made-up but friendly function. It says happiness is the product of the two amounts. Try some numbers:

  • 2 cupcakes and 6 coffees: U = 2 × 6 = 12.
  • 4 cupcakes and 3 coffees: U = 4 × 3 = 12.
  • 4 cupcakes and 6 coffees: U = 4 × 6 = 24.
  • 0 cupcakes and 10 coffees: U = 0 × 10 = 0.

That last line tells you something. With none of one good, the product is zero no matter how much of the other you have. The function bakes in a taste for variety. Economists like this shape because real people often feel the same way.

Many economic ideas are functions of several variables. A factory's output Q might depend on capital K (machines) and labor L (workers), so Q = f(K, L). A firm's profit depends on the quantities of several products. Demand for pizza depends on the price of pizza, the price of burgers and income. Whenever you hear "it depends on several things," you are hearing a multivariable function.

Reading a function of two inputs
U = x × y where x y U = Output: utility One number that scores how happy Dara is. x × y = The rule Multiply cupcakes by coffees. x = Input one: cupcakes How many cupcakes she eats. y = Input two: coffees How many cups of coffee she drinks. U = x × y where x y U = Output: utility One number that scores how happy Dara is. x × y = The rule Multiply cupcakes by coffees. x = Input one: cupcakes How many cupcakes she eats. y = Input two: coffees How many cups of coffee she drinks.

Dara's utility rule has two inputs and one output. Change either input and the output moves.

A hill over a floor

With one input, a graph is a curve on a flat page. With two inputs, you need three directions: one for x, one for y and one for the output z. The graph of z = f(x, y) is a surface, which is a bumpy sheet floating over the floor.

Think of a floor map where each point is a mix of cupcakes and coffee. Over each point, stand a pole whose height is Dara's utility there. The tops of the poles trace a surface. For U = x × y, the poles are short near the edges of the floor (where x or y is zero) and tall in the far corner where both are large.

Surfaces are hard to draw on paper, and harder still to read numbers from. Economists dodge the problem with an old mapmaker's trick.

Level curves: slicing the hill

A hiker looks at a topographic map. Thin lines wind around, and each line connects points at the same height above sea level. Walk along one line and you never climb or descend. These are contour lines.

Economists do the same thing to a surface. Pick an output level, say 12. Then find every input combination that produces exactly 12. Join them. The result is a level curve, written as the set of points where f(x, y) = c for some constant c. Read it as "all the mixes that give the same output."

Let's find Dara's level curve for U = 12. We need x × y = 12, so y = 12 ÷ x.

x = 1.5  ->  y = 12 ÷ 1.5 = 8
x = 2    ->  y = 12 ÷ 2   = 6
x = 3    ->  y = 12 ÷ 3   = 4
x = 4    ->  y = 12 ÷ 4   = 3
x = 6    ->  y = 12 ÷ 6   = 2
x = 8    ->  y = 12 ÷ 8   = 1.5

Each pair multiplies to 12, so each mix leaves Dara equally happy. Now do the same for U = 24: y = 24 ÷ x gives (3, 8), (4, 6), (6, 4), (8, 3) and (10, 2.4). Plot both families and you get two bending curves, the higher one farther from the corner.

Two of Dara's level curves
Cups of coffee (y) U = 12 U = 24 A B Higher curve = happier Cupcakes (x) Cups of coffee (y) U = 12 U = 24 A B Higher curve = happier Cupcakes (x)

Dots A and B show how to read the map. Point A is (3, 4), so U = 12. Point B is (6, 4), so U = 24. Same coffee, more cupcakes, a higher curve. Moving outward from the corner means moving uphill.

Why these curves bend inward

Look at the U = 12 curve. Going from 2 cupcakes to 3, Dara gives up two coffees (6 down to 4). Going from 6 cupcakes to 8, she gives up only half a coffee (2 down to 1.5). The more cupcakes she already has, the less coffee she needs to be paid to hand over one more. That bowed shape, bending toward the corner, is the signature of a taste for variety. Later lessons put a name on this slope, and partial derivatives give a tidy way to measure it.

A second worked example: a bike shop

Level curves work for producers too. Suppose a bike shop's weekly output is Q = 2 × K × L, where K is the number of repair stands and L is the number of workers. (The 2 is just a made-up scale.)

Find the level curve for Q = 24 bikes fixed per week. Set 2KL = 24, so KL = 12, so L = 12 ÷ K.

K = 2 stands  ->  L = 6 workers
K = 3 stands  ->  L = 4 workers
K = 4 stands  ->  L = 3 workers
K = 6 stands  ->  L = 2 workers

Check one: K = 3, L = 4 gives Q = 2 × 3 × 4 = 24. Correct. This curve is called an isoquant, from "same quantity." It shows every way to hit the same output with different mixes of machines and people. The owner who sees it can ask which mix is cheapest. That question, optimizing under a limit, comes back in constrained optimization.

Notice the family resemblance. Dara's curves and the shop's curves are the same shape because the formulas have the same structure. Learn the skill once and you can read both a consumer's world and a firm's.

Same idea, two names
Indifference curve Level curve of utility Inputs are goods, like cupcakes and coffee Every point makes the person equally happy Higher curves mean more happiness Isoquant Level curve of output Inputs are factors, like machines and workers Every point makes the same quantity Higher curves mean more output VS Indifference curve Level curve of utility Inputs are goods, like cupcakes and coffee Every point makes the person equally happy Higher curves mean more happiness Isoquant Level curve of output Inputs are factors, like machines and workers Every point makes the same quantity Higher curves mean more output

The mathematics is identical. Only the story changes.

Reading the spacing

Back to the hiker. Where contour lines crowd together, the hill is steep; where they spread out, it is gentle. Level curves of economic functions carry the same message. If the U = 12 and U = 24 curves sit close, a small step buys a big jump in happiness. If they sit far apart, you must travel a long way to gain the same amount.

For Dara's function, the curves actually spread out as you move away from the corner. The distance between U = 12 and U = 24 is wider far out than near the corner. Her happiness grows, but each step outward buys less per unit of travel.

Level curves for three inputs

With three inputs, you would need four dimensions to draw the graph, which nobody can do. Level curves survive anyway, as level surfaces, though we rarely draw them. In practice, economists hold one input fixed and draw the other two. That habit, freezing one thing while others vary, is the core of the next lesson.

Why economists love the map

Here is the payoff of all this drawing. Suppose Dara has only $12 to spend, cupcakes cost $2 each and coffee costs $3 a cup. She cannot reach every basket. Spending exactly $12 means 2x + 3y = 12, which is a straight line on her map. For example, 3 cupcakes and 2 coffees cost 6 + 6 = $12, so that basket is on the line.

Now lay the line over the family of level curves. Some curves are out of reach, because every point on them costs more than $12. Some curves are easy to reach but low. The best she can do is touch the highest curve that still has a point on her budget line. That one touching point is her best basket. You will find it with algebra later, but you can already see the shape of the answer: a map, a fence, and the highest ground inside the fence.

The same picture drives much of the rest of this course. A firm with a fixed budget looks for its highest isoquant. A planner with a fixed supply of resources looks for the highest welfare curve. Different stories, one picture.

One more habit helps. When you meet a new function, ask three quick questions. What are the inputs? What is the single output? What happens to the output if one input is zero? Dara's function gives zero, which tells you at once that she needs both goods. A different function, say U = x + y, would give a positive output even with none of one good, and its level curves would be straight lines. Asking these questions before any algebra saves many wrong turns.

A common mistake

Students often read a level curve as a path Dara travels, a story with time on it. It is not. Every point on the U = 12 curve is a different possible basket. Dara is not moving along the curve over a day. The curve says only that, if she were at any of those baskets, she would feel equally happy.

A second slip: thinking two level curves can cross. They cannot, because a point has only one output. If a basket gave utility 12 and also 24, the function would not be a function. So when you see crossing curves in a diagram, something is wrong, or the curves belong to two different functions (two different people, say).

Words to know

Function of several variables a rule that takes two or more inputs and gives exactly one output.

Surface the 3D graph of a two-input function, like a hill over a floor map of the inputs.

Utility a number that scores how happy a person is with a basket of goods.

Level curve the set of all input combinations that give the same output.

Contour line a mapmaker's name for a level curve of height.

Indifference curve a level curve of utility; the person is equally happy everywhere on it.

Isoquant a level curve of output; the same quantity can be made by every mix on it.

Check yourself

  1. In U(x, y) = x × y, what is U for 5 cupcakes and 2 coffees?
  2. Find the y that puts the mix (x = 4, y) on Dara's U = 24 level curve.
  3. A shop's output is Q = 2 × K × L. With K = 5 stands and L = 3 workers, what is Q, and what L is needed with K = 5 to reach Q = 40?
  4. Why can two level curves of the same function never cross?
  5. Explain in your own words why Dara's U = 12 curve bends toward the corner instead of being a straight line.
  6. On the U = 12 curve, the point (2, 6) and the point (6, 2) are both there. Are they the same basket? Do they give the same utility?
Show the answers
  1. U = 5 × 2 = 10.
  2. 4 × y = 24, so y = 24 ÷ 4 = 6.
  3. Q = 2 × 5 × 3 = 30. For Q = 40: 2 × 5 × L = 40, so 10L = 40 and L = 4 workers.
  4. A crossing point would have two outputs at once, but a function gives each input exactly one output.
  5. Giving up coffee costs her less happiness when she has lots of it, so she trades fewer coffees for each extra cupcake as she gets more cupcakes; the trade-off changes, so the curve bends.
  6. No, they are different baskets (2 cupcakes and 6 coffees versus 6 cupcakes and 2 coffees), but both give U = 12, so she is equally happy.

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