Water is a compound since it contains two components, oxygen and hydrogen. Electrolysis can separate the two constituents. They are combined in a fixed ratio of 1:2. The ratio of oxygen and hydrogen is set and cannot be changed. Therefore, it is difficult to separate water constituents easily. These can only be separated using a unique process called electrolysis.