When you hungrily and hopefully watch a cake rise through the window of the oven, it’s doing so because of carbon dioxide bubbles. This gas is released from a reaction between an acid and an alkali in the baking powder you added to the recipe.
Baking powder consists of an acid component, such as cream of tartar (a white, acidic powder), an alkali (or base) like bicarbonate of soda (also known as baking soda), and a moisture absorber like cornstarch. When the cream of tartar and baking soda react with each other in the presence of water, carbon dioxide bubbles are released and these are held in place by the eggs in the mixture. The chemistry behind this explains why we mix cake ingredients in a certain order: liquids are added last so that the baking powder only reacts at the end; and recipes often warn against overmixing, which can result in the unwanted outcome of the vital bubbles bursting.
Yeast also releases carbon dioxide, but this takes 2-3 hours, which is when you need the most important ingredient, patience, while your bread dough rises. Baking powder works immediately. If your recipe calls for baking soda only (and so only base), that’s probably because there are ingredients in your recipe that contain the essential acid to react with the base. Acidic additions include buttermilk, honey, yoghurt and lemon juice.
It gets more complicated. Baking powder comes in two versions: single acting baking powder contains acid that dissolves in water, and so the chemical reaction begins as soon as liquids are added. The double acting version, which is much more common, contains a second acid that only dissolves when it’s hot – in the oven; so it offers an additional tier of bubble production. Since water starts the reaction, it is crucial that baking powder is kept dry – which is where the moisture absorber, such as cornstarch, comes in. It plays the same role as the little sachet of crystals that comes in a vitamin pill bottle, or in your new electronics purchase, to keep them dry. This is why double acting baking powder shouldn’t be kept in the fridge (because of condensation), or in sunlight (because of unwanted heat). Also, if you find lumps in your powder, that probably means the reaction has started in the tin. Test its freshness by adding a teaspoon to hot water: if it fizzes a lot, it’s fine.
As in any scientific experiment, the quantities of components are important. Too much baking powder gives off too much carbon dioxide, and therefore too may bubbles that may all join up to form larger bubbles which rise and burst out of the cake. Your cakes and muffins may rise beautifully and then collapse because of this (oh, the woe of my Saturday mornings). But too little baking powder results in no volume at all, so flat cakes again.
Chemistry is a piece of cake.