The budget constraint is the first piece of the utility maximization framework—or how consumers get the most value out of their money—and it describes all of the combinations of goods and services that the consumer can afford. In reality, there are many goods and services to choose from, but economists limit the discussion to two goods at a time for graphical simplicity.

### Start With 2 Goods

In this example, we'll use beer and pizza as the two goods in question. Beer is on the vertical axis (y-axis) and pizza is on the horizontal axis (x-axis). It doesn't matter which good goes where, but it's important to be consistent throughout the analysis.

### The Equation

Suppose the price of beer is $2 and the price of pizza is $3. Then assume the consumer has $18 available to spend. The amount spent on a beer can be written as 2B, where B is the number of beers consumed. In addition, the amount spent on pizza can be written as 3P, where P is the quantity of pizza consumed. The budget constraint is derived from the fact that the combined spending on beer and pizza cannot exceed the available income. The budget constraint is then the set of combinations of beer and pizza that yield an overall spend of all of the available income, or $18.

### Starting the Graph

In order to graph the budget constraint, it's usually easiest to figure out where it hits each of the axes first. To do this, consider how much of each good could be consumed if all available income was spent on that good. If all of the consumer's income is spent on beer (and none on pizza), the consumer can buy 18/2 = 9 beers, and this is represented by the point (0,9) on the graph. If all of the consumer's income is spent on pizza (and none on beer), the consumer can buy 18/3 = 6 slices of pizza. This is represented by the point (6,0) on the graph.

### Slope

Since the equation for the budget constraint defines a straight line, it can be drawn by just connecting the dots that were plotted in the previous step.

Since the slope of a line is given by the change in y divided by change in x, the slope of this line is -9/6, or -3/2. This slope represents the fact that 3 beers must be given up in order to be able to afford 2 more slices of pizza.

### Graphing All Income

The budget constraint represents all of the points where the consumer is spending all of their income. Therefore, points between the budget constraint and the origin are points where the consumer is not spending all of their income (i.e. is spending less than their income) and points farther from the origin than the budget constraint are unaffordable to the consumer.

### Budget Constraints in General

In general, budget constraints can be written in the form above unless they have special conditions such as volume discounts, rebates, etc. The above formulation states that the price of the good on the x-axis times the quantity of the good on the x-axis plus the price of the good on the y-axis times the quantity of the good on the y-axis has to equal income. It also states that the slope of the budget constraint is the negative of the price of the good on the x-axis divided by the price of the good on the y-axis. (This is a bit odd since the slope is usually defined as the change in y divided by change in x, so be sure not to get it backward.)

Intuitively, the slope of the budget constraint represents how many of the goods on the y-axis the consumer must give up in order to be able to afford one more of the goods on the x-axis.

### Another Formulation

Sometimes, rather than limiting the universe to just two goods, economists write the budget constraint in terms of one good and an "All Other Goods" basket. The price of a share of this basket is set at $1, which means that the slope of this type of budget constraint is just the negative of the price of the good on the x-axis.