Soaps are potassium or sodium salts of long chain carboxylic acid. On the other hand, detergents are ammonium or sulphonate salts of long chain carboxylic acid.Action of soap in removing an oily spot from a shirtThe dirt present on clothes is organic in nature and insoluble in water. Therefore, it cannot be removed by only washing with water. When soap is dissolved in water, its hydrophobic ends attach themselves to the dirt and remove it from the cloth. Then, the molecules of soap arrange themselves in micelle formation and trap the dirt at the centre of the cluster. These micelles remain suspended in the water. Hence, the dust particles are easily rinsed away by water.Soap does not work properly when the water is hard.A soap is a sodium or potassium salt of long chain fatty acids. Hard water contains salts of calcium and magnesium. When soap is added to hard water, calcium and magnesium ions present in water displace sodium or potassium ions from the soap molecules forming an insoluble substance called scuum. A lot of soap is wasted in the process.