Since these two individuals are involved in the economic transaction and are the only ones involved in the transaction, all the costs and benefits can be said to be "internal" to the economic transaction. In this case, the social cost is the same as the private cost.
In some cases, there are costs or benefits imposed upon parties not involved in the economic exchange. If someone decides to light and smoke a cigarette, for example, they incur costs, namely increased health risk and the cost of one cigarette. The smoker also gains benefits: the enjoyment of the cigarette. Other individuals around the smoker may also suffer costs or enjoy benefits. Some people like the smell of cigarette smoke. Others may detest it. Everyone around the smoker is put at some higher risk of health problems. The individual making the economic choice, in this case, is the smoker. In this case, unlike the lemonade case, there are costs and benefits that are incurred on agents outside the economic transaction--costs and benefits "external" to the economic activity. These costs and benefits are known as externalities.
Negative externalities (external costs) lead to an over-production of those goods that have a high social cost. For example, the logging of trees for timber may result in society losing a recreation area, shade, beauty, and air quality, but this loss is usually not quantified and included in the price of the timber that is made from the trees. As a result, individual entities in the marketplace have no incentive to factor in these externalities. More of this activity is performed than would be if its cost had a true accounting.
This can be illustrated with a diagram. Profit-maximizing organizations will set output at Qp where marginal private costs (MPC) is equal to marginal revenue (MR). (This diagram assumes perfect competition, under which price (P) equals MR.) This will yield a profit shown by the triangular area 0,C,F.
But if externalities are present, the attainment of social optimality requires that the full social costs must be considered. The socially optimum level of output is Qs where marginal social costs (MSC) is equal to marginal revenue (MR). The amount of output, Qp minus Qs, indicates the excess output due to the externality. Profits will decrease also, from 0,C,F to 0,A,F. It is clearly profitable for the firm to pollute, since "internalizing the externality" hurts profits. The amount of the externality will decrease from C,D to B,A.
Because the marginal social cost curve (MSC) is above the marginal private cost curve (MPC), this diagram illustrates the case of a negative externality. If the marginal social cost curve was below the marginal private cost curve, it would be a positive externality and social optimality would require a greater output than Qp rather than a reduction of output.
Because the market mechanism fails to factor in the total cost to society, output decisions are flawed, resources are allocated inefficiently, and social welfare is reduced. One method of reducing the effect of this market failure is to impose a Pigovian tax equal to the amount of the negative externality (or impose a subsidy in the case of a positive externality).