Well-functioning competitive markets usually result in an efficient allocation of resources. However, problems can arise that create inefficiencies, or market failure. The social cost of this inefficiency or failure is called deadweight loss . For example, a sales tax drives a wedge between the consumer price and the producer price and reducing the equilibrium quantity sold, resulting in deadweight loss. Externalities are a major source of market failure.
Externalities occur when a third party is affected by a transaction.
These spillover effects can be positive or negative. In the event of a positive externality, the private market produces too little of the good, and a subsidy may be required to generate the socially optimal level of output. A common example of positive externalities, on the consumption side, is education. Negative externalities are detrimental third party effects, with pollution being the classic example on the production side. Negative externalities result in the market producing too much and selling the good for too little when the market is left unregulated.