Definition: An externality is an unintended side effect that result from production or consumption of a good, affecting the third parties.When the market experiences externalities, it fails to reach social optimum levels where Marginal Social Benefit is equal to Marginal Social Cost.MSB = MSCMSB is the extra benefit to society following the consumption or production of one extra unit of a good. MSC is the extra cost to society following the consumption or production of one extra unit of a good.Externalities can be positive or negative and relate to production or consumption. A negative externality has a negative effect on society and produces a welfare loss. A positive externality is one which has an unintended positive effect on society and produces a potential welfare gain.Examples of externalities:Negative externality of consumption - Where Marginal Private Cost (MPC) is above the Marginal Social Cost (MSC). There is a welfare loss between MSC and MPC.An example of this is cigarettes.Negative externality of production - Where Marginal Private Cost (MPC) is above the Marginal Social Cost (MSC). There is a welfare loss between MSC and MPC.An example of this is education.Positive externality of production - Where Marginal Social Benefit (MSB) exceeds the Marginal Private Benefit (MPB). There is a potential welfare gain between MSB and MPB.An example of this is the use of wind farms to generate electricity.Negative externalities are a result of overconsumption or overproduction, while positive externalities are a result of underconsumption or underproduction. Governments may intervene to correct both of these.