A lye is an alkali metal hydroxide. Traditionally it was obtained by using rainwater to leach wood ashes, which are strongly alkaline and highly soluble in water, of their potassium hydroxide (KOH), producing lye water, a caustic basic solution. Then the lye water would either be used as such, as for curing olives before brining them, or evaporated of water to leave crystalline lye behind. "Lye" most accurately refers to sodium hydroxide (NaOH), but historically has been conflated to include other alkali materials, most notably potassium hydroxide.
Pellets of potash lye (potassium hydroxide)
Pellets of soda lye (sodium hydroxide)
Bottles of alkaline drain cleaners containing lye
Potassium hydroxide is an inorganic compound with the formula KOH, and is commonly called caustic potash.
Potassium hydroxide
Potassium carbonate, formed from the hydroxide solution leaking from an alkaline battery
Potassium hydroxide spillage, stained red by phenolphthalein