A detergent is a surfactant or a mixture of surfactants with cleansing properties in dilute solutions. These substances are usually alkylbenzenesulfonates, a family of compounds that are similar to soap but are more soluble in hard water, because the polar sulfonate (of detergents) is less likely than the polar carboxylate (of soap) to bind to calcium and other ions found in hard water.
In domestic contexts, the term detergent by itself refers specifically to laundry detergent or dish detergent, as opposed to hand soap or other types of cleaning agents. Detergents are commonly available as powders or concentrated solutions. Detergents, like soaps, work because they are amphiphilic: partly hydrophilic (polar) and partly hydrophobic (non-polar). Their dual nature facilitates the mixture of hydrophobic compounds (like oil and grease) with water. Because air is not hydrophilic, detergents are also foaming agents to varying degrees.
"Detergent" is borrowed from the Latin verb "detergere", which is a compound of de, "away from", and tergere, "to wipe".  In the English language, it was used as an adjective, "detergent", in the 17th century.
Detergents are classified into three broad groupings, depending on the electrical charge of the surfactants.
Typical anionic detergents are alkylbenzenesulfonates. The alkylbenzene portion of these anions is lipophilic and the sulfonate is hydrophilic. Two different varieties have been popularized, those with branched alkyl groups and those with linear alkyl groups. The former were largely phased out in economically advanced societies because they are poorly biodegradable. An estimated 6 billion kilograms of anionic detergents are produced annually for domestic markets.
Cationic detergents are similar to the anionic ones, with a hydrophilic component, but, instead of the anionic sulfonate group, the cationic surfactants have quaternary ammonium as the polar end. The ammonium sulfate center is positively charged.
Non-ionic detergents are characterized by their uncharged, hydrophilic headgroups. Typical non-ionic detergents are based on polyoxyethylene or a glycoside. Common examples of the former include Tween, Triton, and the Brij series. These materials are also known as ethoxylates or PEGylates and their metabolites, nonylphenol. Glycosides have a sugar as their uncharged hydrophilic headgroup. Examples include octyl thioglucoside and maltosides. HEGA and MEGA series detergents are similar, possessing a sugar alcohol as headgroup.
See surfactants for more applications.
This section needs expansion. You can help by adding to it. (January 2015)
One of the largest applications of detergents is for household and shop cleaning including dish washing and washing laundry. The formulations are complex, reflecting the diverse demands of the application and the highly competitive consumer market.
Both carburetors and fuel injector components of Otto engines benefit from detergents in the fuels to prevent fouling. Concentrations are about 300 ppm. Typical detergents are long-chain amines and amides such as polyisobuteneamine and polyisobuteneamide/succinimide.
Reagent grade detergents are employed for the isolation and purification of integral membrane proteins found in biological cells. Solubilization of cell membrane bilayers requires a detergent that can enter the inner membrane monolayer. Advancements in the purity and sophistication of detergents have facilitated structural and biophysical characterization of important membrane proteins such as ion channels also the disrupt membrane by binding lipopolysaccharide,transporters, signaling receptors, and photosystem II.