In the short run some inputs, usually the plant and its machines, are fixed. In the long run everything can change. Comparing the two cost functions explains the shape of the long-run average cost curve.
Key idea
For any output, short-run cost with capital fixed at $\bar K$ is never below long-run cost: $$C_{SR}(q; \bar K) \ge C_{LR}(q),$$ with equality at the output for which $\bar K$ is the best plant. The long-run average cost curve is the lower envelope of the short-run average cost curves: it touches each one at a single point.
Why it works
The long run chooses the cheapest of all input mixes, including the one with capital $\bar K$. A minimum over a bigger set can't be higher than the minimum over a smaller set, so $C_{LR} \le C_{SR}$. They are equal when $\bar K$ is exactly the capital the long run would pick. Away from that output, the fixed plant is the wrong size: too small (workers crowd the machines) or too big (machines sit idle).
Worked example: Short run versus long run
$Q = \sqrt{KL}$, $w = r = 1$, capital fixed at $\bar K = 10$. Compare costs at $q = 10$ and $q = 20$.
- Long run: $K/L = w/r = 1$, so $K = L = q$ and $C_{LR} = 2q$.
- Short run: $L = q^2/10$, so $C_{SR} = 10 + q^2/10$.
- $q = 10$: both cost 20. $q = 20$: short run $10 + 40 = 50$, long run 40.
Answer: Equal (20) at $q = 10$; at $q = 20$ the short run costs \$10 more.
Worked example: Where they touch
$Q = \sqrt{KL}$, $w = 4$, $r = 1$, $\bar K = 40$. At what output is this plant the best one?
- Long run: $K = q\sqrt{w/r} = 2q$.
- $\bar K = 40$ is best when $2q = 40$: $q = 20$.
- Check: $C_{SR}(20) = 40 + 4\cdot\dfrac{400}{40} = 80$ and $C_{LR}(20) = 2(20)\sqrt{4} = 80$.
Answer: $q = 20$.
Common mistake
Thinking the long-run average cost curve passes through the lowest point of every short-run curve. It touches each short-run curve where that plant is the best choice for the output. When long-run average cost is falling, the touching point is to the left of the short-run minimum (it pays to run a slightly bigger plant below its best output); when it is rising, to the right. Only at the bottom of the long-run curve do the two minimums coincide. Check: compare slopes at the touching point. Both curves have the same slope there, so if the long-run curve is falling, so is the short-run one.
With constant returns to scale and fixed input prices, as in these examples, long-run average cost is flat ($C_{LR}/q = 2\sqrt{wr}$), and each short-run curve touches it exactly at its own minimum. The envelope shape with economies and diseconomies of scale comes from returns to scale that change with size.