Soap is sodium stearate, `C_(17)H_(35)COONa` in water soap gives the ions stearate anion and sodium ion.
`C_(17)H_(35)COONa to underset("Stearate ion")(C_(17)H_(35)COO^(-))+Na^(+)`
The anion of soap `=C_(17)H_(35)COO^(-)`
Cleaning action of soap : Soap anions form a micelle. The grease or dirt of the cloth are absorbed into the interior of the micelle. The tails of the anion are pegged into micelle and these micelle are washed away with the soap solution. Soap thus, functions as an emulsifying agent for the water dirt emulsion. The emulsified grease or dirt is then washed away with soap solution