4.3 Utility Functions
We’ve established what preferences are; but in order to bring preferences into a quantitative model, we need to figure out a way to model them mathematically.
As economists, we can think of consuming goods as just another kind of production function: only this time, instead of producing fish or coconuts with labor and capital, we’re producing happiness or utility by consuming goods like fish and coconuts. In short: one way of thinking about the real world is that we use labor and capital to produce goods via production functions, and then those goods in turn “produce” happiness via utility functions.
A utility function of this sort, $u()$, 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 bundle $A = (a_1,a_2)$ is preferred to bundle $B=(b_1,b_2)$ if and only if it yields a higher utility number: \(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$.)
Furthermore, once we have this “production function for utility,” the concept of indifference curves and the MRS are already familiar to us:

The partial derivatives are what we might call the marginal utility of each good: that is, the amount of additional utility produced if you increase your consumption of a good by a bit, holding your consumption of other goods constant. We can write \(\text{Marginal utility of good 1}=MU_1(x_1,x_2)={\partial u(x_1,x_2) \over \partial x_1}\) \(\text{Marginal utility of good 2}=MU_2(x_1,x_2)={\partial u(x_1,x_2) \over \partial x_2}\)These are, of course, just like the marginal products of labor and capital.

The level sets of the utility function are indifference curves: that is, the set of all bundles which “produce” the same “quantity” of utility, just like an isoquant for a production function.

The magnitude of the slope of a level set is the MRS, defined by the formula \(MRS(x_1,x_2) = {MU_1(x_1,x_2) \over MU_2(x_1,x_2)},\)just as the MRTS was the magnitude of the slope of an isoquant.
Important: we’re going to treat the MRS as a positive number, just like the MRT for a PPF.
Voilà — a mathematical model of utility. We can even reuse our production functions (and will)! For example, if we have the utility function \(u(x_1,x_2) = \sqrt{x_1x_2}\) we can plot the utility function and indifference map just as we would plot a production function and isoquant map:
Interpreting “utils”
While it’s clear that assigning some real number of “utils” to every consumption bundle is useful, 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!
Utils and ranking bundles
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!
Utils and indifference curves
Visually, any two utility functions that rank bundles in the same way must also generate the correct 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 lefthand 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.
Utils and the MRS
It should be clear that, if two utility functions generate the same indifference curves, they also have the same expression for the MRS at any given point. If we look at how the MRS is calculated, and particularly at the units of marginal utility and the MRS, we can get some additional insight as to why utils truly don’t matter.
Since $MU_1$ and $MU_2$ each represent the marginal utility in utils per unit of each good, their units reflect that: for example, if good 1 is apples and good 2 is bananas, $MU_1$ is measured in utils per apple, and $MU_2$ is measured in utils per banana. Therefore the MRS is measured in \(MRS = \frac{MU_1 {\text{utils} \over \text{apple}}}{MU_2 {\text{utils} \over \text{banana}}}\) The “utils” in the numerator and denominator cancel, leaving us with \(MRS = {MU_1 \over MU_2} \text{ bananas per apple}\) If we double the amount of utility generated by each bundle, it’s clear that we also double the marginal utility of any additional unit; but this just means that the MRS of the new utility function is \(\hat {MRS} = {2MU_1 \over 2MU_2} = {MU_1 \over MU_2} = MRS\) In conclusion, doubling the utility “produced” by every bundle doesn’t change the ordering of bundles, or the indifference map, or the MRS at any bundle. In fact, doubling is just one example of an orderpreserving transformation; next, let’s look at the broader class of allowable transformations, and why we might want to use them in analyzing preferences.