Yeps its possible. See in the process of electrolysis, u take electrolyte as KBr we know that K is positive ion while Br is negative. So in the process of electrolysis u would be knowing that we have two electrodes - 'Anode' or the positive electrode and 'Cathode' or the negative electrode. Always remember that negative ion collects at Anode as it gets the number of atom needed to make it self stable and positive always collects at cathode as it loses the number of electrode to the cathode to make itself stable. So if we take the above compound KBr as electrolyte. Electric current is passed , the compound gets decomposed as in the following reaction KBr on passage of Electric current- K+ + Br- The positive ion K collects at cathode. At cathode it loses one electron to make itself stable as in the following reaction K+ + 1e- -- K After electrolysis we get the pure metal potassium in the cathode and hence purification is metal is possible through electrolysis