In cooking, a leavening agent or raising agent, also called a leaven or leavener, is any one of a number of substances used in doughs and batters that cause a foaming action that lightens and softens the mixture. An alternative or supplement to leavening agents is mechanical action by which air is incorporated . Leavening agents can be biological or synthetic chemical compounds. The gas produced is often carbon dioxide, or occasionally hydrogen.
When a dough or batter is mixed, the starch in the flour and the water in the dough form a matrix (often supported further by proteins like gluten or polysaccharides, such as pentosans or xanthan gum). The starch then gelatinizes and sets, leaving gas bubbles that remain.