Organic acids have been known for ages. Prehistoric people likely made acetic acid when their fermentation reactions went awry and produced vinegar instead of wine. The Sumerians (2900–1800 BCE) used vinegar as a condiment, a preservative, an antibiotic, and a detergent. Citric acid was discovered by an Islamic alchemist, Jabir Ibn Hayyan (also known as Geber), in the 8th century, and crystalline citric acid was first isolated from lemon juice in 1784 by the Swedish chemist Carl Wilhelm Scheele. Medieval scholars in Europe were aware that the crisp, tart flavor of citrus fruits is caused by citric acid. Naturalists of the 17th century knew that the sting of a red ant’s bite was due to an organic acid that the ant injected into the wound. The acetic acid of vinegar, the formic acid of red ants, and the citric acid of fruits all belong to the same family of compounds—carboxylic acids. Soaps are salts of long-chain carboxylic acids.
Prehistoric people also knew about organic bases—by smell if not by name; amines are the organic bases produced when animal tissue decays.