Maxwell's relations are a set of equations in thermodynamics which are derivable from the definitions of the thermodynamic potentials. These relations are named for the nineteenth-century physicist James Clerk Maxwell.
The Maxwell relations are statements of equality among the second derivatives of the thermodynamic potentials. They follow directly from the fact that the order of differentiation of an analytic function of two variables is irrelevant. If Φ is a thermodynamic potential and xi and xj are two different natural variables for that potential, then the Maxwell relation for that potential and those variables is:
Maxwell relations (general)
where the partial derivatives are taken with all other natural variables held constant. It is seen that for every thermodynamic potential there are n(n − 1)/2 possible Maxwell relations where n is the number of natural variables for that potential.
The four most common Maxwell relations 
The four most common Maxwell relations are the equalities of the second derivatives of each of the four thermodynamic potentials, with respect to their thermal natural variable (temperature T; or entropy S) and their mechanical natural variable (pressure P; or volume V):
Maxwell's relations (common)
where the potentials as functions of their natural thermal and mechanical variables are the internal energy U(S, V), Enthalpy H(S, P), Helmholtz free energy A(T, V) and Gibbs free energy G(T, P). The thermodynamic square can be used as a mnemonic to recall and derive these relations.
Derivation Derivation of the Maxwell relations can be deduced from the differential forms of the thermodynamic potentials:
These equations resemble total differentials of the form
And indeed, it can be shown for any equation of the form
Consider, as an example, the equation . We can now immediately see that
Since we also know that for functions with continuous second derivatives, the mixed partial derivatives are identical (Symmetry of second derivatives), that is, that
we therefore can see that
and therefore that
Each of the four Maxwell relationships given above follows similarly from one of the Gibbs equations.
Extended derivation Combined form first and second law of thermodynamics,
U, S, and V are state functions. Let,
Substitute them in Eq.1 and one gets,
And also written as,
comparing the coefficient of dx and dy, one gets
Differentiating above equations by y, x respectively
U, S, and V are exact differentials, therefore,
Subtract eqn(2) and (3) and one gets
- Note: The above is called the general expression for Maxwell's thermodynamical relation.
- Maxwell's first relation
- Allow x = S and y = V and one gets
- Maxwell's second relation
- Allow x = T and y = V and one gets
- Maxwell's third relation
- Allow x = S and y = P and one gets
- Maxwell's fourth relation
- Allow x = T and y = P and one gets
- Maxwell's fifth relation
- Allow x = P and y = V
- = 1
- Maxwell's sixth relation
- Allow x = T and y = S and one gets
- = 1
General Maxwell relationships 
The above are not the only Maxwell relationships. When other work terms involving other natural variables besides the volume work are considered or when the number of particles is included as a natural variable, other Maxwell relations become apparent. For example, if we have a single-component gas, then the number of particles N is also a natural variable of the above four thermodynamic potentials. The Maxwell relationship for the enthalpy with respect to pressure and particle number would then be:
where μ is the chemical potential. In addition, there are other thermodynamic potentials besides the four that are commonly used, and each of these potentials will yield a set of Maxwell relations.
Each equation can be re-expressed using the relationship
which are sometimes also known as Maxwell relations.