In an exchange economy with
Two persons (A and B)
Two goods (1 and 2)
Where
p denotes price
x(p) denotes demand function
w denots endownment
e(p) denotes net demand function for each individual
z(p) denotes excess demand function for the market
Here goes the prove for Walras's Law for 2 market case (Varian Intermediate Microeconomics)
First consider two identities:
p1 * xA1(p1,p2) + p2 * xA2(p1,p2) = p1 * wA1 + p2 * wA2 (A's budget constraint)
p1 * xB1(p1,p2) + p2 * xB2(p1,p2) = p1 * wB1 + p2 * wB2 (B's budget constraint)
Rearrange:
p1 [xA1 - wA1] + p2 [xA2 - wA2] =0 => p1 * eA1(p1,p2) + p2 * eA2(p1,p2) = 0
p1 [xB1 - wB1] + p2 [xB2 - wB2] =0 => p1 * eB1(p1,p2) + p2 * eB2(p1,p2) = 0
Adding two equation together:
p1 [eA1 + eB1] + p2 [eA2 + eB2] = 0 =>
p1 * z1(p1,p2) + p2 * z2(p1,p2) = 0
Therefore, if N-1 market (in this case where N=2) is in equilibrium:
z1(p1,p2) = 0
Then the remaining market must in equilibrium:
z2(p1,p2) = 0