# Excess demand function

In microeconomics, excess demand, also known as shortage, is a phenomenon where the demand for goods and services exceeds that which the firms can produce.
In microeconomics, an excess demand function is a function expressing excess demand for a product—the excess of quantity demanded over quantity supplied—in terms of the product's price and possibly other determinants. It is the product's demand function minus its supply function. In a pure exchange economy, the excess demand is the sum of all agents' demands minus the sum of all agents' initial endowments.
A product's excess supply function is the negative of the excess demand function—it is the product's supply function minus its demand function. In most cases the first derivative of excess demand with respect to price is negative, meaning that a higher price leads to lower excess demand.
The price of the product is said to be the equilibrium price if it is such that the value of the excess demand function is zero: that is, when the market is in equilibrium, meaning that the quantity supplied equals the quantity demanded. In this situation it is said that the market clears. If the price is higher than the equilibrium price, excess demand will normally be negative, meaning that there is a surplus (positive excess supply) of the product, and not all of it being offered to the marketplace is being sold. If the price is lower than the equilibrium price, excess demand will normally be positive, meaning that there is a shortage.
Walras' law implies that, for every price vector, the price–weighted total excess demand is 0, whether or not the economy is in general equilibrium. This implies that if there is excess demand for one commodity, there must be excess supply for another commodity.

## Market dynamics

The concept of an excess demand function is important in general equilibrium theories, because it acts as a signal for the market to adjust prices. The assumption is that the rate of change of the price of a commodity will be proportional to the value of the excess demand function for that commodity, eventually leading to an equilibrium state in which excess demand for all commodities is zero. If continuous time is assumed, the adjustment process is expressed as a differential equation such as
    ${\frac {dP}{dt}}=\lambda \cdot f(P,...)$
where P is the price, f is the excess demand function, and $\lambda$ is the speed-of-adjustment parameter that can take on any positive finite value (as it goes to infinity we approach the instantaneous-adjustment case). This dynamic equation is stable provided the derivative of f with respect to P is negative—that is, if a rise (or, fall) in the price decreases (or, increases) the extent of excess demand, as would normally be the case.
If the market is analyzed in discrete time, then the dynamics are described by a difference equation such as
    $P_{t+1}=P_{t}+\delta \cdot f(P_{t},...)$
where $P_{t+1}-P_{t}$ is the discrete-time analog of the continuous time expression ${\frac {dP}{dt}}$, and where $\delta$ is the positive speed-of-adjustment parameter which is strictly less than 1 unless adjustment is assumed to take place fully in a single time period, in which case $\delta =1$.

## Sonnenschein–Mantel–Debreu theorem

The Sonnenschein–Mantel–Debreu theorem is an important result concerning excess demand functions, proved by Gérard Debreu, Rolf Mantel [es], and Hugo F. Sonnenschein in the 1970s. It states that the excess demand curve for a market populated with utility-maximizing rational agents can take the shape of any function that is continuous, homogeneous of degree zero, and in accord with Walras's law. This implies that market processes will not necessarily reach a unique and stable equilibrium point, because the excess demand curve need not be downward-sloping.