# Supply and demand

In microeconomics, supply and demand is an economic model of price determination in a market. It postulates that, holding all else equal, the unit price for a particular good or other traded item in a perfectly competitive market, will vary until it settles at the market-clearing price, where the quantity demanded equals the quantity supplied such that an economic equilibrium is achieved for price and quantity transacted. The concept of supply and demand forms the theoretical basis of modern economics.
In situations where a firm has market power, its decision on how much output to bring to market influences the market price, in violation of perfect competition. There, a more complicated model should be used; for example, an oligopoly or differentiated-product model. Likewise, where a buyer has market power, models such as monopsony will be more accurate.
In macroeconomics, as well, the aggregate demand-aggregate supply model has been used to depict how the quantity of total output and the aggregate price level may be determined in equilibrium.

## Graphical representations
### Supply schedule

A supply schedule, depicted graphically as a supply curve, is a table that shows the relationship between the price of a good and the quantity supplied by producers. Under the assumption of perfect competition, supply is determined by marginal cost: Firms will produce additional output as long as the cost of extra production is less than the market price.
A rise in the cost of raw materials would decrease supply, shifting the supply curve to the left because at each possible price a smaller quantity would be supplied. This shift may also be thought of as an upwards shift in the supply curve, because the price must rise for producers to supply a given quantity. A fall in production costs would increase supply, shifting the supply curve to the right and down.
Mathematically, a supply curve is represented by a supply function, giving the quantity supplied as a function of its price and as many other variables as desired to better explain quantity supplied. The two most common specifications are:
1) linear supply function, e.g., the slanted line
    $Q(P)=3P-6$, and
2) the constant-elasticity supply function (also called isoelastic or log-log or loglinear supply function), e.g., the smooth curve
    $Q(P)=5P^{0.5}$
which can be rewritten as
    $\log Q(P)=\log 5+0.5\log P$
