Math for economyMM1005

How to find your way

  1. 1Search for the word that confuses you — the box at the top searches the whole course.
  2. 2Look it up in Concepts. Every concept links to the section that explains it. Concepts →
  3. 3Read the Watch out and Common error boxes: they show the mistakes that are actually made.
  4. 4Still stuck? Bring the question to the exercise session or send an email.

Lecturer: Eric Ahlqvist, [email protected] · Put “MM1005” in the subject line.

← 8
Lecture 9 Contour maps, and walking on them
10 →
9 Series and two variables

Contour maps, and walking on them

A function of two variables is a landscape. How do you read a landscape you cannot draw — and how fast do you climb when you walk across it?

Lecture 8 added a second variable and the partial derivatives that come with it. The trouble is that the graph of $z=f(x,y)$ is a surface in three dimensions, and a page has two. So nobody draws the surface. They draw the contours, and everything wanted turns out to be readable off them.

That is the spine of this lecture, and it is not a decoration: it is the reason economists get away with flat two-variable diagrams for problems with many variables. An isoquant and an indifference curve are level curves and nothing else. The first half reads the map; the second half walks on it.

⏱ 60 min read§ 6 sections

After this lecture you can

  • read the signs of both partial derivatives at a point off a contour map, with one step east and one step north
  • say what the signs of $F'_{K},$ $F''_{KK}$ and $F''_{KL}$ assert about a production function, and compute them for Cobb–Douglas
  • compute the distance between two points with $n$ coordinates
  • find $dz/dt$ when both variables move with time, by the chain rule in two variables, and the growth rate of $z$ with the elasticities as weights
  • find the slope $-f'_{1}/f'_{2}$ of a level curve, and check it with the sense check
  • find the best bundle on a budget line from the condition that the line touches an indifference curve
1

The map

A walker's map shows a mountain on a flat sheet of paper. How do you tell from it which way is uphill?

A contour map of a hill. The labels are heights: 9 next to the summit, then 8, 6.5, 4.5 and 2. Both coloured bars climb from 8 to 9; the short one is steep ground, the long one gentle.

This is the object a walker carries up a mountain, and it is read the same way.

Fact 9.2Reading a contour map#
  1. Crowded contours mean steep ground. Neighbouring contours differ by a fixed rise, so the less horizontal distance between them, the faster the climb.
  2. Which way is uphill is settled by the labels, not by the shape of the curves.
  3. Two level curves at different heights never cross. A point cannot be at two heights at once.

Stand at a point and look east: the steepness of the ground in that direction is $f'_{1}.$ Look north: that is $f'_{2}.$ Each partial derivative asks about one step in one direction, and the map answers it directly.

Guess first. The map below is another drawing of the same kind of hill. Read the two signs at $P$ before you read the Method after the question.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

The map shows the height $f(x, y)$.

At the point $P$, what are the signs of $f_1'$ and $f_2'$?

Example 9.4

Two signs, read off the map

On the map above, what are the signs of $f'_{1}$ and $f'_{2}$ at $P$?

The map is the one in the question above. The notes draw another hill, with contours labelled 7, 8 and 6 where this one has 8, 9, 6.5 and 4.5; the reading is the same.

Try it yourself first. Then open one step at a time.

Both readings done. At $P{:}$ east climbs ($+$), north falls ($-$). At $Q,$ on the other side of the hill, both signs come out the other way round.
Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

On a contour map, put a finger on a point $R.$ Sliding it a little to the right, you cross the labels $5$ and then $4.$ Sliding it up from $R,$ you cross $6$ and then $7.$ What are the signs of the partial derivatives at $R$?

2

What economists actually draw

Every flat two-variable diagram you have seen in economics is a contour map. Of what?

Isoquants of $F(K,L)=10K^{1/2}L^{1/2}$ at outputs $20,$ $30$ and $40.$ The two dots give the same output, $30,$ from very different mixes of capital and labour; a higher curve is more output.

An isoquant is a level curve of a production function: the input combinations giving the same output, $F(K,L)=Y_{0}.$ An indifference curve is a level curve of a utility function: the bundles a consumer likes equally, $U(x,y)=u_{0}.$ Higher curve means more output, or more satisfaction, and that convention is the only thing added.

