The production function explains the relationship between inputs and output in economics. There are four main factors of production: land, labor, capital, and entrepreneurship. These can be fixed or variable factors. The production function formula is Q=f(K,L) where Q is output and K and L represent capital and labor. There are short-run and long-run production functions depending on whether inputs are fixed or variable. The law of variable proportions describes how marginal product decreases as the variable input increases in three stages: increasing, diminishing, and negative returns. Returns to scale refers to the proportional change in output from a proportional change in all inputs and can be increasing, constant, or diminishing.