  The inequivalence of thermodynamical ensembles related by a Legendre
transformation is manifest in self-gravitating systems and in black hole
thermodynamics. Using the Poincare's method of the linear series, we describe
the mathematical reasons which lead to this inequivalence which in turn induces
a hierarchy of ensembles: the most stable ensemble describes the most isolated
system. Moreover, we prove that one can obtain the degree of stability of all
equilibrium configurations in any ensensemble related by Legendre
transformations to the most stable if one knows the degree of stability in the
most stable ensemble.
