The only thing that all four market structures have in common is that firms in all four are trying to maximize profits or minimize losses. And they all do this by producing at the quantity where marginal revenue equals marginal costs.