When used for cleaning, soap allows otherwise insoluble particles to become soluble in water and then be rinsed away.
For example: oil/fat is insoluble in water, but when a couple of drops of dish soap are added to the mixture, the oil/fat apparently disappears.
The insoluble oil/fat molecules become associated inside micelles, tiny spheres formed from soap molecules with polar hydrophilic (water-attracting) groups on the outside and encasing alipophilic (fat-attracting) pocket, which shields the oil/fat molecules from the water making it soluble.
Anything that is soluble will be washed away with the water. Synthetic detergents operate by similar mechanisms to soap.
A formula for soap consisting of water, alkali, and cassia oil was written on a Babylonian clay tablet around 2200 BC.
In chemistry, soap is a salt of a fatty acid.Soaps are mainly used as surfactants for washing, bathing, and cleaning, but they are also used in textile spinning and are important components of lubricants.