Every flat two-variable diagram in microeconomics is one of these. The surface is never drawn because it never needs to be.

The shape carries economics too. A Cobb–Douglas isoquant bends towards the origin, which says that capital can be replaced by labour, but at a rate that gets worse the further the substitution is pushed. Walking along a contour computes that rate exactly.

Recap Production, utility and the margin
wordwhat it is
production function $F(K,L)$output from capital $K$ and labour $L$
utility function $U(x,y)$how much a consumer likes the bundle of $x$ units of one good and $y$ of another
marginal product of capital$F'_{K},$ the extra output from one more unit of capital, labour held fixed
complementsinputs such that more of one raises the marginal product of the other
budget linethe bundles that cost exactly the income (Lecture 1)

Guess first. The example after the question computes the three signs that matter for a production function. Say what the second one means before you read it.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

For a production function $F(K, L)$ it is found that $$F_K' > 0 \qquad\text{and}\qquad F_{KK}'' < 0$$

What does the second of these say?

Example 9.6

The signs are the economics

For $F(K,L)=AK^{a}L^{b}$ with $A,a,b>0,$ compute $F'_{K},$ $F''_{KK}$ and $F''_{KL},$ and say what each sign asserts.

Try it yourself first. Then open one step at a time.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

A firm's output is $F(K,L)=4K^{1.4}L^{0.5}.$ Then $$ F''_{KK}=2.24\,K^{-0.6}L^{0.5}>0\,. $$ What does that sign say?

3

More variables

In one variable, “$x$ is close to $a$” meant $|x-a|$ small. What does close mean for a bundle of ten inputs?

Three inputs, or ten. Nothing conceptual changes: there is one partial derivative per variable, each found by holding the other $n-1$ still. What is lost is the picture, and only the picture.

What does need replacing is the phrase “$x$ is close to $a$”, which in one variable meant $|x-a|$ small.

Across the floor, $\sqrt{a^{2}+b^{2}};$ then up the wall, $\sqrt{a^{2}+b^{2}+c^{2}}.$

With that, continuity means in $n$ variables exactly what it meant in Lecture 5: a small enough change in the inputs makes only a small change in the output. Only the meaning of “small” had to be supplied: a small distance.

The general Cobb–Douglas function $F = Ax_{1}^{a_{1}}\cdots x_{n}^{a_{n}}$ is worth one remark. Taking logarithms, $$ \ln F = \ln A + a_{1}\ln x_{1} + \cdots + a_{n}\ln x_{n}\,, $$ which is linear. That is Lecture 2's trick again — take logarithms and a multiplicative thing becomes additive — and it is a large part of why this functional form is estimated so often: in logarithms it is a straight line.

Example

Close, in four variables, and straight in logarithms

This example is the app's; nothing in it is new. A firm uses capital, labour, energy and materials.

(a) Last year it used the bundle $(10,4,7,2)$ of the four inputs, this year $(12,8,6,4).$ How far apart are the two bundles?

(b) Its output is $F=3x_{1}^{0.5}x_{2}^{0.3}x_{3}^{0.1}x_{4}^{0.1}.$ Write $\ln F$ as a linear expression, and use it to say by about how much output rises when $x_{1}$ alone rises by $1\%.$

Try it yourself first. Then open one step at a time.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

What is the distance between the points $(1,2,3)$ and $(3,5,9)$?

4

Walking across the map

You walk across a hill, east and north at once. How fast are you climbing?

Now let both variables move together, say with time: $x=g(t)$ and $y=h(t).$ Then $z = f\bigl(g(t),h(t)\bigr)$ depends on $t$ alone, and we can ask how fast it changes.

A path $(x(t),y(t))$ across the contour map. At the dot the walker moves east at $dx/dt$ and north at $dy/dt;$ how fast the height changes depends on both speeds and on how steep the ground is in each direction.
Fact 9.10The chain rule in two variables#

If $f$ is differentiable and $x=g(t)$, $y=h(t)$ are differentiable, then $$ \frac{dz}{dt} = \frac{\partial z}{\partial x}\frac{dx}{dt} + \frac{\partial z}{\partial y}\frac{dy}{dt}\,. \tag{9.1} $$ One contribution per variable, and they add.

