Supply is "the willingness and ability of producers to produce a quantity of a good or service." The law of supply states that "as the price of a good rises, the quantity supplied will normally rise", ceteris paribus, meaning "other things being equal." There is therefore a positive relationship between price and quantity supplied, which is why the supply curve slopes upwards. This relationship rests on two linked assumptions about production in the short run: the law of diminishing marginal returns, and the increasing marginal costs that it causes.
The short run is the period in which at least one factor of production, such as a firm's factory, machinery or land, is fixed. To increase output, a firm can only add more of its variable factors, such as workers, to the fixed factor. At first, each extra worker may add more output than the one before, because workers can specialise in particular tasks and become more efficient at them. Specialisation therefore raises the marginal product of labour, the extra output produced by each additional worker. However, beyond a certain point, as more and more workers are added to the same fixed factory and equipment, the workplace becomes overcrowded. Workers have to share machines, wait for equipment and get in each other's way. Each additional worker therefore adds less output than the previous one. This is the law of diminishing marginal returns: as more units of a variable factor are added to a fixed factor, the extra output from each additional unit eventually falls.
Marginal costs are "the additional costs of producing one more unit of output." Diminishing marginal returns directly cause marginal costs to increase. Suppose each worker is paid the same wage. When marginal returns are diminishing, each additional worker produces fewer extra units than the one before, but still costs the same wage. The cost of each extra unit of output therefore rises: the firm has to pay the same amount for a smaller increase in output. For example, if a worker costs $100 a day and the tenth worker adds 20 units, each of those units costs $5. If overcrowding means the eleventh worker adds only 10 units, each of those units costs $10. As output increases in the short run, each additional unit is therefore more expensive to produce than the last.
A profit-maximising firm will only produce an extra unit if the price it receives covers the marginal cost of producing it. Because diminishing marginal returns cause marginal costs to rise as output increases, the firm will only supply more if the price is higher. In Figure 1, at price P1 the firm is willing to supply Q1, at point A. Producing beyond Q1 would mean producing units whose marginal cost is above P1, so they would not be profitable. When the price rises to P2, these extra units now cover their higher marginal costs, so the firm increases quantity supplied to Q2, at point B. This is a movement up the supply curve. Since the price must rise to cover the increasing marginal cost of each extra unit, the quantity supplied increases only as price rises, so the supply curve slopes upwards, as the law of supply states.