# Demand Function

The demand function is a function that shows the relationship between the quantity demanded of a good and the factors that affect it. Many variables influence the quantity demanded, such as income or the prices of substitute and complementary goods, but price plays a central role.

## Linear Demand Function

An example of a linear demand function is as follows:

\[ Q = 800 - 10P \]

Where:

- \( Q \) represents the quantity demanded.
- \( P \) is the price of the good or service.
- \( 800 \) indicates the maximum quantity demanded when the price is zero.
- \( 10 \) is the coefficient that shows the rate at which the quantity demanded decreases as the price increases.

In this example, the quantity demanded depends solely on the price, assuming that all other factors affecting demand are held constant. The negative sign represents the inverse relationship between price and quantity demanded: higher prices result in lower quantities demanded, and vice versa. By substituting a specific price into this equation, we can find the quantity demanded at that price.

To calculate the quantity demanded when the price \( P \) is 20:

\[ Q = 800 - 10 \times 20 \]

Performing the multiplication:

\[ Q = 800 - 200 \]

Simplifying the subtraction:

\[ Q = 600 \]

Thus, when the price \( P \) is 20, the quantity demanded \( Q \) is 600.

However, the demand function does not need to include only the price while keeping everything else constant. Many other factors can be added to the demand function. Let's include consumer income, the price of a substitute good, and the price of a complementary good. There are many other factors that can affect demand, but anything not included in the equation is assumed to be irrelevant or held constant:

\[ Q = 500 - 10P + 0.25I + 0.5P_s - 0.75P_c \]

Where:

- \( Q \) represents the quantity demanded.
- \( P \) is the price of the good or service being analyzed.
- \( I \) is the consumer's income.
- \( P_s \) is the price of a substitute good.
- \( P_c \) is the price of a complementary good.
- \( 500 \) indicates the maximum quantity demanded when \( P \), \( P_s \), and \( P_c \) are zero and income has no influence.
- The coefficients \( -10, 0.25, 0.5, -0.75 \) reflect the sensitivity of the quantity demanded to changes in the price of the good, income, the price of the substitute good, and the price of the complementary good, respectively.

Note that the term containing income has a positive sign, indicating the positive relationship between income and quantity demanded. The term for the price of the substitute good also has a positive sign, as an increase in the price of a substitute good increases the quantity demanded of the good in question. The term for the price of the complementary good has a negative sign because an increase in the price of a complementary good reduces the quantity demanded.

If we set the consumer income to 1380, the price of the substitute good to 60, and the price of the complementary good to 100, we assume these three determinants of demand remain constant at these values, and we obtain the demand function that depends only on the price:

Performing the calculations for the quantity demanded, where the values are given by: income \( I = 1380 \), price of a substitute good \( P_s = 60 \), and price of a complementary good \( P_c = 100 \):

\[ Q = 500 - 10P + 0.25 \times 1380 + 0.5 \times 60 - 0.75 \times 100 \]

Performing the calculations:

\[ Q = 500 - 10P + 345 + 30 - 75 \]

Simplifying the sum:

\[ Q = 500 + 345 + 30 - 75 - 10P \]

\[ Q = 800 - 10P \]

Thus, the simplified demand function is \( Q = 800 - 10P \).

## Generalized Demand Function

In the previous examples, the demand functions have a linear form, but this does not have to be the case. Demand functions can take other forms, such as logarithmic or multiplicative. Therefore, we can generally express the function that depends only on price:

The demand function is expressed as:

\[ Q_d = Q_d(p) \]

Where:

- \( Q_d \) represents the quantity demanded of a good or service.
- \( p \) is the price of the good or service.
- \( Q_d(p) \) is a function that shows how the quantity demanded \( Q_d \) varies in response to changes in the price \( p \).

And for the function that depends on several factors:

\[ Q_d = Q_d(p, I, p_s, p_c) \]

Where:

- \( Q_d \) represents the quantity demanded of a good or service.
- \( p \) is the price of the good or service being analyzed.
- \( I \) represents the consumer's income.
- \( p_s \) is the price of a substitute good.
- \( p_c \) is the price of a complementary good.
- \( Q_d(p, I, p_s, p_c) \) is a function that shows how the quantity demanded \( Q_d \) varies in response to changes in the price \( p \), income \( I \), the price of the substitute good \( p_s \), and the price of the complementary good \( p_c \).

In this case, we are not expressing an explicit functional form, and therefore the demand function can take various functional forms.