In perfect competition, firms are price-takers facing a horizontal demand curve at the market price. Each firm maximizes profit where MR = P = MC. In long-run equilibrium, free entry/exit drives price down to minimum ATC, so economic profit = 0. The industry's long-run supply curve is determined by how factor prices change as industry output expands (constant-, increasing-, or decreasing-cost industries).
Compare short-run (firms earn economic profit, losses possible) to long-run (zero economic profit, entry/exit adjusts). Graph individual firm and market simultaneously to see how entry shifts market supply.
You already know that firms maximize profit where MR = MC, and you know the shapes of average and marginal cost curves. Perfect competition wires these tools together into a complete theory of how markets self-regulate through entry and exit. The most important result — zero long-run economic profit — seems paradoxical at first, but it follows inevitably from the logic of free entry.
Start with the short run. Each firm is a price-taker: it faces a horizontal demand curve at the market price P, so MR = P for every unit. The firm produces where P = MC and earns economic profit if P > ATC at that output, or takes a loss if P < ATC. Notice that short-run losses don't force immediate exit — a firm stays open as long as P > AVC, because it's better to cover variable costs and lose only fixed costs than to shut down and lose all fixed costs. This is the shutdown rule from profit maximization theory, now in context: exit is about comparing price to AVC, not ATC.
Now run the entry-exit machine. If price is above minimum ATC, firms earn positive economic profit. This is the signal that attracts new entrants — capital is earning above its opportunity cost here. Entry increases market supply, which pushes the market price down. Entry continues until price falls to minimum ATC, at which point economic profit = 0 and there's no incentive for further entry. The reverse operates for losses: price below minimum ATC drives exit, supply contracts, price rises, and exit stops at zero profit. The long-run equilibrium is therefore always at the bottom of the ATC curve: P = minimum ATC = MC. This is a remarkable result — competitive pressure forces efficiency.
The long-run industry supply curve captures how this adjustment plays out as industry output expands. In a constant-cost industry, new entry doesn't change input prices (the industry is small relative to input markets), so minimum ATC stays constant and the long-run supply curve is horizontal. In an increasing-cost industry, expansion bids up input prices (land, specialized labor), raising ATC and the long-run equilibrium price — the supply curve slopes upward. In a decreasing-cost industry, expansion generates economies in input production (economies of scale in supplying inputs), so ATC falls as the industry grows — the long-run supply curve slopes downward. These aren't exotic special cases; they're the mechanism by which industry expansion feeds back into costs.
Zero economic profit does not mean firms are barely surviving. Economic profit is profit above the opportunity cost of capital — the return the firm's owners could have earned in their best alternative investment. Zero economic profit means the firm earns exactly that competitive return. Accountants may record a healthy profit; economists net out the opportunity cost and call it zero. This distinction explains why competitive industries can be full of profitable, well-run firms in accounting terms while economists correctly say there's no economic rent being earned. The signal function of economic profit — "come here, capital is earning above its opportunity cost" — is precisely what drives the entry mechanism that makes competition self-regulating.