Perfect competition is an ideal market structure where many small firms produce identical goods, there are no barriers to entry or exit, and both buyers and sellers have perfect information. Under perfect competition in the long run, firms earn zero economic profit and both allocative and productive efficiency are achieved as price equals marginal cost and firms produce at minimum average total cost.