On the x-axis we have quantity, on the y-axis (instead of price) we have costs/benefits. For an externality in consumption (positive or negative) the "supply line" is always labelled as marginal private cost=marginal social cost. The positive/negative part comes from which of the the "demand lines", labelled as marginal private benefit and marginal social benefit, is above the other. You just need to look at it logically- if the msb is greater than the mpb then there is a positive externality taking place and vice versa for a negative one. You are looking for what is better for SOCIETY, not private firms/individuals.Similarly, for an externality in production, the "demand line" is always labelled as marginal private benefit equals marginal social benefit. Whichever "supply line" is above the other determines whether there is a positive or negative externality.A positive externality will lead to an UNDER-consumption/production, whereas a negative one will cause an OVER-consumption/production.*I would have drawn a diagram but i couldn't find the button for it.