In chemistry, soap is a salt of a fatty acid. Consumers mainly use soaps as surfactants for washing, bathing, and cleaning, but they are also used in textile spinning and are important components of lubricants.
Soaps for cleansing are obtained by treating vegetable or animal oils and fats with a strongly alkaline solution. Fats and oils are composed of triglycerides; three molecules of fatty acids attach to a single molecule of glycerol.The alkaline solution, which is often called lye (although the term “lye soap” refers almost exclusively to soaps made with sodium hydroxide), brings about a chemical reaction known as saponification.
In this reaction, the triglyceride fats first hydrolyze into free fatty acids, and then these combine with the alkali to form crude soap: an amalgam of various soaps, salts, excess fat or alkali, water, and liberated glycerol (glycerin). The glycerin, a useful by-product, can remain in the soap product as a softening agent, or be isolated for other uses.
Soaps are key components of most lubricating greases, which are usually emulsions of calcium soap or lithium soap and mineral oil. These calcium- and lithium-based greases are widely used. Many other metallic soaps are also useful, including those of aluminium, sodium, and mixtures of them. Such soaps are also used as thickeners to increase the viscosity of oils. In ancient times, lubricating greases were made by the addition of lime to olive oil.