The study of the conditions under which a system can exist in a state of equilibrium with its surroundings.