Consider a profit maximizing firm that is perfectly competitive in both input and output markets. It takes $n$ inputs $ x \in \mathbb{R}^n_+ $ and produces $f(x)$ units of output, where $ f: \mathbb{R}^n_+ \to \mathbb{R}_+ $ is the production function. From now on, assume $f$ has all the necessary regularity conditions whenever the proof requires.
Theorem
Suppose at each input price $w \in \mathbb{R}^n_{++}$ and output price $p > 0$, the profit maximization problem
$$ \pi(p, w) = \max\{ p f(x) - w \cdot x : x \in \mathbb{R}^n_+ \} $$
has a unique solution $x(p, w)$. Let $ q(p, w) = f(x(p, w)) $ be the corresponding output supply function, then
$$ \frac{\partial q}{\partial p}(p, w) = -\frac{1}{p^2} w^T D_w x(p, w) w \geq 0 $$
Proof:
The first-order condition for profit maximization is:
$$ p \frac{\partial f}{\partial x_i}(x(p, w)) = w_i \quad \forall i $$
Differentiate $ q(p, w) = f(x(p, w)) $ with respect to $p$:
$$ \frac{\partial q}{\partial p}(p, w) = \sum_{i=1}^n \frac{\partial f}{\partial x_i}(x(p, w)) \frac{\partial x_i}{\partial p}(p, w) = \sum_{i=1}^n \frac{w_i}{p} \frac{\partial x_i}{\partial p}(p, w) $$
To evaluate $ \partial x_i / \partial p $, apply the envelop theorem to the profit function $\pi$ twice:
$$ \frac{\partial x_i}{\partial p} = \frac{\partial}{\partial p} \left( -\frac{\partial \pi}{\partial w_i} \right) = -\frac{\partial}{\partial w_i} \frac{\partial \pi}{\partial p} = -\frac{\partial q}{\partial w_i} $$
Differentiate $ q(p, w) = f(x(p, w)) $ with respect to $w_i$ and use the first-order condition again:
$$ \begin{align*} \frac{\partial x_i}{\partial p} = -\frac{\partial q}{\partial w_i} &= -\sum_{j=1}^n \frac{\partial f}{\partial x_j}(x(p, w)) \frac{\partial x_j}{\partial w_i}(p, w) \\ &= -\sum_{j=1}^n \frac{w_j}{p} \frac{\partial x_j}{\partial w_i}(p, w) \end{align*} $$
Substitute the above back to $ \partial q / \partial p $:
$$ \begin{align*} \frac{\partial q}{\partial p}(p, w) &= \sum_{i=1}^n \frac{w_i}{p} \left( -\sum_{j=1}^n \frac{w_j}{p} \frac{\partial x_j}{\partial w_i}(p, w) \right) \\ &= -\frac{1}{p^2} \sum_{i,j=1}^n w_i \frac{\partial x_j}{\partial w_i}(p, w) w_j \end{align*} $$
We are almost done! To get the required matrix form, we need $ D_w x = ( \partial x_j / \partial w_i )_{ij} $ to be a symmetric matrix. But this follows from the envelop theorem again:
$$ D_w x = \left( \frac{\partial x_j}{\partial w_i} \right)_{ij} = \left( -\frac{\partial^2 \pi}{\partial w_i \partial w_j} \right)_{ij} = -D^2_w \pi $$
where $ D^2_w \pi $ is the Hessian matrix of $ \pi $ with respect to $w$. Thus, we have the required identity:
$$ \frac{\partial q}{\partial p}(p, w) = -\frac{1}{p^2} w^T D_w x(p, w) w $$
Finally, $\pi$ is a convex function, so $ D^2 \pi = - D_w x $ is positive semi-definite. But this means $ - w^T D_w x(p, w) w $ is a positive semi-definite quadratic form, so $ \partial q / \partial p \geq 0 $. This is just the law of supply.
Question:
What is the economic interpretation of the identity (apart from giving the law supply for free)? It seems to relate the self-price elasticity of output with the cross-price elasticities of inputs?