The law states that the value of excess demand is zero. The excess demand, zi, for good i is the difference between demand, xi, and the sum of supply from firms, yi, and the initial endowment, ωi; hence zi = xi − yi − ωi. Noting that demand and supply are both functions of prices, Walras’s law states that for an economy with n goods
for any prices pi, i = 1,…, n. The law implies that in an economy with n markets there are only n − 1 independent demand–supply equations. Hence, when the general equilibrium for an economy with n goods is studied only n − 1 markets need to be analysed. If a set of prices can be found that place these n − 1 markets in equilibrium then the prices also ensure the nth market is in equilibrium.