Dihydrogen is obtained as a byproduct in the manufacture of sodium hydroxide in the manufacture of sodium hydroxide and chlorine by the electrolysis of brine solution.
During electrolysis, the reactions that take place are-
At anode:
2Cl- (aq) → Cl2(g) + 2e-
At cathode:
2H2O(l) + 2e− → H2 (g) + 2OH−(aq)
The overall reaction is-
2Na+(aq) + 2Cl−(aq) + 2H2O(l) → Cl2 (g) + H2 (g) + 2Na+(aq) + 2OH−(aq)