Until the 1940s soap was the only important detergent. During World War II the shortage of fats, from which soap is made, spurred the development of soapless or synthetic detergents. After the war, the need for new types of detergents for automatic washing machines accelerated the trend. Today soap is only one of a great many detergent products.
Detergents are surface-active agents, or surfactants, because they act upon a surface.
One part of the molecule is soluble in organic material, and the other part is soluble in water. Detergents are made by treating an aromatic, or benzene-type, molecule with sulfuric acid, followed by neutralization with alkali to convert the product to its sodium salt. The detergent products of these reactions came into wide use in the late 1940s and early '50s and proved to be effective in hard water as well as cool or cold water, whereas soap is often ineffective under both conditions. They foamed in cesspools and sewage-disposal plants. They often appeared in ground and surface waters.