The demand function is a statement of the relationship between

quantity of factors of production
quantity of product demanded and all the factors that affect this quantity
quantity demanded and profit
product demand and cost of output

The correct answer is: B. quantity of product demanded and all the factors that affect this quantity.

A demand function is a mathematical relationship that shows the amount of a good or service that consumers are willing and able to purchase at different prices during a given period of time. The demand function is affected by a number of factors, including the price of the good or service, the income of consumers, the prices of related goods and services, consumer tastes and preferences, and expectations about future prices.

Option A is incorrect because the demand function does not show the relationship between the quantity of factors of production and the quantity of output produced. The production function shows this relationship.

Option C is incorrect because the demand function does not show the relationship between the quantity demanded and profit. The profit function shows this relationship.

Option D is incorrect because the demand function does not show the relationship between product demand and cost of output. The cost function shows this relationship.