The competitive firm in the short run

A firm that takes the market price as given maximizes profit where marginal cost equals price, stays open while price covers average variable cost, and its marginal cost curve above that point is its supply curve.

From Principles of Microeconomics.