In 1807, Sir Humphrey Davy discovered a metal during the electrolysis of potassium hydroxide; he named the metal potassium because it came from potash recovered from wood ashes. The four types of potash are the water-soluble compounds potassium chloride, potassium sulfate, potassium-magnesium sulfate and potassium nitrate. The early uses of potash were in glass and soap manufacturing, as a diuretic, and another form was used in gunpowder.