The heart of microeconomic analysis is the interaction of supply and demand. The law of demand states that, holding everything else constant, as the price of a good rises the quantity demanded falls, producing a downward-sloping demand curve. The law of supply states the opposite: as price rises, the quantity supplied increases, generating an upward-sloping supply curve because higher prices give producers stronger incentives to bring goods to market.
The position of each curve is not fixed. The demand curve shifts when factors such as income, tastes, the prices of related goods (substitutes or complements), expectations, or the number of buyers change; only changes in the good's own price cause movement along the curve. Similarly, the supply curve shifts with changes in input prices, technology, the number of sellers, expectations, or government policies such as taxes and subsidies. Distinguishing shifts from movements along a curve is essential for interpreting how markets respond to real-world events.
Market equilibrium occurs at the price where quantity supplied equals quantity demanded, leaving no shortage or surplus. The welfare created at equilibrium can be measured in two ways. Consumer surplus is the difference between what buyers are willing to pay and what they actually pay, shown as the area above the equilibrium price and below the demand curve. Producer surplus is the difference between what sellers receive and the minimum they would accept, shown as the area below the equilibrium price and above the supply curve. Governments sometimes intervene with price ceilings, legal maximums set below equilibrium that create shortages, or price floors, legal minimums set above equilibrium that create surpluses, as seen with minimum wage laws.