Read as a walk across the landscape, (9.1) says $$ \begin{aligned} &\text{rate of climb}\\ &= (\text{steepness east})\times(\text{speed east})\\ &\quad+ (\text{steepness north})\\ &\qquad\times(\text{speed north})\,, \end{aligned} $$ which is what anybody would guess. The units make it unforgettable and rule out every other pairing: output per extra machine times machines per year, plus output per extra worker times workers per year, is output per year. If the partials are ever paired with the wrong rates, the units catch it at once. It is the chain rule of Lecture 3 with a second term.

Guess first. The example after the question has the same numbers.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

A firm's output is $Y = F(K, L).$ Right now $$ \begin{aligned} &F_K' = 4\,, \quad F_L' = 6\,,\\ &\frac{dK}{dt} = 3\,, \quad \frac{dL}{dt} = -2\,. \end{aligned} $$

Capital is being built up; the workforce is shrinking. How fast is output changing?

Example 9.12

Capital up, labour down

A firm's output is $Y=F(K,L).$ At this moment $F'_{K}=4,$ $F'_{L}=6,$ $dK/dt=3$ and $dL/dt=-2{:}$ capital is being built up and the workforce is shrinking. How fast is output changing?

Try it yourself first. Then open one step at a time.

Example

Two routes, one answer

This example is the app's: the free check of Example 9.12, carried out. Let $z=xy^{2},$ and walk along $x=t^{2},$ $y=3-t.$ Find $dz/dt$ at $t=1$ in both ways.

Try it yourself first. Then open one step at a time.

In applied work the rule is more often wanted in relative terms, because economists quote growth rates rather than levels.

Fact 9.14The chain rule in relative terms#

Dividing (9.1) through by $z$, $$ \frac{\dot z}{z} = \mathrm{El}_{x}z\cdot\frac{\dot x}{x} + \mathrm{El}_{y}z\cdot\frac{\dot y}{y}\,, $$ where a dot denotes $d/dt$. The growth rate of $z$ is the elasticity-weighted sum of the growth rates of $x$ and $y$.

So if demand $D(p,m)$ has price elasticity $-0.8$ and income elasticity $1.2,$ and prices rise $3\%$ a year while incomes rise $2\%,$ then demand grows at about $-0.8(3\%) + 1.2(2\%) = 0.$ For Cobb–Douglas the elasticities are the exponents, as Lecture 8 showed, so the arithmetic is immediate. A partial elasticity turns a rate in units into a rate in per cent, which is the relative rate of change of Lecture 3 again.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

Output is $Y=K^{0.3}L^{0.7}.$ Capital grows by $5\%$ a year and labour by $1\%$ a year. By about how much does output grow per year?

5

Walking along a contour

Is there a direction in which you can walk on a hillside without climbing or descending at all?

One direction of travel is special. Walk along a level curve and, by definition, the height does not change at all.

Try it yourself

Choose a direction and walk

Left, the hill as a map in shaded bands (every edge of a band is a level curve) with a straight walk from the cross; right, your height along the walk.

  1. Turn the direction dial slowly. Under the graphs, compare the sum of the two chain-rule terms $f_{1}\cdot dx/dt$ and $f_{2}\cdot dy/dt$ with the slope of the graph. They agree every time: that is (9.1), measured.
  2. Before you press anything else, find by turning the dial a direction in which the right-hand graph comes out flat. There are two, opposite to each other.
  3. Press Find the flat direction. You are walking along a level curve, and the two terms cancel. That cancellation is the Fact below.
  4. Press the button with the function's name until it reads $F(K,L)=10\sqrt{KL},$ and find the flat direction again: it runs along an isoquant.
Fact 9.15The slope of a level curve#

