Thermodynamics deals with energy transfer between systems and states of matter. The first law of thermodynamics states that energy is conserved, while the second law introduces entropy and establishes that the entropy of the universe increases over time. Thermodynamics can determine if a reaction will proceed spontaneously based on the energy change and entropy change between reactants and products. A reaction is spontaneous if the change in internal energy is negative and the change in entropy is positive.