In chemistry, electrolysis is a method of separating bonded elements and compounds by passing an
electric current through them. An ionic compound, in this case salt, is dissolved with an appropriate
solvent, such as water, so that its ions are available in the liquid. An electrical current is applied between
a pair of inert electrodes immersed in the liquid. The negatively charged electrode is called the cathode,
and the positively charged one the anode. Each electrode attracts ions which are of the opposite
charge. Therefore, positively charged ions (called cations) move towards the cathode, while negatively
charged ions (termed anions) move toward the anode. The energy required to separate the ions, and
cause them to gather at the respective electrodes, is provided by an electrical power supply. At the
probes, electrons are absorbed or released by the ions, forming a collection of the desired element or
compound