Hello! Welcome to the third lesson in our module on Consumer Choice and Demand.
In our last lesson, you learned how to solve the consumer's constrained optimization problem using the Lagrangian method to find the optimal consumption bundle . We saw that this bundle represents the point where the consumer's indifference curve is tangent to their budget line.
Today, we will formalize and generalize that result. We will see that the optimal quantities you solved for are not just specific numbers, but are in fact functions that depend on prices and income. These are among the most important concepts in microeconomics.
Learning Outcome: By the end of this lesson, you will be able to derive Marshallian (ordinary) demand functions from utility maximization.
1. From Optimal Bundles to Demand Functions
In the last lesson, we found the optimal consumption bundle, and , for a given set of prices and income . The crucial insight is that if we treat the prices and income not as fixed numbers but as variables, our solution for the optimal quantities becomes a set of functions:
These are called Marshallian demand functions, named after the economist Alfred Marshall. They tell us the quantity of each good a consumer will demand to maximize their utility for any possible combination of prices and income.
Essentially, a demand function is the output of the consumer's optimization problem. This is the theoretical foundation for the demand curves you have likely encountered before. A demand curve is simply a graphical representation of a Marshallian demand function, where we plot the quantity demanded of one good against its own price, holding all other prices and income constant.
The image below provides the graphical intuition for this process.

2. Deriving Marshallian Demand: A Step-by-Step Example
Let's walk through a complete derivation. The process is exactly what you learned in the previous lesson—solving the utility maximization problem with the Lagrangian—but this time, we will keep prices and income as variables instead of plugging in specific numbers.
The following video provides an excellent, clear example of this derivation for a specific utility function.
Derivation of Marshallian Demand Functions from Utility Function
This video by Harold Walden will guide you through a complete derivation of Marshallian demand functions. It starts with a utility function and budget constraint, sets up the Lagrangian, and solves for the demand functions for two goods.
Please watch the video from the beginning until 15:21. The final recap section (after 15:21) is optional. Pay close attention to how the first-order conditions are used to establish a relationship between x1 and x2, which is then substituted into the budget constraint to solve for each demand function individually.
As you saw in the video, for the utility function , the process yields the following Marshallian demand functions:
Notice that the final expressions are functions of , , and , just as the definition requires. If you were given specific values for these variables, you could plug them in to find the exact quantity demanded.
3. The Cobb-Douglas Case and Properties of Demand
The Cobb-Douglas utility function, , is a cornerstone of microeconomic analysis due to its well-behaved and analytically tractable properties. Let's derive the Marshallian demand functions for this case. The procedure is the same, but the algebra results in a particularly clean and intuitive form.
The utility maximization problem is:
The Lagrangian is:
The first-order conditions (FOCs) are:
Equating the two expressions for from (1) and (2):
Multiplying both sides by to simplify:
This equation gives us the ratio of expenditure on the two goods at the optimum. Now, substitute this into the budget constraint (FOC 3):
Factor out :
Solving for , we get the Marshallian demand for good 1:
By substituting this back into the expenditure ratio or by repeating the process symmetrically for , we find the demand for good 2:
These results are remarkably intuitive. They state that a consumer with Cobb-Douglas preferences spends a constant fraction of their income on each good. The fraction for good 1 is , and the fraction for good 2 is .
Properties of Marshallian Demand Functions
Marshallian demand functions have several important mathematical properties that reflect rational economic behavior. To explore one of these, you can consult this advanced resource.
[PDF] EC9D3 Advanced Microeconomics, Part I: Lecture 2
These lecture notes from the University of Warwick formally define Marshallian demand and discuss its properties. We will focus on one specific property.
Please read the section 'Marshallian Demands' on page 17 of the PDF, and then read 'Property 2' of Marshallian demand on page 24. Focus on understanding the definition and the property of homogeneity.
As the notes explain, Marshallian demand is homogeneous of degree 0 in prices and income. In simpler terms, this means that if you scale all prices and income by the same positive factor, the quantity demanded does not change.
This property is often called "no money illusion." A rational consumer's choices depend on their real purchasing power and relative prices, not on the nominal dollar value of their income. Doubling all prices while simultaneously doubling income leaves the budget constraint unchanged, so the optimal consumption bundle must also remain unchanged.
We can easily verify this for our Cobb-Douglas demand function:
The terms cancel out, confirming the property.
Conclusion
In this lesson, you have made the critical leap from solving for a single optimal point to deriving a general function that describes consumer demand.
Key Takeaways:
- Marshallian demand functions, , are the solution to the consumer's utility maximization problem. They give the optimal quantity of a good demanded as a function of all prices and the consumer's income.
- The derivation process is the same Lagrangian method used to find an optimal bundle, but prices and income are kept as variables.
- Different utility functions lead to different functional forms for demand. For Cobb-Douglas utility, consumers spend a constant fraction of their income on each good.
- Marshallian demand functions are homogeneous of degree 0 in prices and income, reflecting the economic principle of "no money illusion."
Preview for the Next Lesson:
We derived Marshallian demand by maximizing utility for a given income. This is often called the "primal" problem. There is a "dual" problem in consumer theory: what is the minimum amount of money a consumer needs to spend to achieve a specific level of utility? Solving this expenditure minimization problem will lead us to a different, but closely related, type of demand function: the Hicksian (or compensated) demand function. We will tackle this in our next lesson.