Explain how the change in free energy determines the direction of a chemical reaction and how chemical reactions eventually reach a state of equilibrium.