The thermodynamics of phase transitions can be described using the principles of thermodynamics. The Gibbs free energy is a useful quantity for understanding phase transitions, as it determines the stability of a phase. When the Gibbs free energy of a phase is lower than that of another phase, the first phase is stable.
https://www.amazon.com/States-Matter-Donald-Goodstein/dp-0486490317 states of matter goodstein pdf
In a gas, the atoms or molecules are widely spaced and are free to move in any direction. Gases have neither a definite shape nor a definite volume, and will expand to fill their container. The intermolecular forces in a gas are very weak, and are often negligible. The thermodynamics of phase transitions can be described
Matter can exist in several distinct states, including solid, liquid, gas, and plasma. In this paper, we will explore the characteristics of each state, the phase transitions that occur between them, and the underlying physics that governs their behavior. https://www