The processes of making soap are all centered around the chemical process of saponification. Soap makers have for years had huge lists of SAP (saponification) tables that describes the basic process of converting fats into soap. For new soap makers, the process may seem almost like magic because of all the mathematical formulas and conversions. Really, what every soap maker is doing when he or she makes a batch of soap is stepping into an organic chemistry lab and forcing a chemical reaction to take place.
The Chemicals Involved
The basic ingredients in any batch of soap are a strong base (lye, caustic potash, etc), water and an oil of some kind. When you put the lye into water, the water molecules ionize the bond between the sodium and hydroxide forming: Na+(aq) + OH-(aq). The final ingredient is where the complexity and the artistry of soap making enters the equation. Most oils are comprised of triglycerides. This basically means that oils are made up of three fatty acids with a glycerol backbone. The glycerol molecule has three hydroxyl (HO-) groups. Each fatty acid has a carboxyl group (COOH), a central long unbranched aliphatic chain (saturated (CH2)n or unsaturated (CH2)nCH=CH(CH2)n) and an omega carbon at the end that has 3 hydrogens (CH3). It is in the middle chain that the properties of the oil come from. Because of the limitless number of repeats and configurations of this middle chain, there are literally an unknown number of fatty acids in the world. Fortunately for us, when mother-nature finds a formula she likes, she reproduces it quite a bit in different places. The most common fatty acids that make up vegetable and animal lipids (at least the ones soap makers are interested in) are Lauric, Linoleic, Linolenic, Myristic, Oleic, Palmitic, Ricinoleic and Stearic acids. So, it are these three ingredients, when broken down to their base molecules, that form the palette for a bar of soap.
The Saponification Reaction
As any kid playing with vinegar and baking soda knows, when you mix an acid and a base together, you get a reaction. When soap makers mix their lye water into a vat of oil, what they are doing is really just this simple process of mixing a base with an acid. The first thing that takes place, is that the hydroxide (OH-) attacks the carboxyl group of the fatty acid which is attached to the glycerol. This causes the carboxyl to break away and form carboxylic acid. The lye base is attracted to the carboxylic acid and forms a salt with the aliphatic chain hanging off the side. At this point a single molecule of "soap" has been formed. This chemical reaction continues until all the lye or fatty acids are spent. Soap makers can play with this knowledge and discount/superfat the soap. That is to say, they can reduce the amount of lye they add to the oils so that the reaction stops before all of the oil has been converted to soap. While this saponification process is going on, a lot of heat is released during each of the reactions. This is why soap goes through a "gel" phase before it hardens into its final product.