Dihydrogen is formed mainly from water by carrying its elecrolysis in the presence of suitable electrolytes i.e., small amount of an acid or alkali. Acutally, water as such is a poor conductor of electricity. Addition of small amount of electrolyte increases its conductivity.