Is there a difference between soap and detergent? Both clean what they are made to clean. But, yes, there are differences. They come from different sources. They are different chemically. And they are put to different uses. An example of each is provided, below.
There are a variety of soaps. A soap is the metal salt of a fatty acid.
The metal may be an alkali metal such sodium (Na) or potassium (K). These metals are found in the first column of the periodic table of the elements. Or, the metal can be an alkaline earth metal, such as calcium (Ca) or magnesium (Mg). These metals are found in the second column of the periodic table of the elements.
A fatty acid is an organic compound most often of animal or plant origin. A fatty acid contains a long-chain aliphatic carbon skeleton (with or without branches) with a carboxylic acid group (-COOH) at its end.
Detergents have some similarities. But are often of synthetic origin. They are not made insoluble by mineralized (or hard) water. Also, instead of a carboxylic acid group, a detergent contains a more highly ionic group. It may have a sulfate or a sulfonate group (-OS(O)₂-OH).
In addition, detergents can include one or more aromatic rings. Detergents offer added properties. They can be used as surfactants and foaming agents.
There are even detergents that dissolve in solvents other than water, such as gasoline. These often include nitrogen in their formulation. The nitrogen compound often includes a ring as part of its structure. Such compounds are not only detergents, but dispersants.
Example Difference Between Soap and Detergent
An example of a soap is potassium palmitate:
An example of a detergent is sodium lauryl sulfate: