When a container filled with oxygen and hydrogen is heated, a chemical reaction occurs that produces water and releases heat. This heat release is due to the fact that the products (water) have lower energy than the reactants (hydrogen and oxygen). Specifically, the energy stored in the bonds of the reactants is greater than that in the bonds formed in the product water. The excess bonding energy is converted into heat during the reaction. Conversely, breaking water back into oxygen and hydrogen requires an input of energy, as the energy needed to break the O-H bonds exceeds the energy recovered from forming molecular hydrogen and oxygen. This illustrates the principles of energy conservation and bond energy in chemical reactions.