In: Economics
A market failure occurs when the market does not clear on the free forces of demand and supply, as a result of which all consumers who are willing to buy a good at a price cannot buy the desired quantity and all producers who are willing to accept a price cannot sell the desired quantity at the market prevant price.
In some case, market failure does not automatically correct itself. For example, if government imposes a price floor (ceiling) that is above (below) free market price, there is a surplus (shortage) in market which is not automatically eliminated since the government has imposed legal restrictions on the price which is independent of demand and supply. Similarly, if there is a negative externality that is not internalized, the socially efficient price is higher and quantity is lower than free market equilibrium price and quantity, which cannot be automatically achieved without intervention.
For example, a factory built on the side of a river dumps its chemical waste into the river, thereby polluting the river, destroying the marine life and causing negative externality. Without intervention, this factory will produce too much output at too low a price compared to efficient output and price. The government can achieve a solution (if the cost of externality is identified and computed) by imposing an externality (Pigouvian) tax equal to the external unit cost when output equals efficient level of output.