Animation of the electrolysis of water. Electrolysis is the use of an electric current to split apart chemical compounds. The voltage causes the accumulation of negatively-charged electrons on the anode (left), which attracts hydrogen ions (H+) from the water. These combine with electrons to form neutral hydrogen atoms (H), which quickly combine to form diatomic hydrogen (H2), which bubbles off as a gas. The opposite process occurs at the cathode (right). Negatively-charged hydroxide ions (OH-) from the water are attracted to the positive electrode, where they give up an electron each to the electrode, completing the electrical circuit. Four neutral OH groups then interact to form two molecules of water and one of oxygen gas (O2), which bubbles off. As water (H20) contains twice as many hydrogen atoms as it does oxygen atoms, twice as much hydrogen gas is produced. This is seen later in the animation, where test tubes collect the gases produced.