An externality is an uncompensated effect of an action on others outside the transaction. Negative effects can cause overproduction and positive effects underproduction relative to a social optimum.
Hypothetical linear models. Negative: MB = 12 − Q, MPC = 2 + Q, MSC = 4 + Q. Positive: MC = 2 + Q, MPB = 10 − Q, MSB = 12 − Q. The 2 CU marginal external effect is added exactly once.