When soap reacts with water, calcium and magnesium salts are formed which causes hardness for water. Ionic ends of soap interacts with water while the carbon chain interacts with oil. The soap molecules, thus form structures called micelles where one end of the molecules is towards the oil droplet while the ionic-end faces outside. This forms an emulsion in water.