 Let's explore how soaps work. So imagine your hand has some dirt, you put some water in it, you wash it away, it doesn't go. The dirt remains. Why is that? Because dirt is mostly made of hydrocarbons. Imagine oil, grease, fat, whatever you want to think about. Hydrocarbons are not ionic in nature. If they are not ionic, they will not dissolve in water. To dissolve in water, you need ions like salts. This is where we put soap. Soaps contain salts of long chain fatty acids. Like in this example, you can have carboxylic acid. How does this help? Well, first of all, this is a salt. It has an ionic end, which is amazing because it loves water. It can be dissolved in water. But the other end is made of hydrocarbon. That's important. If it's hydrocarbon, it'll love other hydrocarbons. It loves dirt. So immediately you can see what this is going to do. The tail end of these long chain fatty acids, they are going to stick to the dirt. Whereas this ionic end is going to try and stick to water. As a result, it's going to pick up the dirt and form these spherical things, which we called micelles. These are called soap micelles and they get dispersed throughout the water, forming a colloid, which we call emulsion. Remember in colloids, we have the solute particles, the micelles over here, they are dispersed throughout the solvent. And now you can wash this away and the dirt goes away. This is how soap helps in removing dirt. But soap has problems in hard water. It doesn't work very well. Why is that? Well, hard water contains ions like calcium and magnesium ions. These ions can stick very strongly to this ionic part. So strongly that it will not dissociate in water anymore. If it does not dissociate in water like sodium does, then it will not be soluble in water. And so what ends up happening in hard water is that all these molecules will no longer be soluble. It becomes an insoluble precipitate, which we call a scum, which just comes out. And that's why hard water doesn't lather much because these micelles are not formed. This emulsion is not formed much. So the only way to ensure soap works in hard water is to use a lot of soap. So you have these lot of molecules so that some of them can at least form micelles. But there is a way out of this. See the acids that we use in soap are weak acids because we don't want them to affect our skin. But if you're using this to say wash clothes, you can use strong acids like for example, sulfonic acid. It's a strong acid. Now when you have sulfonic acid dissolved in water, because it is so strong, it will not allow these calcium or magnesium ions to form a bond with it. So they will not stick to it, scum will not be formed, micelles can be formed again and the whole soap action can work. But you can't put these in soaps because if you use strong acid, it'll affect your skin. But you can use them to wash clothes and that's why these are used in detergents. In detergents, you have the same action. The only difference is that you use the salts of strong acids. For example, use sodium salts of sulfonic acids. These are also used in your shampoos, but they are slightly milder than the ones that we use in detergents.