# Walras's law

Walras's law is a principle in general equilibrium theory asserting that budget constraints imply that the values of excess demand (or, conversely, excess market supplies) must sum to zero regardless of whether the prices are general equilibrium prices. That is:
    $\sum _{j=1}^{k}p_{j}\cdot (D_{j}-S_{j})=0,$
where $p_{j}$ is the price of good j and $D_{j}$ and $S_{j}$ are the demand and supply respectively of good j.
Walras's law is named after the economist Léon Walras of the University of Lausanne who formulated the concept in his Elements of Pure Economics of 1874. Although the concept was expressed earlier but in a less mathematically rigorous fashion by John Stuart Mill in his Essays on Some Unsettled Questions of Political Economy (1844), Walras noted the mathematically equivalent proposition that when considering any particular market, if all other markets in an economy are in equilibrium, then that specific market must also be in equilibrium. The term "Walras's law" was coined by Oskar Lange to distinguish it from Say's law. Some economic theorists also use the term to refer to the weaker proposition that the total value of excess demands cannot exceed the total value of excess supplies.

## Definitions

* A market for a particular commodity is in equilibrium if, at the current prices of all commodities, the quantity of the commodity demanded by potential buyers equals the quantity supplied by potential sellers. For example, suppose the current market price of cherries is $1 per pound. If all cherry farmers summed together are willing to sell a total of 500 pounds of cherries per week at $1 per pound, and if all potential customers summed together are willing to buy 500 pounds of cherries in total per week when faced with a price of $1 per pound, then the market for cherries is in equilibrium because neither shortages nor surpluses of cherries exist.
* An economy is in general equilibrium if every market in the economy is in partial equilibrium. Not only must the market for cherries clear, but so too must all markets for all commodities (apples, automobiles, etc.) and for all resources (labor and economic capital) and for all financial assets, including stocks, bonds, and money.
* 'Excess demand' refers to a situation in which a market is not in equilibrium at a specific price because the number of units of an item demanded exceeds the quantity of that item supplied at that specific price. Excess demand yields an economic shortage. A negative excess demand is synonymous with an excess supply, in which case there will be an economic surplus of the good or resource. 'Excess demand' may be used more generally to refer to the algebraic value of quantity demanded minus quantity supplied, whether positive or negative.

## Walras's law

Walras's law is a consequence of finite budgets. If a consumer spends more on good A then they must spend and therefore demand less of good B, reducing B's price. The sum of the values of excess demands across all markets must equal zero, whether or not the economy is in a general equilibrium. This implies that if positive excess demand exists in one market, negative excess demand must exist in some other market. Thus, if all markets but one are in equilibrium, then that last market must also be in equilibrium.
This last implication is often applied in formal general equilibrium models. In particular, to characterize general equilibrium in a model with m agents and n commodities, a modeler may impose market clearing for n – 1 commodities and "drop the n-th market-clearing condition." In this case, the modeler should include the budget constraints of all m agents (with equality). Imposing the budget constraints for all m agents ensures that Walras's law holds, rendering the n-th market-clearing condition redundant. In other words, suppose there are 100 markets, and someone saw that 99 are in equilibrium, they would know the remaining market must also be in equilibrium without having to look.
In the former example, suppose that the only commodities in the economy are cherries and apples, and that no other markets exist. This is an exchange economy with no money, so cherries are traded for apples and vice versa. If excess demand for cherries is zero, then by Walras's law, excess demand for apples is also zero. If there is excess demand for cherries, then there will be a surplus (excess supply, or negative excess demand) for apples; and the market value of the excess demand for cherries will equal the market value of the excess supply of apples.
Walras's law is ensured if every agent's budget constraint holds with equality. An agent's budget constraint is an equation stating that the total market value of the agent's planned expenditures, including saving for future consumption, must be less than or equal to the total market value of the agent's expected revenue, including sales of financial assets such as bonds or money. When an agent's budget constraint holds with equality, the agent neither plans to acquire goods for free (e.g., by stealing), nor does the agent plan to give away any goods for free. If every agent's budget constraint holds with equality, then the total market value of all agents' planned outlays for all commodities (including saving, which represents future purchases) must equal the total market value of all agents' planned sales of all commodities and assets. It follows that the market value of total excess demand in the economy must be zero, which is the statement of Walras's law. Walras's law implies that if there are n markets and n – 1 of these are in equilibrium, then the last market must also be in equilibrium, a property which is essential in the proof of the existence of equilibrium.

## Formal statement

Consider an exchange economy with $n$ agents and $k$ divisible goods.
For every agent $i$, let $E_{i}$ be their initial endowment vector and $x_{i}$ their Marshallian demand function (demand vector as a function of prices and income).
Given a price vector $p$, the income of consumer $i$ is $p\cdot E_{i}$. Hence, their demand vector is $x_{i}(p,p\cdot E_{i})$.
The excess demand function is the vector function:
    $z(p)=\sum _{i=1}^{n}(x_{i}(p,p\cdot E_{i})-E_{i})$
Walras's law can be stated succinctly as:
    $p\cdot z(p)=0$
This can be proven using the definition of excess demand:
    $p\cdot z(p)=\sum _{i=1}^{n}(p\cdot x_{i}(p,p\cdot E_{i})-p\cdot E_{i})$
The Marshallian demand is a bundle $x$ that maximizes the agent's utility, given the budget constraint. The budget constraint here is:
    $p\cdot x_{i}=p\cdot E_{i}$ for each $i$
Hence, all terms in the sum are 0 so the sum itself is 0.$^{:317–318}$

## Implications
### Labor market

Neoclassical macroeconomic reasoning concludes that because of Walras's law, if all markets for goods are in equilibrium, the market for labor must also be in equilibrium. Thus, by neoclassical reasoning, Walras's law contradicts the Keynesian conclusion that negative excess demand and consequently, involuntary unemployment, may exist in the labor market, even when all markets for goods are in equilibrium. The Keynesian rebuttal is that this neoclassical perspective ignores financial markets, which may experience excess demand (such as a "liquidity trap") that permits an excess supply of labor and consequently, temporary involuntary unemployment, even if markets for goods are in equilibrium.