criteria for equilibrium, relation between equilibrium constant and thermodynamic quantities