Soaps were the earliest surfactants and are obtained from fats which are known as glycerides because they are esters formed by the trihydric alcohol, propane-1,2,3-triol (glycerol), with long chain carboxylic acids (fatty acids).The glycerides are hydrolyzed by heating with sodium hydroxide solution to form soaps, the sodium salts of the acids, and propane-1,2,3-triol.The process is known as saponification.
Surfactants are one of many different compounds that make up a detergent. They are added to remove dirt from skin, clothes and household articles particularly in kitchens and bathrooms. They are also used extensively in industry. The term surfactant comes from the words surface active agent.Surfactants function by breaking down the interface between water and oils and dirt. They also hold these oils and dirt in suspension, and so allow their removal. They are able to act in this way because they contain both a hydrophilic (water loving) group, such as an acid anion, and a hydrophobic (water hating) group, such as an alkyl chain.
Amphoteric Surfactants have one very important advantage over soaps. Because soaps form insoluble calcium and magnesium salts with the calcium and magnesium ions in hard water and in the clays which are present in dirt, much of the soap is wasted forming an insoluble scum. However, this is avoided when using Amphoteric Surfactants. For example, in the anionic surfactants, the carboxylate group in soap is replaced by a sulfonate or sulfate group as the hydrophilic component. The corresponding calcium and magnesium salts are more soluble in water than the calcium and magnesium salts of carboxylic acids.