The concept of a supply curve assumes that firms are perfect competitors, having no influence over the market price. This is because each point on the supply curve answers the question, "If this firm is faced with this potential price, how much output will it sell?" If a firm has market power—in violation of the perfect competitor model—its decision on how much output to bring to market influences the market price. Thus the firm is not "faced with" any given price, and a more complicated model, e.g., a monopoly or oligopoly or differentiated-product model, should be used.
Economists distinguish between the supply curve of an individual firm and the market supply curve. The market supply curve shows the total quantity supplied by all firms, so it is the sum of the quantities supplied by all suppliers at each potential price (that is, the individual firms' supply curves are added horizontally).
Economists distinguish between short-run and long-run supply curve. Short run refers to a time period during which one or more inputs are fixed (typically physical capital), and the number of firms in the industry is also fixed (if it is a market supply curve). Long run refers to a time period during which new firms enter or existing firms exit and all inputs can be adjusted fully to any price change. Long-run supply curves are flatter than short-run counterparts (with quantity more sensitive to price, more elastic supply).
Common determinants of supply are:
* Prices of inputs, including wages
* The technology used, productivity
* Firms' expectations about future prices
* Number of suppliers (for a market supply curve)

### Demand schedule

A demand schedule, depicted graphically as a demand curve, represents the amount of a certain good that buyers are willing and able to purchase at various prices, assuming all other determinants of demand are held constant, such as income, tastes and preferences, and the prices of substitute and complementary goods. Generally, consumers will buy an additional unit as long as the marginal value of the extra unit is more than the market price they pay. According to the law of demand, the demand curve is always downward-sloping, meaning that as the price decreases, consumers will buy more of the good.
Mathematically, a demand curve is represented by a demand function, giving the quantity demanded as a function of its price and as many other variables as desired to better explain quantity demanded. The two most common specifications are linear demand, e.g., the slanted line
    $Q(P)=32-2P$
and the constant-elasticity demand function (also called isoelastic or log-log or loglinear demand function), e.g., the smooth curve
    $Q(P)=3P^{-2}$
which can be rewritten as
    $\log Q(P)=\log 3-2\log P$
As a matter of historical convention, a demand curve is drawn with price on the vertical y-axis and demand on the horizontal x-axis. In keeping with modern convention, a demand curve would instead be drawn with price on the x-axis and demand on the y-axis, because price is the independent variable and demand is the variable that is dependent upon price.
Just as the supply curve parallels the marginal cost curve, the demand curve parallels marginal utility, measured in dollars. Consumers will be willing to buy a given quantity of a good, at a given price, if the marginal utility of additional consumption is equal to the opportunity cost determined by the price, that is, the marginal utility of alternative consumption choices. The demand schedule is defined as the willingness and ability of a consumer to purchase a given product at a certain time.
The demand curve is generally downward-sloping, but for some goods it is upward-sloping. Two such types of goods have been given definitions and names that are in common use: Veblen goods, goods which because of fashion or signalling are more attractive at higher prices, and Giffen goods, which, by virtue of being inferior goods that absorb a large part of a consumer's income (e.g., staples such as the classic example of potatoes in Ireland), may see an increase in quantity demanded when the price rises. The reason the law of demand is violated for Giffen goods is that the rise in the price of the good has a strong income effect, sharply reducing the purchasing power of the consumer so that he switches away from luxury goods to the Giffen good, e.g., when the price of potatoes rises, the Irish peasant can no longer afford meat and eats more potatoes to cover for the lost calories.
As with the supply curve, the concept of a demand curve requires that the purchaser be a perfect competitor—that is, that the purchaser have no influence over the market price. This is true because each point on the demand curve answers the question, "If buyers are faced with this potential price, how much of the product will they purchase?" But, if a buyer has market power (that is, the amount he buys influences the price), he is not "faced with" any given price, and we must use a more complicated model, of monopsony.
As with supply curves, economists distinguish between the demand curve for an individual and the demand curve for a market. The market demand curve is obtained by adding the quantities from the individual demand curves at each price.
Common determinants of demand are:
* Income
* Tastes and preferences
* Prices of related goods and services
* Consumers' expectations about future prices and incomes
* Number of potential consumers
* Advertising

### History of the curves

Since supply and demand can be considered as functions of price they have a natural graphical representation. Demand curves were first drawn by Augustin Cournot in his Recherches sur les Principes Mathématiques de la Théorie des Richesses (1838) – see Cournot competition. Supply curves were added by Fleeming Jenkin in The Graphical Representation of the Laws of Supply and Demand... of 1870. Both sorts of curve were popularised by Alfred Marshall who, in his Principles of Economics (1890), chose to represent price – normally the independent variable – by the vertical axis; a practice which remains common.
If supply or demand is a function of other variables besides price, it may be represented by a family of curves (with a change in the other variables constituting a shift between curves) or by a surface in a higher dimensional space.

## Microeconomics
### Equilibrium

Generally speaking, an equilibrium is defined to be the price-quantity pair where the quantity demanded is equal to the quantity supplied. It is represented by the intersection of the demand and supply curves. The analysis of various equilibria is a fundamental aspect of microeconomics.

#### Market equilibrium

A situation in a market when the price is such that the quantity demanded by consumers is correctly balanced by the quantity that firms wish to supply. In this situation, the market clears.

#### Changes in market equilibrium

Practical uses of supply and demand analysis often center on the different variables that change equilibrium price and quantity, represented as shifts in the respective curves. Comparative statics of such a shift traces the effects from the initial equilibrium to the new equilibrium.

#### Demand curve shifts

When consumers increase the quantity demanded at a given price, it is referred to as an increase in demand. Increased demand can be represented on the graph as the curve being shifted to the right. At each price point, a greater quantity is demanded, as from the initial curve D$_1$ to the new curve D$_2$. In the diagram, this raises the equilibrium price from P$_1$ to the higher P$_2$. This raises the equilibrium quantity from Q$_1$ to the higher Q$_2$. (A movement along the curve is described as a "change in the quantity demanded" to distinguish it from a "change in demand", that is, a shift of the curve.) The increase in demand has caused an increase in (equilibrium) quantity. The increase in demand could come from changing tastes and fashions, incomes, price changes in complementary and substitute goods, market expectations, and number of buyers. This would cause the entire demand curve to shift changing the equilibrium price and quantity. Note in the diagram that the shift of the demand curve, by causing a new equilibrium price to emerge, resulted in movement along the supply curve from the point (Q$_1$, P$_1$) to the point (Q$_2$, P$_2$).
If the demand decreases, then the opposite happens: a shift of the curve to the left. If the demand starts at D$_2$, and decreases to D$_1$, the equilibrium price will decrease, and the equilibrium quantity will also decrease. The quantity supplied at each price is the same as before the demand shift, reflecting the fact that the supply curve has not shifted; but the equilibrium quantity and price are different as a result of the change (shift) in demand.

#### Supply curve shifts

When technological progress occurs, the supply curve shifts. For example, assume that someone invents a better way of growing wheat so that the cost of growing a given quantity of wheat decreases. Otherwise stated, producers will be willing to supply more wheat at every price and this shifts the supply curve S$_1$ outward, to S$_2$—an increase in supply. This increase in supply causes the equilibrium price to decrease from P$_1$ to P$_2$. The equilibrium quantity increases from Q$_1$ to Q$_2$ as consumers move along the demand curve to the new lower price. As a result of a supply curve shift, the price and the quantity move in opposite directions. If the quantity supplied decreases, the opposite happens. If the supply curve starts at S$_2$, and shifts leftward to S$_1$, the equilibrium price will increase and the equilibrium quantity will decrease as consumers move along the demand curve to the new higher price and associated lower quantity demanded. The quantity demanded at each price is the same as before the supply shift, reflecting the fact that the demand curve has not shifted. But due to the change (shift) in supply, the equilibrium quantity and price have changed.
The movement of the supply curve in response to a change in a non-price determinant of supply is caused by a change in the y-intercept, the constant term of the supply equation. The supply curve shifts up and down the y axis as non-price determinants of demand change.

### Partial equilibrium

Partial equilibrium, as the name suggests, takes into consideration only a part of the market to attain equilibrium.
Jain proposes (attributed to George Stigler): "A partial equilibrium is one which is based on only a restricted range of data, a standard example is price of a single product, the prices of all other products being held fixed during the analysis."
The supply-and-demand model is a partial equilibrium model of economic equilibrium, where the clearance on the market of some specific goods is obtained independently from prices and quantities in other markets. In other words, the prices of all substitutes and complements, as well as income levels of consumers are constant. This makes analysis much simpler than in a general equilibrium model which includes an entire economy.
Here the dynamic process is that prices adjust until supply equals demand. It is a powerfully simple technique that allows one to study equilibrium, efficiency and comparative statics. The stringency of the simplifying assumptions inherent in this approach makes the model considerably more tractable, but may produce results which, while seemingly precise, do not effectively model real world economic phenomena.
Partial equilibrium analysis examines the effects of policy action in creating equilibrium only in that particular sector or market which is directly affected, ignoring its effect in any other market or industry assuming that they being small will have little impact if any.
Hence this analysis is considered to be useful in constricted markets.
Léon Walras first formalized the idea of a one-period economic equilibrium of the general economic system, but it was French economist Antoine Augustin Cournot and English political economist Alfred Marshall who developed tractable models to analyze an economic system.

## Other markets

The model of supply and demand also applies to various specialty markets. The model is commonly applied to wages in the market for labor. The typical roles of supplier and demander are reversed. The suppliers are individuals, who try to sell their labor for the highest price. The demanders of labor are businesses, which try to buy the type of labor they need at the lowest price. The equilibrium price for a certain type of labor is the wage rate. However, economist Steve Fleetwood revisited the empirical reality of supply and demand curves in labor markets and concluded that the evidence is "at best inconclusive and at worst casts doubt on their existence." For instance, he cites Kaufman and Hotchkiss (2006): "For adult men, nearly all studies find the labour supply curve to be negatively sloped or backward bending." Supply and demand can be used to explain physician shortages, nursing shortages or teacher shortages.
In both classical and Keynesian economics, the money market is analyzed as a supply-and-demand system with interest rates being the price. The money supply may be a vertical supply curve, if the central bank of a country chooses to use monetary policy to fix its value regardless of the interest rate; in this case the money supply is totally inelastic. On the other hand, the money supply curve is a horizontal line if the central bank is targeting a fixed interest rate and ignoring the value of the money supply; in this case the money supply curve is perfectly elastic. The demand for money intersects with the money supply to determine the interest rate.
According to some studies, the laws of supply and demand are applicable not only to the business relationships of people, but to the behaviour of social animals and to all living things that interact on the biological markets in scarce resource environments.
The model of supply and demand accurately describes the characteristic of metabolic systems: specifically, it explains how feedback inhibition allows metabolic pathways to respond to the demand for a metabolic intermediates while minimizing effects due to variation in the supply.

## Empirical estimation

Demand and supply relations in a market can be statistically estimated from price, quantity, and other data with sufficient information in the model. This can be done with simultaneous-equation methods of estimation in econometrics. Such methods allow solving for the model-relevant "structural coefficients," the estimated algebraic counterparts of the theory. The Parameter identification problem is a common issue in "structural estimation." Typically, data on exogenous variables (that is, variables other than price and quantity, both of which are endogenous variables) are needed to perform such an estimation. An alternative to "structural estimation" is reduced-form estimation, which regresses each of the endogenous variables on the respective exogenous variables.

## Macroeconomic uses

Demand and supply have also been generalized to explain macroeconomic variables in a market economy, including the quantity of total output and the aggregate price level. The aggregate demand-aggregate supply model may be the most direct application of supply and demand to macroeconomics, but other macroeconomic models also use supply and demand. Compared to microeconomic uses of demand and supply, different (and more controversial) theoretical considerations apply to such macroeconomic counterparts as aggregate demand and aggregate supply. Demand and supply are also used in macroeconomic theory to relate money supply and money demand to interest rates, and to relate labor supply and labor demand to wage rates.

## History

The 256th couplet of Tirukkural, which was composed at least 2000 years ago, says that "if people do not consume a product or service, then there will not be anybody to supply that product or service for the sake of price".
According to Hamid S. Hosseini, the power of supply and demand was understood to some extent by several early Muslim scholars, such as fourteenth-century Syrian scholar Ibn Taymiyyah, who wrote: "If desire for goods increases while its availability decreases, its price rises. On the other hand, if availability of the good increases and the desire for it decreases, the price comes down."
   If desire for goods increases while its availability decreases, its price rises. On the other hand, if availability of the good increases and the desire for it decreases, the price comes down.
Shifting focus to the English etymology of the expression, it has been confirmed that the phrase 'supply and demand' was not used by English economics writers until after the end of the 17th century. In John Locke's 1691 work Some Considerations on the Consequences of the Lowering of Interest and the Raising of the Value of Money, Locke alluded to the idea of supply and demand, however, he failed to accurately label it as such and thus, he fell short in coining the phrase and conveying its true significance. Locke wrote: “The price of any commodity rises or falls by the proportion of the number of buyer and sellers” and “that which regulates the price... [of goods] is nothing else but their quantity in proportion to [the] Vent.” Locke's terminology drew criticism from John Law. Law argued that,"The Prices of Goods are not according to the quantity in proportion to the Vent, but in proportion to the Demand." From Law the demand part of the phrase was given its proper title and it began to circulate among "prominent authorities" in the 1730s. In 1755, Francis Hutcheson, in his A System of Moral Philosophy, furthered development toward the phrase by stipulating that, "the prices of goods depend on these two jointly, the Demand... and the Difficulty of acquiring."
It was not until 1767 that the phrase "supply and demand" was first used by Scottish writer James Denham-Steuart in his Inquiry into the Principles of Political Economy. He originated the use of this phrase by effectively combining "supply" and "demand" together in a number of different occasions such as price determination and competitive analysis. In Steuart's chapter entitled "Of Demand", he argues that "The nature of Demand is to encourage industry; and when it is regularly made, the effect of it is, that the supply for the most part is found to be in proportion to it, and then the demand is simple". It is presumably from this chapter that the idea spread to other authors and economic thinkers. Adam Smith used the phrase after Steuart in his 1776 book The Wealth of Nations. In The Wealth of Nations, Smith asserted that the supply price was fixed but that its "merit" (value) would decrease as its "scarcity" increased, this idea by Smith was later named the law of demand. In 1803, Thomas Robert Malthus used the phrase "supply and demand" twenty times in the second edition of the Essay on Population. And David Ricardo in his 1817 work, Principles of Political Economy and Taxation, titled one chapter, "On the Influence of Demand and Supply on Price". In Principles of Political Economy and Taxation, Ricardo more rigorously laid down the idea of the assumptions that were used to build his ideas of supply and demand. In 1838, Antoine Augustin Cournot developed a mathematical model of supply and demand in his Researches into the Mathematical Principles of Wealth, it included diagrams. It is important to note that the use of the phrase was still rare and only a few examples of more than 20 uses in a single work have been identified by the end of the second decade of the 19th century.
During the late 19th century the marginalist school of thought emerged. The main innovators of this approach were Stanley Jevons, Carl Menger, and Léon Walras. The key idea was that the price was set by the subjective value of a good at the margin. This was a substantial change from Adam Smith's thoughts on determining the supply price.
In his 1870 essay "On the Graphical Representation of Supply and Demand", Fleeming Jenkin in the course of "introduc[ing] the diagrammatic method into the English economic literature" published the first drawing of supply and demand curves in English, including comparative statics from a shift of supply or demand and application to the labor market. The model was further developed and popularized by Alfred Marshall in the 1890 textbook Principles of Economics.

## Criticism

Piero Sraffa's critique focused on the inconsistency (except in implausible circumstances) of partial equilibrium analysis and the rationale for the upward slope of the supply curve in a market for a produced consumption good. The notability of Sraffa's critique is also demonstrated by Paul Samuelson's comments and engagements with it over many years, for example:
    What a cleaned-up version of Sraffa (1926) establishes is how nearly empty are all of Marshall's partial equilibrium boxes. To a logical purist of Wittgenstein and Sraffa class, the Marshallian partial equilibrium box of constant cost is even more empty than the box of increasing cost.
Modern Post-Keynesians criticize the supply and demand model for failing to explain the prevalence of administered prices, in which retail prices are set by firms, primarily based on a mark-up over normal average unit costs, and are not responsive to changes in demand up to capacity.