# Conjugate variables in thermodynamics vs. Hamiltonian mechanics

According to Wikipedia, the canonical coordinates $p, q$ of analytical mechanics form a conjugate variables' pair - not just a canonically conjugate one.

However, the "conjugate variables" I directly think of are the quantities of thermodynamics - e.g. Temperature and Entropy, etc.

So, why both these classes of variables are called "conjugate"? What is the relation among them?

• I think the similarity in terminology is completely accidental. – Adomas Baliuka Jul 14 '17 at 0:34
• @AdomasBaliuka It's not an accident. Or at least not a complete accident. The mathematical relationship between conjugate pairs in both fields is that of the Legendre transformation. – dmckee --- ex-moderator kitten Jul 14 '17 at 1:44
• I think there's even more - and it's part of the attempts to extend the hamiltonian formalism (and symplectic geometry) to thermodynamics: johncarlosbaez.wordpress.com/2012/01/19/… and physics.stackexchange.com/q/159980, but I hope I would get a "simpler" answer – Lo Scrondo Jul 14 '17 at 1:57

## 2 Answers

1. Conjugate variables $(q^i, p_i)$ are given in thermodynamics via contact geometry as the first law of thermodynamics $$\mathrm{d}U~=~ \sum_{i=1}^np_i\mathrm{d}q^i,\tag{1}$$ where $U$ is internal energy. See also Ref. 1 and this & this Phys.SE posts.

2. Conjugate variables $(q^i, p_i)$ are given in Hamiltonian mechanics via symplectic geometry as Darboux coordinates, i.e. the symplectic 2-form takes the form $$\omega ~=~\sum_{i=1}^n\mathrm{d}p_i\wedge \mathrm{d}q^i.\tag{2}$$ Hamilton's principal function $S(q,t)$ satisfies $$\mathrm{d}S~=~ \sum_{i=1}^np_i\mathrm{d}q^i-H\mathrm{d}t,\tag{3}$$ cf. Ref. 2.

References:

1. S. G. Rajeev, A Hamilton-Jacobi Formalism for Thermodynamics, Annals. Phys. 323 (2008) 2265, arXiv:0711.4319.

2. J. C. Baez, Classical Mechanics versus Thermodynamics, part 1 & part 2, Azimuth blog posts, 2012.

In thermodynamics, conjugate pairs are related by the Legendre transform (like $T$ and $S$, or $P$ and $V$). In classical mechanics, you use the Hamiltonian to get the conjugate variable in a slightly different way, although the Lagrangian and Hamiltonian are related by the Legendre transform as well.

In general, conjugate variables are those which are related by some sort of transform, be it Legendre, Fourier, etc. That's why you will see the term used in a variety of contexts. I can't comment about the link you provided, and invite someone else to do so.