Marginal cost is defined as the change in total cost of production if the number of units being produced is increased by one. The total cost of production for one unit has two components, one is a fixed cost and the other is a variable cost. Variable cost is the amount spent on labor, raw materials, etc. for each item. This does not change with an increase in the number of items produced. The fixed cost for each item is equal to the capital expenditure which includes construction of the facility, purchase of machinery, etc. per unit.
As the number of units produced increases the fixed cost per unit decreases as the same figure is being divided by a larger number. It should be noted that there is no change in the variable cost. This leads to a decrease in the marginal cost and is referred to as economies of scale. The decrease in marginal cost does not go on forever; at a particular stage to increase the number of units produced it would be essential to expand the facility, buy new machinery, etc. which requires more capital expenditure. At the point where this happens the marginal cost curve starts to slope upwards. This is referred to as diseconomies of scale.
The marginal cost curve is U-shaped due to an initial decrease in cost due to economies of scale followed by an increase in cost when diseconomies of scale set in.