Electrolytic cells use electrical work as source of energy to drive the reaction in the opposite direction. The dotted vertical line in the center of the above figure represents a diaphragm that keeps the Cl 2 gas produced at the anode from coming into contact with the sodium metal generated at the cathode.