Along a level curve of $f$, wherever $f'_{2}\ne0$, $$ \frac{dy}{dx} = -\,\frac{f'_{1}}{f'_{2}}\,. \tag{9.2} $$

That single line is the most used formula in microeconomics. On an indifference curve it is the marginal rate of substitution: the rate at which the consumer is willing to give up $y$ for $x$ while staying equally happy. On an isoquant it is the marginal rate of technical substitution.

It is also implicit differentiation from Lecture 4 in one line: the equation $f(x,y)=c$ defines $y$ implicitly near a point where $f'_{2}\ne0,$ and (9.2) is its derivative.

Guess first. Use (9.2) on the numbers in the question, and check the answer against your sense of the curve.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

At a point, $f_1' = 3$ and $f_2' = 6$.

What is the slope $\dfrac{dy}{dx}$ of the level curve through that point?

Example 9.17

Three against six

At a point, $f'_{1}=3$ and $f'_{2}=6.$ What is the slope of the level curve there?

Try it yourself first. Then open one step at a time.

The numbers of the question: from the point, the step $(+2,-1)$ along the tangent leaves the height unchanged, $3\cdot(+2)+6\cdot(-1)=0.$ So the level curve has slope $-3/6=-\tfrac12$ there.
Example 9.18

The Cobb–Douglas trade-off

Find the slope of the indifference curves of $U(x,y)=x^{a}y^{b}.$

Try it yourself first. Then open one step at a time.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

A consumer has utility $U(x,y)=x^{2}y^{3}.$ What is the slope $dy/dx$ of the indifference curve through the point $(3,4)$?

6

The best point on a line

More is always better, so utility has no maximum. But on a budget line, which bundle is best?

The map also answers a question we have no algebra for yet.

Guess first. Slide a finger along the budget line in the picture, and watch which indifference curves you cross.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

You may choose any point on the budget line. Higher curves are better.

Which of $P$, $Q$, $R$, $S$ is best?

Example 9.19

The best point on a line

A consumer has $12$ to spend; good $x$ costs $2$ and good $y$ costs $3,$ so the affordable bundles are those on $2x+3y=12.$ Utility is $U(x,y)=xy.$ Which affordable bundle is best?

Try it yourself first. Then open one step at a time.

The budget line crosses the curves $xy=2$ and $xy=4,$ and only touches $xy=6,$ at $R=(3,2).$ At $P,$ $Q$ and $S$ sliding along the line one way reaches a higher curve; at $R$ there is nowhere better to go.

That tangency condition is the central result of consumer theory, and it has just been obtained by sliding a finger along a line. Lecture 11 derives it properly, for constraints of any shape, by the Lagrange multiplier method; the hard part of the idea is already done.

What you should take away

  • A level curve is where $f(x,y)=c;$ several make a contour map. Crowded contours mean steep ground, the labels say which way is up, and curves at different heights never cross. To sign a partial derivative, take one step in one direction and read the labels.
  • Isoquants and indifference curves are level curves, which is why every flat two-variable diagram in microeconomics works.
  • A model is a functional form plus sign assumptions. $F'_{K}>0,$ $F''_{KK}<0$ and $F''_{KL}>0$ say: more capital raises output, at a diminishing rate, and capital and labour are complements.
  • In $n$ variables nothing changes but the picture: one partial per variable, and $\|\mathbf{x}-\mathbf{a}\|$ replaces $|x-a|.$
  • Chain rule: $\dfrac{dz}{dt} = \dfrac{\partial z}{\partial x} \dfrac{dx}{dt} + \dfrac{\partial z}{\partial y}\dfrac{dy}{dt}$ — steepness times speed, one term per variable, added. In relative terms the weights are the elasticities.
  • Walking along a level curve gives $dz/dt=0,$ hence $\dfrac{dy}{dx} = -\dfrac{f'_{1}}{f'_{2}}{:}$ the marginal rate of substitution. The variable with the bigger partial is the one you need less of.
  • For $U=x^{a}y^{b}$ the trade-off is $-(a/b)(y/x),$ which depends only on the ratio of the goods — and $U$ cancels, so only the level curves of a utility function carry information, never its values.
  • The best affordable bundle is where the budget line touches an indifference curve: $-U'_{1}/U'_{2} = -p/q.$ Where it crosses, you can always do better.

Think further

Questions without computation. Think on your own or with a classmate before opening the thought.

  1. Discussion question 1 — the other side of the summit

    On the contour map above, what are the signs of $f'_{1}$ and $f'_{2}$ at a point placed symmetrically to $P$ on the far side of the summit?

    One way to think about it

    Both signs turn round: $f'_{1}<0$ and $f'_{2}>0.$ Every contour of this hill is an ellipse centred on the summit, so the map looks the same after a half-turn about the summit. A step east from the mirror point corresponds to a step west from $P,$ which goes down; a step north corresponds to a step south from $P,$ which goes up. The point $Q$ in the map of the first question lies on that side of the hill, and the answer figure after Example 9.4 shows its two signs.

  2. Discussion question 2 — rising, but more slowly

    For a production function it is found that $F'_{K}>0$ and $F''_{KK}<0.$ What does the second of these say?

    (A) output falls as capital rises;

    (B) capital and labour are complements;

    (C) capital is less productive than labour;

    (D) output rises, but each extra unit adds less than the last.

    One way to think about it

    (D). $F''_{KK}$ is the derivative of the marginal product $F'_{K},$ so negative means the marginal product is falling: output still rises, by less each time (Watch out 9.7). (A) reads the second derivative as the first; (B) is a statement about the cross partial $F''_{KL};$ (C) compares two inputs, and $F''_{KK}$ involves capital only.

  3. Discussion question 3 — cancelling is not idle

    Right now $F'_{K}=4,$ $F'_{L}=6,$ $dK/dt=3$ and $dL/dt=-2.$ How fast is output changing, and why is “nothing is happening” the wrong description of the answer?

    One way to think about it

    $dY/dt=4\cdot3+6\cdot(-2)=12-12=0$ (Example 9.12). But two things are happening at once: capital accumulation adds $12$ units a year and the shrinking workforce removes $12.$ They cancel at this instant only; as $K$ and $L$ change, so do the partials, and a moment later the two terms will not cancel. A derivative of zero is a statement about one instant, not a steady state.

  4. Discussion question 4 — the sense check at work

    At a point, $f'_{1}=3$ and $f'_{2}=6.$ The slope of the level curve is

    (A) $-\tfrac12;$

    (B) $-2;$

    (C) $\tfrac12;$

    (D) $2.$

    Which of the wrong answers does the sense check of Warning 9.16 eliminate immediately?

    One way to think about it

    The answer is (A), $-3/6=-\tfrac12.$ The sense check — the variable with the bigger partial is the one you need less of — says that $y,$ with partial $6,$ is needed less, so the curve is shallow: the slope lies between $-1$ and $1.$ That eliminates (B) $-2$ and (D) $2,$ the inverted ratios. (C) $\tfrac12$ passes the size test; the other half of Watch out 9.16, the minus sign, removes it: with both partials positive, more $x$ must be paid for with less $y.$

  5. Discussion question 5 — the same consumer

    Why do $U=xy$ and $U=\ln x+\ln y$ describe exactly the same consumer?

    One way to think about it

    $\ln x+\ln y=\ln(xy),$ an increasing function of $xy.$ So the two utility functions rank every pair of bundles the same way and have the same level curves: $xy=c$ is the curve $\ln x+\ln y=\ln c.$ The trade-offs agree too. For $U=xy,$ $-U'_{1}/U'_{2}=-y/x;$ for $\ln x+\ln y,$ $-\frac{1/x}{1/y}=-y/x.$ Only the labels of the curves differ, and by Example 9.18 the labels carry no information.

  6. Discussion question 6 — the price of x doubles

    In Example 9.19, what happens to the best bundle if the price of $x$ doubles? Answer from the tangency condition rather than by redoing the substitution.

    One way to think about it

    The price of $x$ becomes $4,$ so the budget line is $4x+3y=12$ and the tangency condition is $-y/x=-4/3,$ that is $y=\tfrac43x.$ Then $4x+4x=12,$ so $x=\tfrac32$ and $y=2.$ The amount of $x$ halves and $y$ is unchanged: the consumer still spends half the income, $6,$ on each good. With $U=xy$ that is always so.

  7. Discussion question 7 — two contours that cross

    Two level curves of the same function, at heights $6$ and $7,$ are drawn crossing each other. What has gone wrong?

    One way to think about it

    The drawing. At the crossing point the function would have the value $6$ (it lies on the first curve) and the value $7$ (it lies on the second), and a function has one value at each point (Fact 9.2, item 3). So either a curve is mislabelled, or the two curves belong to different functions.