Soaps are sodium salts of long chain carboxylic acids. The soapiness in soap comes from the sodium salts of fatty acids like stearic acid, oleic acid and palmitic acid.
Sodium Oleate Sodium Palmitate
The ionic end of the soap dissolves in water while the carbon chain dissolves in oil. The positively charged heads of the soap molecules repel each other and form a closed structure. This structure is called a micelle. The dirt is pulled and absorbed into the centre of the micelle. This property of soap makes it an emulsifier.
Sometimes, soaps don’t lather well with hard water. Hard water contains calcium and magnesium, which combine with soap molecules to form insoluble precipitates.
Detergents consist of long chain molecules such as sodium n-dodecyl benzene sulphonate and sodium n- dodecyl sulphate. The charged ends of these compounds do not form insoluble precipitates with the calcium and magnesium ions in water. Detergents are
used in shampoos and products for cleaning clothes.
structure of sodium n-dodecyl benzene sulphonate,
structure of sodium n-dodecyl sulphate