This graph illustrates the core insight of consumer choice theory: a rational consumer maximizes utility by choosing the bundle of goods where their indifference curve is exactly tangent to their budget constraint. At this tangency point, the marginal rate of substitution (\(\mathrm{MRS}\))—the rate at which the consumer is willing to trade \(Y\) for \(X\)—equals the price ratio \(P_x / P_y\)—the rate at which the market allows them to trade. Any other affordable bundle on the budget line lies on a lower indifference curve, meaning less satisfaction.
Experiment with the sliders to build intuition for how the optimal bundle shifts. Increasing \(P_x\) pivots the budget constraint inward along the \(X\)-axis, reducing the affordable set and pulling the optimal bundle toward less \(X\) and more \(Y\). Changing the preference parameter \(\alpha\) redistributes spending: a higher \(\alpha\) means the consumer values \(X\) more and devotes a larger share of income to it, shifting the tangency point rightward. Notice that no matter where the parameters land, the tangency condition \(\mathrm{MRS} = P_x/P_y\) always holds at the optimum.
The dashed indifference curves above and below the optimal one reinforce why tangency is special. Curves above the budget line represent higher utility but are unaffordable. Curves below it are affordable but leave money on the table—the consumer could do better by moving along the budget line toward the tangency point. Only the curve that just touches the budget line achieves the highest feasible utility, making it the unique solution to the consumer's optimization problem.