EconGraphs Logo BETA
Note: These explanations are in the process of being adapted from my textbook.
I'm trying to make them each a "standalone" treatment of a concept, but there may still
be references to the narrative flow of the book that I have yet to remove.
This work is under development and has not yet been professionally edited.
If you catch a typo or error, or just have a suggestion, please submit a note here. Thanks!

Utility Functions


Having established what preferences are, we now need to figure out a way to model them mathematically in order to bring preferences into a quantitative model.

One approach is to think of preferences is to imagine that every possible choice is associated with a certain amount of “utility,” and that we prefer choice A to choice B if the amount of utility associated with choice A is greater than the amount associated with choice B.

For choices over consumption bundles, we could imagine a utility function, $u()$, which would take as inputs a bundle of goods $(x_1,x_2)$, and assign a number (in “utils”, or units of utility) to the resulting happiness. We could then say that if we compare bundle $A = (a_1,a_2)$ with bundle $B=(b_1,b_2)$, the preference relationship follows directly from comparing the number of “utils” associated with bundle A and bundle B: \(A \succ B \iff u(a_1,a_2) > u(b_1,b_2)\) \(A \sim B \iff u(a_1,a_2) = u(b_1,b_2)\) \(A \prec B \iff u(a_1,a_2) < u(b_1,b_2)\) Because we’re assigning every bundle a real number in utils, we immediately get completeness and transitivity, because the set of real numbers itself is complete and transitive. (That is, you can compare any two numbers, and if $x \ge y$ and $y \ge z$ then $x \ge z$.)

Utility functions and indifference curves

We defined an indifference curve by saying that if $X$ lies along the same indifference curve as $A$, then the consumer is indifferent between $X$ and $A$ (formally, $X \sim A$).

Using our utility function approach, we would say that every bundle along an indifference curve produces the same number of utils: that is, if $X$ lies along the same indifference curve as $A$, then $u(x_1,x_2) = u(a_1,a_2)$.

Therefore, we can define an indifference curve through a bundle $A$ mathematically as the level set of the utility function, for the utility generated \(\text{Indifference curve through }A = \{(x_1,x_2)\ |\ u(x_1,x_2) = u(a_1,a_2)\}\)

For example, one simple utility function we’ll see a lot is \(u(x_1,x_2) = \sqrt{x_1x_2}\) The following diagram shows a plot of this utility function in 3D space, as well as a map of its level sets. If you drag the point around, you can see that through any given point, there is an indifference curve, which corresponds to the level set of the utility function passing through that point:

Importantly, note that even though an indifference map only shows a few indifference curves, every point has a utility, and therefore a corresponding indifference curve. Moving the point in diagrams like this might seem like you’re “shifting” an indifference curve, but in fact all you’re doing is highlighting a different one. Bear this in mind as you play with these graphs!

Equivalent utility functions and the interpretation of “utils”

While it’s clear that assigning some real number of “utils” to every consumption bundle is useful, and allows us to plot indifference curves mathematically, we should pause and ask ourselves whether it’s something we can actually do in a philosophically coherent way. After all, we don’t want to build an entire theory of consumer behavior on top of a mathematically convenient but false assumption!

We can first note that the cardinal value of “utils” has no meaning, any more than the “10” that represents the maximum volume on most amplifiers.

However, we’re not interested in cardinal values: we’re only interested in utility functions insofar as they can represent ordinal preferences. That is, we only need the utility function to be able to tell us whether we prefer bundle A or bundle B, not by how many utils we prefer bundle A to bundle B.

For example, we previously looked at the utility function $u(x_1,x_2) = \sqrt{x_1x_2}$. According to this utility function, $u(40, 10) = 20$, $u(10,10) = 10$, and $u(20,20) = 20$. Therefore, according to that utility function, $(40,10)$ is preferred to $(10,10)$ and generates the same utility at $(20,20)$.

Let’s compare this utility with a utility function which gives twice as many utils to every bundle: that is, $\hat u(x_1,x_2) = 2\sqrt{x_1x_2}$. This utility function would assign 40 utils to $(40, 10)$ and $(20,20)$, while assigning 20 utils to $(10,10)$. But it would rank all three bundles in exactly the same way!

Any two utility functions that rank bundles in the same way must also generate the same indifference curve through any consumption bundle. In other words, as long as a utility function results in the correct indifference map, it doesn’t matter what numerical “level” each of the indifference curves has. Here’s the utility function $\hat u(x_1,x_2) = 2\sqrt{x_1x_2}$ plotted, along with its indifference map. We can see that it produces a lot more “utils” from the left-hand graph than the figure above, but the indifference curve through any given point is exacty the same:

According to the first utility function $u(40,10) = 20$; according to the second utility function, $\hat u(40,10) = 40$. So the bundle $(40,10)$ gives twice as many utils as it did before! However, the new utility function doubles the utility of every bundle. This means that all the bundles which were previously giving utility of 20 are now giving utility of 40; so the set of all bundles yielding the same utility as $(40,10)$ — that is, the indifference curve passing through $(40,10)$ — doesn’t change. Intuitively, this is true for the same reason that it doesn’t matter whether a contour map shows the altitude for each contour line in feet or meters; all that matters is that each contour line shows the set of points which share the same altitude.

Mathematical properties of utility functions: marginal utility and the MRS

By modeling utility using multivariable functions, we can assign economic meaning to the mathematical properties of the function:

