The shapes of the cost curves

Diminishing returns make marginal cost rise, marginal cost cuts average variable and average total cost at their lowest points because a marginal below an average pulls it down and one above pushes it up, and input prices or productivity shift the curves.

From AP Microeconomics.