Baking powder (a white powder) is a dry chemical ingredient used in the making of a cake. It consists of sodium bicarbonate (an alkali), acid salt (such as tartaric acid) and starch that when exposed to water, react together to form carbon dioxide gas causing it to expand, thereby producing bubbles and allowing the cake dough to rise. Typically today, modern baking powders are double acting (meaning they contain two acid salts). One reacts at room temperature, causing a rise as soon as the batter is prepared while the other one reacts at a higher temperature, producing a further rise during the baking process.
Baking soda is also an ingredient which can create the gas. Baking soda is composed of sodium bicarbonate and requires an acidic ingredient (such as lemon juice, buttermilk, yoghurt, etc) to form carbon dioxide.
When mixing baking soda (carbonate) and lemon juice (acid), a clear gas is made called "carbon dioxide". Hence this gives us the general equation for the reaction between acid and carbonate. Acid + Carbonate Carbon dioxide + Salt + Water
Baking powder works the same way. The dry acid (i.e. tartaric acid) and base (i.e. sodium bicarbonate) dissolves in water and reacts to produce carbon dioxide gas. The equation is like so: Sodium Bicarbonate + weak solid acid Sodium + Water + Carbon dioxide NaHCO3 + H+ (from the acid) Na + + H2O + CO2
The heat from the oven causes carbon dioxide gas to expand and evaporate the cake moisture, enlarging existing air holes and consequently lightening the batter. As a result, the cake rises.