Let denote the price of output and denote the prices of inputs. Let be the amount of input used in production and be the output as determined by the production function, so

Profit as a function of the prices is derived by maximizing profit as a function of the prices and the quantity choices:

Hotelling's Lemma says that if the profit function is differentiable and positive quantities of all inputs are used at the optimum, the profit-maximizing choices are:


Proof of Hotelling's lemma edit

The lemma uses the same reasoning as the envelope theorem.

The function for maximum profit can be written as

 

where   are the maximizing inputs corresponding to the optimal output  . Because the inputs are maximizing profit, the first order conditions hold:

  (1)

Taking the derivative of profit with respect to   at the optimal values of the inputs yields

 

where   for every input   because of (1). Similarly, taking the derivative with respect to input price   yields

 

QED