Soaps function through the formation of micelles, aggregates of soap molecules in water, where the hydrophobic tails face inwards, dissolving oils and dirt, and the hydrophilic heads face outwards, interacting with water. Micelles are large enough to scatter light, a phenomenon known as the Tyndall effect. Soaps react with calcium and magnesium ions present in hard water to form insoluble precipitates called scum, which reduces their effectiveness.