The non-metal ions lose electrons to the anode (this is called oxidation) and are discharged as non-metal atoms which often combine to form molecules. In this way, elements that are present in ionic compounds can be separated by electrolysis. This method is used for the extraction of some metals from their ore.See for example lead bromide, magnesium chloride, potassium chloride, sodium chloride and zinc chloride.he non-metal ions lose electrons to the anode (this is called oxidation) and are discharged as non-metal atoms which often combine to form molecules. In this way, elements that are present in ionic compounds can be separated by electrolysis. This method is used for the extraction of some metals from their ore.