# Maximum entropy at equilibrium for closed system: Local maximum or global maximum?

For a closed system at equilibrium the entropy is maximum. Is this a local maximum or is it a global maximum?

To allow a meaningful answer, it would be necessary to qualify the maximum. Maximum with respect to which variable? In thermodynamics the correct (and meaningful) statement is "**maximum with respect to the variables** (different from the thermodynamic state variables describing the isolated system) **which represent the entropy dependence on all possible internal constraints"** (i.e. constraints in the isolated system).

From this *principle*, i.e. from this sentence which condensate a long series of experiences, it is possible to obtain many consequences, like the equilibrium conditions or even the condition of concavity of the entropy as function of the variables which describe the macroscopic state of the isolated system, which, I stress, are not the same which describe the constraints.

So, from the maximum principle, one can get the concavity of entropy with respect to the state variables, by carefully choosing the kind of constraint.

However, such concavity as function of the state variables, does not imply strict concavity, or even concavity of entropy with respect to any possible internal constraint. For example, one could think of a constraint forcing an atomic system to stay only in two ordered crystalline structures (maybe not easy in a lab but not complicate in a computer simulation). For such constrained system one could have local maxima, with the highest being the true stable state and the remaining one, being a metastable system.

Probably the most interesting question could be: **if we remove all the internal constraints, how can we know if there is a unique final equilibrium state?**
And maybe this was the intended original question. Well, at the best of my knowledge, there is no definite answer. And there is a good reason for that. It is possible to imagine systems which do not reach equilibrium at all (non ergodic systems). Thus, I would consider the request of a unique maximum value of the entropy as an additional request for thermodynamic systems.

Good question! At a fundamental level, entropy depends on the probability distribution $p(x)$ of the microscopic states $x\in \Omega$ of a system, which is given by the following equation:

$$H(p) = -\sum_{x\in \Omega}p(x)\log p(x)$$

Just specifying a few macroscopic variables of a system (e.g. $U$, $V$, and $N$) isn't enough to determine a unique probability distribution over the microscopic states, but the principle of maximum entropy says that the equilibrium distribution over microscopic states satisfying these macroscopic constraints is the one that has the greatest entropy.

Mathematically, $H(p)$ is a (strictly) concave function of the probability distributions, which means that it can only increase when we average over probability distributions:

$$H(\lambda p_1 + (1-\lambda) p_2) \geq \lambda H(p_1) + (1-\lambda)H(p_2)$$

An incredibly useful property of (strictly) concave functions is that they can only have one local maximum point, which is then guaranteed to be the global maximum. This is the reason why people ignore the possibility of multiple local maxima of the entropy, because the concave nature of the entropy guarantees that you'll only ever have one (see these notes, for example).

This of course isn't the whole story, because in practice you can get things like metastable states, where a system gets stuck in a non-equilibrium state for a long time. But at least on paper, that's why we only ever talk about "the" maximum entropy state.

To quote H.B. Callen Thermodynamics book, his second postulate about the formal development of Thermodynamics is:

Postulate II -There exists a function (called the entropy $S$) of the extensive parameters of any composite system, defined for all equilibrium states and having the following property. The values assumed by the extensive parameters in the absence of an internal constraint are those that maximize the entropy over the manifold of constrained equilibrium states.

As an example: assume $S$ is a function of $U,V,N$ and suppose your system can only exchange heat, so $V$ and $N$ are constants. Out of all the possible values the unconstrained parameter $U$ may take, the system at equilibrium will assume the value of $U$ such that $S$ is a maximum. So $S$ will be a global maximum in respect to $U$, but not necessarily in respect to $V$ and $N$ in a particular problem. However, if you also allow your system to expand and to exchange matter, by this postulate the values assumed by $U,V,N$ (which are now all unconstrained) will be such that $S$ is a global maximum.

**Edit.** I was forgetting about phase transitions. When near a phase transition there will be states such that the Gibbs Potential $G$ is a local minimum (so $S$ is a local maximum). These states are, however, metastable and your thermodynamic system will typically prefer more stable states that correspond to a global minimum of $G$ (and consequently, to a global maximum of $S$).