# Proof of Liouville's Theorem

The Wikipedia article on Canonical Transformations has a section on Liouville's Theorem. It makes the following argument:

$$J=\frac{\partial(\mathbf{Q},\mathbf{P})}{\partial(\mathbf{q},\mathbf{p})}$$ The Jacobian has the division'' property: $$J=\frac{\partial(\mathbf{Q},\mathbf{P})}{\partial(\mathbf{q},\mathbf{p})} = \frac{\partial(\mathbf{Q},\mathbf{P})}{\partial(\mathbf{q},\mathbf{P})}\Big/ \frac{\partial(\mathbf{q},\mathbf{p})}{\partial(\mathbf{q},\mathbf{P})}$$ Eliminating the repeated variable gives $$J= \frac{\partial(\mathbf{Q})}{\partial(\mathbf{q})}\Big/ \frac{\partial(\mathbf{p})}{\partial(\mathbf{P})}$$ Then, the conditions derived in the section above give $$J=1.$$

Why is it legal to "eliminate the repeated variables?" Basically, we have shown that $$J= \frac{\partial(\mathbf{Q})}{\partial(\mathbf{q})}\cdot \frac{\partial(\mathbf{P})}{\partial(\mathbf{p})}$$ Wouldn't applying this type of reasoning allow us to conclude $$J=\frac{\partial(Q_1)}{\partial(q_1)} \frac{\partial(Q_2)}{\partial(q_2)} \frac{\partial(Q_3)}{\partial(q_3)} ... \frac{\partial(P_1)}{\partial(p_1)} \frac{\partial(P_2)}{\partial(p_2)} \frac{\partial(P_3)}{\partial(p_3)}?$$

That is, that the determinant is just equal to the diagonal of the entries (something not true in general).

As pointed out in the linked question by Qmechanic, the expression should read $$J= \left(\frac{\partial(\mathbf{Q})}{\partial(\mathbf{q})}\right)_P\cdot \left(\frac{\partial(\mathbf{P})}{\partial(\mathbf{p})}\right)_q$$ where the subscript indicates which variable was held constant. Applying this type of reasoning will lead to the equation $$J= \frac{\partial Q_1}{\partial q_1} \frac{\partial Q_2}{\partial q_2} ... \frac{\partial P_1}{\partial p_1} \frac{\partial P_2}{\partial p_2}$$ but this is not equal to the product of the diagonal entries, because care needs to be taken as to which variables are held constant for each partial derivative.