Walras's law

Walras's law states that 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.

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.