The first thing to do in this question is to make sure to define the terms. A negative externality is the negative unintended spill-over effects of an economic activity. In this case, when the factory produces their goods they cause pollution, which has a negative effect on society. There exists a market failure because society would benefit from less production of these goods. We may show this in a diagram. Make sure to label the y-axis price, and the x-axis quantity. Draw an upwards sloping marginal private benefit (MPC) curve, and a marginal social cost (MSC) curve above it, as the marginal social cost is higher than the marginal private cost. Draw a downwards sloping marginal private benefit (MPB) curve. This is your demand curve. Where MSC intersects MPB is the optimal price and optimal quantity, because here we are consuming as much as is optimal for society. We can show the welfare loss to society on this graph, by looking at the current quantity and price supplied in the market, and completing the triangle between the MPC, MSC and above the MPC curve. This illustrates that production is higher than the optimal quantity. To correct this market failure, one might implement a pollution tax. With an optimal tax, this would make it more expensive for the factory to produce their goods or services, shifting the MPC to meet the MSC curve. Now the welfare loss is eliminated, and the price and quantity are at the socially optimal level. There no longer exist any externalities in this market.