While we can simply apply the implicit function theorem here, it’s good to think about the economic interpretation of the MRS as the ratio of the marginal utilities.

First, note that the marginal utilities are rates: they represent the change in utility per change in consumption of the good. Thus, if you gain 3 units of good 1, your utility increases by approximately $3MU_1$.

Imagine you’re at some point $A$ on an indifference curve, and exchange some goods to arrive at some other point $C$ on the same indifference curve. Specifically, let’s say you give up $\Delta x_2$ units of good 2 in exchange for $\Delta x_1$ units of good 1. This movement is shown in the following two graphs:

Losing the $\Delta x_2$ units of good 2 decreases your utility by \(\textcolor{#d62728}{\text{Utility loss from A to B }= \Delta x_2 \times MU_2}\) However, gaining the $\Delta x_1$ units of good 1 increases your utility by \(\textcolor{#31a354}{\text{Utility gain from B to C }= \Delta x_1 \times MU_1}\) Note, however, that you end up with the same amount of utility (since $C$ is on the same indifference curve as $A$). Therefore you know that the utility loss from giving up the good 2 must exactly equal the utility gain from the additional units of good 1: \(\Delta x_2 \times MU_2 = \Delta x_1 \times MU_1\) or, cross multiplying, \({\Delta x_2 \over \Delta x_1} = {MU_1 \over MU_2}\) As $A$ and $B$ get closer and closer together, this approaches the instantaneous rate of change along the indifference curve, or \(MRS = {MU_1 \over MU_2}\)

Testing for “well-behaved” preferences using calculus

If a utility function is smooth and continuous, we can calculate its marginal utilities and MRS using calculus. From those we can determine whether it’s monotonic and convex.

Determining if preferences are monotonic

Refer back to the graphs from our discussion of monotonicity.

The diagram of the indifference curve showing pizza and soda over a lifetime used the utility function \(u(x_1,x_2) = x_1^{1 \over 2}x_2^{1 \over 2}\) This utility function has the marginal utilities \(\begin{aligned} MU_1(x_1,x_2) &= \tfrac{1}{2}x_1^{-{1 \over 2}}x_2^{1 \over 2}\\ MU_2(x_1,x_2) &= \tfrac{1}{2}x_1^{1 \over 2}x_2^{-{1 \over 2}} \end{aligned}\) Because these are both positive for all values of $x_1$ and $x_2$, this utility function represents preferences which are monotonic.

By contrast, the utility function we used to plot the indifference map for pizza and soda in a single meal was \(u(x_1,x_2) = 24 - (4 - x_1)^2 - 2(2 - x_2)^2\) which has the marginal utilities \(\begin{aligned} MU_1(x_1,x_2) &= 8 - 2x_1\\ MU_2(x_1,x_2) &= 8 - 4x_2 \end{aligned}\) Because these change sign (at $x_1 = 4$ and $x_2 = 2$ respectively), this utility function represents preferences which are non-monotonic.

Determining if monotonic preferences are convex

The mathematics for determining convexity in general is beyond the scope of this text. However, recall that if preferences are monotonic, the indifference curve will be downward sloping, and that if preferences are strictly monotonic and strictly convex, the MRS is decreasing as you move along an indifference curve. Therefore, we can tell if strictly monotonic preferences are also strictly convex by examining what happens to the MRS as you move down and to the right along an indifference curve. Specifically, if $MU_1(x_1,x_2) > 0$ and $MU_2(x_1,x_2) > 0$ for all $(x_1,x_2)$, a sufficient condition for preferences to be strictly convex is if both \({\partial MRS(x_1,x_2) \over \partial x_1} \le 0\) and \({\partial MRS(x_1,x_2) \over \partial x_2} \ge 0\) with at least one of these being strict. That is, the MRS is decreasing along a downward-sloping indifference curve if it decreases when $x_1$ increases and $x_2$ decreases, since moving down and to the right along a downward-sloping indifference curve means you’re simultaneously increasing $x_1$ and decreasing $x_2$.

For example, our introduction to convexity, we asserted that the utility function \(u(x_1,x_2) = x_1x_2\) represented convex preferences. We can see that its MRS is \(MRS = {MU_1 \over MU_2} = {x_2 \over x_1}\) which is decreasing in $x_1$ and increasing in $x_2$. By contrast, the concave preferences described by the utility function \(u(x_1,x_2) = x_1^2 + 4x_2^2\) have the MRS \(MRS = {MU_1 \over MU_2} = {2x_1 \over 8x_2}\) which is actually increasing in $x_1$ and decreasing in $x_2$; i.e., getting steeper, not flatter, as you move down and to the right along an indifference curve.

Examples of utility functions

While economists use a wide range of utility functions, we’ll be interested in two main classes of functional forms in this course.

Utility functions for analyzing complements and substitutes

One of the key aspects of a utility function is how it describes the relationship between the goods it’s modeling:

There is, in fact, a very useful functional form called the constant elasticity of substitution (CES) utility function, which has a parameter for the complementarity or substitutability of the goods being analyzed.

Quasilinear utility functions

Utility functions for analyzing situations in which one good has diminishing marginal utility, while another has constant marginal utility. These are called quasilinear utility functions, and are particularly good for analyzing a choice of how much of one good to buy, treating good 2 as “money spent on other goods.”

Next: Transforming and Normalizing Utility Functions
Copyright (c) Christopher Makler / econgraphs.org