Electrolysis is passing an electric current through a liquid containing ions so that decomposition reaction takes place. When an electric current is passed through acidified water, it decomposes to give hydrogen and oxygen gas. ... Thus, the number of hydrogen molecules produced is twice the number of oxygen molecules.