A tax can correct for a negative externality and a subsidy to producers can correct for a positive externality because the tax shifts the cost onto the firms, producing the product and decreasing output, and the subsidy increases the supply and increases output.