  In this paper, we use quadratic forms diagonalization methods applied to the
function thermodynamic energy to analyze the stability of physical systems.
Taylor's expansion was useful to write a quadratic expression for the energy
function. We consider the same methodology to expanding the thermodynamic
entropy and investigate the signs of the second-order derivatives of the
entropy as well as previously to the thermodynamic energy function. The signs
of the second-order derivatives to the Helmholtz, enthalpy and Gibbs functions
are also analysed. We show the immediate consequences on the stability of
physical systems due to the signs or curvatures of the second-order derivatives
of these thermodynamic functions. The thermodynamic potentials are presented
and constructed pedagogically as well as demonstrated the main mathematical
aspects these surfaces. We demonstrate the power of superposition of
mathematical and physical aspects to understand the stability of thermodynamic
systems. Besides, we provide a consistent mathematical demonstration of the
minimum, maximum, and saddle conditions of the potentials. We present here a
detailed approach on aspects related to the curvature of the thermodynamic
functions of physical interest with consequences on stability. This work can be
useful as a part or supplement material of the traditional physics curriculum
that requires a solid formation in thermodynamics, particularly about formal
aspects on the stability.
