In chemistry,soap is a salt of a fatty acid.Soap is mainly used for washing,bathing,and cleaning,but soaps are also 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 attached to a single molecule of glycerol.The alkaline solution,often lye,promotes a chemical reaction known as saponification.In saponification,fats are broken down (hydrolyzed) yielding crude soap.Fats are transformed into salts of fatty acids and glycerol is liberated,leaving glycerin as a byproduct.
Soaps are key components of most lubrication greases,which are usually emulsions of calcium and lithium soaps in a mineral oil.Lithium-based greases are widely used.Many other metal ions are used,including aluminium,sodium,and mixtures of various metal ions.Such soaps are sometimes classified as thickeners,meaning that they elevate the viscosity of the oil.In ancient times,lubricating greases were prepared by the addition of lime to olive oil.