Dear student,
Detergents are sodium salts of long-chain benzene sulphonic acids. The ionic group in soaps is SO3 - Na+ or SO4 -Na+. Detergents are more powerful than soaps because soaps do not work effectively in hard water as it reacts with calcium and magnesium ions present in hard water to form insoluble precipitate called scum which has no cleansing properties whereas detergents are a long chain of carboxylic acids, charged ends of these components do not form insoluble precipitate with calcium and magnesium ions present in hard water. Thus detergents are more effective than soaps.
Regards