A detergent is a surfactant or a mixture of surfactants with cleansing properties when in dilute solutions.  There are a large variety of detergents, a common family being the alkylbenzene sulfonates, which are soap-like compounds that 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.
The word detergent is derived from the Latin adjective detergens, from the verb detergere, meaning to wipe or polish off. Detergent is a surfactant or a mixture of surfactants with cleansing properties when in dilute solutions.  However, conventionally, detergent is used to mean synthetic cleaning compounds as opposed to soap (a salt of the natural fatty acid), even though soap is also a detergent in the true sense.  In domestic contexts, the term detergent refers to household cleaning products such as laundry detergent or dish detergent , which are in fact complex mixtures of different compounds, not all of which are by themselves detergents.
Detergency is the ability to remove unwanted substances termed 'soils' from a substrate (e.g clothing). 
Detergents are a group of compounds with an amphiphilic structure, where each molecule has a hydrophilic (polar) head and a long hydrophobic (non-polar) tail. The hydrophobic portion of these molecules may be straight- or branched-chain hydrocarbons, or it may have a steroid structure. The hydrophilic portion is more varied, they may be ionic or non-ionic, and can range from a simple or a relatively elaborate structure.  Detergents are surfactants since they can decrease the surface tension of water. 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 molecules aggregate to form micelles, which makes them soluble in water. The hydrophobic group of the detergent is the main driving force of micelle formation, its aggregation forms the hydrophobic core of the micelles. The micelle can remove grease, protein or soiling particles. The concentration at which micelles start to form is the critical micelle concentration (CMC), and the temperature at which the micelles further aggregate to separate the solution into two phases is the cloud point when the solution becomes cloudy and detergency is optimal. 
Detergents work better in an alkaline pH. The properties of detergents are dependent on the molecular structure of the monomer. The ability to foam may be determined by the head group, for example anionic surfactants are high-foaming, while nonionic surfactants may be non-foaming or low-foaming. 
Detergents are classified into four broad groupings, depending on the electrical charge of the surfactants. 
Typical anionic detergents are alkylbenzene sulfonates. The alkylbenzene portion of these anions is lipophilic and the sulfonate is hydrophilic. Two 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. 
Anionic detergents is the most common form of detergents, and an estimated 6 billion kilograms of anionic detergents are produced annually for the domestic markets.
Bile acids, such as deoxycholic acid (DOC), are anionic detergents produced by the liver to aid in digestion and absorption of fats and oils.
Cationic detergents are similar to anionic ones, but quaternary ammonium replaces the hydrophilic anionic sulfonate group. The ammonium sulfate center is positively charged.  Cationic surfactants generally have poor detergency.
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.
Amphoteric or zwitterionic detergents have zwitterions within a particular pH range, and possess a net zero charge arising from the presence of equal numbers of +1 and −1 charged chemical groups. Examples include CHAPS.
Soap is known to have been used as a surfactant for washing clothes since the Sumerian time in 2,500 B.C.  In ancient Egypt, soda was used as a wash additive. In the 19th century, synthetic surfactants began to be created, for example from olive oil.  Sodium silicate (water glass) was used in soap-making in the United States in the 1860s,  and in 1876, Henkel sold a sodium silicate-based product that can be used with soap and marketed as a "universal detergent" (Universalwaschmittel) in Germany. Soda was then mixed with sodium silicate to produce Germany's first brand name detergent Bleichsoda.  In 1907 Henkel also added a bleaching agent sodium perborate to launch the first 'self-acting' laundry detergent Persil to eliminate the laborious rubbing of laundry by hand. 
During the First World War, there was a shortage of oils and fats needed to make soap. In order find alternatives for soap, synthetic detergents were made in Germany by chemists using raw material derived from coal tar.    These early products, however, did not provide sufficient detergency. In 1928, effective detergent was made through the sulfation of fatty alcohol, but large-scale production was not feasible until low-cost fatty alcohols become available in the early 1930s.  The synthetic detergent created was more effective and less likely to form scum than soap in hard water, and can also eliminate acid and alkaline reactions and decompose dirt. Commercial detergent products with fatty alcohol sulphates began to be sold, initially in 1932 in Germany by Henkel.  In the United States, detergents were sold in 1933 by Procter & Gamble (Dreft) primarily in areas with hard water.  However, sales in the US grew slowly until the introduction of 'built' detergents with the addition of effective phosphate builder developed in the early 1940s.  The builder improves the performance of the surfactants by softening the water through the chelation of calcium and magnesium ions, helping to maintain an alkaline pH, as well as dispersing and keeping the soiling particles in solution.  The development of the petrochemical industry after the Second World War also yielded material for the production of a range of synthetic surfactants, and alkylbenzene sulfonates became the most important detergent surfactants used.  By the 1950s, laundry detergents had become widespread, and largely replaced soap for cleaning clothes in developed countries. 
Over the years, many types of detergents have been developed for a variety of purposes, for example, low-sudsing detergents for use in front-loading washing machines, heavy-duty detergents effective in removing grease and dirt, all-purpose detergents and specialty detergents.   They become incorporated in various products outside of laundry use, for example in dishwasher detergents, shampoo, toothpaste, industrial cleaners, and in lubricants and fuels to reduce or prevent the formation of sludge or deposits.  The formulation of detergent products may include bleach, fragrances, dyes and other additives. The use of phosphates in detergent, however, led to concerns over nutrient pollution and demand for changes to the formulation of the detergents.  Concerns were also raised over the use of surfactants such as branched alkylbenzene sulfonate (tetrapropylenebenzene sulfonate) that lingers in the environment, which led to their replacement by surfactants that are more biodegradable, such as linear alkylbenzene sulfonate.   Developments over the years have included the use of enzymes, substitutes for phosphates such as zeolite A and NTA, TAED as bleach activator, sugar-based surfactants which are biodegradable and milder to skin, and other green friendly products, as well as changes to the form of delivery such as tablets, gels and pods.  
One of the largest applications of detergents is for household and shop cleaning including dish washing and washing laundry. These detergents are commonly available as powders or concentrated solutions, and the formulations of these detergents are often complex mixtures of a variety of chemicals aside from surfactants, reflecting the diverse demands of the application and the highly competitive consumer market. These detergents may contain the following components: 
Both carburetors and fuel injector components of internal combustion 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. 
Sodium dodecyl sulfate (SDS) or sodium lauryl sulfate (SLS), sometimes written sodium laurilsulfate, is an organic compound with the formula CH3(CH2)11OSO3Na and structure H3C−(CH2)11−O−S(=O)2−O−Na+. It is an anionic surfactant used in many cleaning and hygiene products. This compound is the sodium salt of the 12-carbon organosulfate. Its hydrocarbon tail combined with a polar "headgroup" give the compound amphiphilic properties that make it useful as a detergent. SDS is also component of mixtures produced from inexpensive coconut and palm oils. SDS is a common component of many domestic cleaning, personal hygiene and cosmetic, pharmaceutical, and food products, as well as of industrial and commercial cleaning and product formulations.
Surfactants are chemical compounds that decrease the surface tension or interfacial tension between two liquids, a liquid and a gas, or a liquid and a solid. Surfactants may function as emulsifiers, wetting agents, detergents, foaming agents, or dispersants. The word "surfactant" is a blend of surface-active agent, coined c. 1950.
A micelle or micella is an aggregate of surfactant amphipathic lipid molecules dispersed in a liquid, forming a colloidal suspension. A typical micelle in water forms an aggregate with the hydrophilic "head" regions in contact with surrounding solvent, sequestering the hydrophobic single-tail regions in the micelle centre.
Lipophilicity, refers to the ability of a chemical compound to dissolve in fats, oils, lipids, and non-polar solvents such as hexane or toluene. Such non-polar solvents are themselves lipophilic, and the axiom that "like dissolves like" generally holds true. Thus lipophilic substances tend to dissolve in other lipophilic substances, but hydrophilic ("water-loving") substances tend to dissolve in water and other hydrophilic substances.
Ethoxylation is a chemical reaction in which ethylene oxide adds to a substrate. It is the most widely practiced alkoxylation, which involves the addition of epoxides to substrates.
A fabric softener or fabric conditioner is a conditioner that is applied to laundry during the rinse cycle in a washing machine to reduce harshness in clothes that are dried in air after machine washing. In contrast to laundry detergents, fabric softeners may be regarded as a kind of after-treatment laundry aid.
Laundry detergent is a type of detergent used for cleaning dirty laundry (clothes). Laundry detergent is manufactured in powder and liquid form.
A bubble bath is a filled bathtub with a layer of surfactant foam on the surface of the water and consequently also the surfactant product used to produce the foam or soap. Less commonly, aerated or carbonated baths are called bubble baths.
An amphiphile, or amphipath, is a chemical compound possessing both hydrophilic and lipophilic (fat-loving) properties. Such a compound is called amphiphilic or amphipathic. Common amphiphilic compound is surfactant, which is a main ingredient of soaps, detergents, and lipoproteins. The phospholipid amphiphiles are the major structural component of cell membranes.
Dishwashing liquid, also known as dishwashing soap, dish detergent, and dish soap is a detergent used to assist in dishwashing. It is usually a highly-foaming mixture of surfactants with low skin irritation, and is primarily used for hand washing of glasses, plates, cutlery, and cooking utensils in a sink or bowl. In addition to its primary use, dishwashing liquid also has various informal applications, such as for creating bubbles, clothes washing and cleaning oil-affected birds.
Surfactin is a cyclic lipopeptide, commonly used as an antibiotic for its capacity as a surfactant. It is an amphiphile capable of withstanding hydrophilic and hydrophobic environments. The Gram-positive bacterial species Bacillus subtilis produces surfactin for its antibiotic effects against competitors. Surfactin showcases antibacterial, antiviral, antifungal, and hemolytic effects.
A hydrotrope is a compound that solubilizes hydrophobic compounds in aqueous solutions by means other than micellar solubilization. Typically, hydrotropes consist of a hydrophilic part and a hydrophobic part, but the hydrophobic part is generally too small to cause spontaneous self-aggregation. Hydrotropes do not have a critical concentration above which self-aggregation spontaneously starts to occur. Instead, some hydrotropes aggregate in a step-wise self-aggregation process, gradually increasing aggregation size. However, many hydrotropes do not seem to self-aggregate at all, unless a solubilizate has been added. Examples of hydrotropes include urea, tosylate, cumenesulfonate and xylenesulfonate.
Polymorphism in biophysics is the ability of lipids to aggregate in a variety of ways, giving rise to structures of different shapes, known as "phases". This can be in the form of sphere of lipid molecules (micelles), pairs of layers that face one another, a tubular arrangement (hexagonal), or various cubic phases. More complicated aggregations have also been observed, such as rhombohedral, tetragonal and orthorhombic phases.
Cleaning agents or hard-surface cleaners are substances used to remove dirt, including dust, stains, foul odors, and clutter on surfaces. Purposes of cleaning agents include health, beauty, removing offensive odor, and avoiding the spread of dirt and contaminants to oneself and others. Some cleaning agents can kill bacteria and clean at the same time. Others, called degreasers, contain organic solvents to help dissolve oils and fats.
Paint has four major components: pigments, binders, solvents, and additives. Pigments serve to give paint its color, texture, toughness, as well as determining if a paint is opaque or not. Common white pigments include titanium dioxide and zinc oxide. Binders are the film forming component of a paint as it dries and affects the durability, gloss, and flexibility of the coating. Polyurethanes, polyesters, and acrylics are all examples of common binders. The solvent is the medium in which all other components of the paint are dissolved and evaporates away as the paint dries and cures. The solvent also modifies the curing rate and viscosity of the paint in its liquid state. There are two types of paint: solvent-borne and water-borne paints. Solvent-borne paints use organic solvents as the primary vehicle carrying the solid components in a paint formulation, whereas water-borne paints use water as the continuous medium. The additives that are incorporated into paints are a wide range of things which impart important effects on the properties of the paint and the final coating. Common paint additives are catalysts, thickeners, stabilizers, emulsifiers, texturizers, biocides to fight bacterial growth, etc.
Alkylbenzene sulfonates are a class of anionic surfactants, consisting of a hydrophilic sulfonate head-group and a hydrophobic alkylbenzene tail-group. Along with sodium laureth sulfate, they are one of the oldest and most widely used synthetic detergents and may be found in numerous personal-care products and household-care products . They were first introduced in the 1930s in the form of branched alkylbenzene sulfonates (BAS). However following environmental concerns these were replaced with linear alkylbenzene sulfonates (LAS) during the 1960s. Since then production has increased significantly from about one million tons in 1980, to around 3.5 million tons in 2016, making them most produced anionic surfactant after soaps.
Wastewater comes out of the laundry process with additional energy (heat), lint, soil, dyes, finishing agents, and other chemicals from detergents. Some laundry wastewater goes directly into the environment, due to the flaws of water infrastructure. The majority goes to sewage treatment plants before flowing into the environment. Some chemicals remain in the water after treatment, which may contaminate the water system. Some have argued they can be toxic to wildlife, or can lead to eutrophication.
Dishwasher detergent is a detergent made for washing dishes in a dishwasher. Dishwasher detergent is different from dishwashing liquid made to wash dishes by hand.
α-Olefin sulfonates are a group of anionic surfactants, which are used as detergents. The compounds contain a - mostly linear, primary - alkyl R and a monovalent cation M, preferably sodium. The most frequently used example of this group of substances is sodium α-olefin sulfonate.
Wetting solutions are liquids containing active chemical compounds that minimise the distance between two immiscible phases by lowering the surface tension to induce optimal spreading. The two phases, known as an interface, can be classified into five categories, namely, solid-solid, solid-liquid, solid-gas, liquid-liquid and liquid-gas.