# Utility Functions and Indifference Curves¶

## What is Utility?¶

When we consume a good, we assume that the good will have some impact on our total utility. Utility is a fundamental measure that helps economists model how consumers make decisions. An assumed rule in economics is that consumers will always act rationally, which translates to the assumption that consumers will always attempt to maximize their own utility.

It is important to note that utility doesn’t have specified units and even the face value of utility doesn’t have any meaning. What does an apple providing 5 utility units even mean? What is valuable, however, is that utility can be compared; if an apple provides 5 utility units and an orange provides 3 utility units, then we prefer apples to oranges.

As a very simple example, say Anne has 6 dollars and she can choose to buy any combination of goods A and B. If good A costs 2 dollars and provides 5 utility units per unit of A consumed, while good B costs 3 dollars and provides 6 utility units per unit of B consumed, then Anne will buy 3 units of good A, since that maximizes her utility.

In economics, however, our models are a little more complex than that. Typically, utility is the product of the consumption of many goods; typically having a lot of one good but not another does not provide much utility. In addition, consumption of one good faces diminishing marginal returns, i.e. holding all things equal, the consumption of one additional unit of a good will provide less utility than the utility received from the previous unit. Intuitively, imagine Bob is very hungry and decides to eat slices of pizza. The first slice of pizza will bring Bob the most utility, but the 8th slice will be much less satisfying to eat.

## Utility Functions¶

A consumer’s utility is determined by the amount of consumption from all the goods they consume. Typically, utility functions are multivariate: they take in multiple inputs (which represent the different amounts of consumption for each good, which we call a consumption bundle), and output one value, the utility. Today, we’ll only look at the case where consumers can only choose between 2 goods $$x_1$$ and $$x_2$$. Hence, a utility function can be represented by: $$u(x_1,x_2)$$.

With that in mind, let’s start graphing some utility functions!

### Cobb-Douglas Utility Function¶

Consider the following utility function across $$x_1$$ and $$x_2$$:

$u(x_1, x_2)=x_1^{\alpha}x_2^{1-\alpha}\quad\text{where } 0<\alpha<1$

This is known as the Cobb-Douglas utility function. To visualize this function, we’ll need a 3D plot.