To understand what is needed to achieve effective cleaning, it is helpful
to have a basic knowledge of soap and detergent chemistry.
  
Water, the liquid commonly used for cleaning, has a property called
surface tension. In the body of the water, each molecule is surrounded
and attracted by other water molecules. However, at the surface, those
molecules are surrounded by other water molecules only on the water side.
A tension is created as the water molecules at the surface are pulled
into the body of the water. This tension causes water to bead up on
surfaces (glass, fabric), which slows wetting of the surface and inhibits
the cleaning process. You can see surface tension at work by placing a
drop of water onto a counter top. The drop will hold its shape and will
not spread.
  In the cleaning process, surface tension must be reduced so water can
spread and wet surfaces. Chemicals that are able to do this effectively
are called surface active agents, or surfactants. They are said to make
water "wetter."
  
Surfactants perform other important functions in cleaning, such as
loosening, emulsifying (dispersing in water) and holding soil in suspension
until it can be rinsed away. Surfactants can also provide alkalinity,
which is useful in removing acidic soils.
  
Surfactants are classified by their ionic (electrical charge) properties
in water: anionic (negative charge), nonionic (no charge), cationic
(positive charge) and amphoteric (either positive or negative charge).
   Soap is an anionic surfactant. Other anionic as well as nonionic
surfactants are the main ingredients in today's detergents. Now let's
look closer at the chemistry of surfactants.
SOAPS
Soaps are water-soluble sodium or potassium salts of fatty acids. Soaps
are made from fats and oils, or their fatty acids, by treating them
chemically with a strong alkali.
First let's examine the composition of fats, oils and alkalis; then we'll
review the soapmaking process.
Fats and Oils
The fats and oils used in soapmaking come from animal or plant sources.
Each fat or oil is made up of a distinctive mixture of several different
triglycerides.
In a triglyceride molecule, three fatty acid molecules are attached to
one molecule of glycerine. There are many types of triglycerides; each
type consists of its own particular combination of fatty acids.
Fatty acids are the components of fats and oils that are used in making
soap. They are weak acids composed of two parts:
A carboxylic acid group consisting of one hydrogen (H) atom, two oxygen
(O) atoms, and one carbon (C) atom, plus a hydrocarbon chain attached to
the carboxylic acid group. Generally, it is made up of a long straight
chain of carbon (C) atoms each carrying two hydrogen (H) atoms.
Alkali
An alkali is a soluble salt of an alkali metal like sodium or potassium.
Originally, the alkalis used in soapmaking were obtained from the ashes
of plants, but they are now made commercially. Today, the term alkali
describes a substance that chemically is a base (the opposite of an acid)
and that reacts with and neutralizes an acid.
The common alkalis used in soapmaking are sodium hydroxide (NaOH), also
called caustic soda; and potassium hydroxide (KOH), also called caustic
potash.
How Soaps are Made
Saponification of fats and oils is the most widely used soapmaking
process. This method involves heating fats and oils and reacting them
with a liquid alkali to produce soap and water (neat soap) plus glycerine.
The other major soapmaking process is the neutralization of fatty acids
with an alkali. Fats and oils are hydrolyzed (split) with a high-pressure
steam to yield crude fatty acids and glycerine. The fatty acids are then
purified by distillation and neutralized with an alkali to produce soap
and water (neat soap).
When the alkali is sodium hydroxide, a sodium soap is formed. Sodium
soaps are "hard" soaps. When the alkali is potassium hydroxide, a
potassium soap is formed. Potassium soaps are softer and are found in
some liquid hand soaps and shaving creams.
The carboxylate end of the soap molecule is attracted to water. It is
called the hydrophilic (water-loving) end. The hydrocarbon chain is
attracted to oil and grease and repelled by water. It is known as the
hydrophobic (water-hating) end.
How Water Hardness Affects Cleaning Action
Although soap is a good cleaning agent, its effectiveness is reduced when
used in hard water. Hardness in water is caused by the presence of
mineral salts - mostly those of calcium (Ca) and magnesium (Mg), but
sometimes also iron (Fe) and manganese (Mn). The mineral salts react with
soap to form an insoluble precipitate known as soap film or scum.
Soap film does not rinse away easily. It tends to remain behind and
produces visible deposits on clothing and makes fabrics feel stiff. It
also attaches to the insides of bathtubs, sinks and washing machines.
Some soap is used up by reacting with hard water minerals to form the
film. This reduces the amount of soap available for cleaning. Even when
clothes are washed in soft water, some hardness minerals are introduced
by the soil on clothes. Soap molecules are not very versatile and cannot
be adapted to today's variety of fibers, washing temperatures and water
conditions.