Why Cakes Rise
TL;DR: Cakes rise because heat turns moisture into expanding steam and triggers chemical reactions in leavening agents that release carbon dioxide, which gets trapped in a sticky web of flour proteins to puff up the batter.

The Physics of the Bubble
Think of a cake batter not as a liquid, but as a temporary, semi-solid trap. When you mix flour, fat, sugar, and eggs, you create a complex, viscous environment. The secret to a perfect rise lies in capturing gas. Without a structure to hold it, any gas produced would simply escape into the oven, leaving you with a dense, flat puck.
When your batter enters the oven, the heat does two things immediately: it thins the batter, making it easier for bubbles to form, and it begins to vaporize the water inside the mixture. This is the first stage of the rise. As the water turns into steam, it expands rapidly, pushing against the walls of the batter. If your batter is too thin, those bubbles pop and vanish. If it is too thick, the bubbles cannot grow. The goal is to reach that "Goldilocks" consistency where the bubbles can expand without bursting.
The Chemistry of Gas Production
While steam provides the initial lift, it isn't enough to create the light, airy texture we associate with a fine cake. For that, we need chemical leavening. Most recipes rely on baking powder, a clever combination of a base, such as (sodium bicarbonate), and an acid.
When dry, these components sit peacefully together. But add moisture and heat, and the reaction begins. The acid reacts with the base to produce carbon dioxide gas ():
This reaction is the engine of the cake. Because the gas is generated inside the batter, it creates millions of tiny, microscopic pockets. These pockets are the precursors to the "crumb" of your cake. The heat of the oven accelerates this reaction, causing the gas to expand just as the structure of the cake begins to set. It is a race against time: the gas must expand enough to puff the cake up before the heat cooks the proteins enough to lock that shape in place.
The Role of the Heat-Set Scaffold
If the gas provides the energy to rise, the proteins provide the architecture. As the temperature rises, the proteins in the flour and eggs begin to denature and coagulate. This is the moment the batter changes from a liquid to a solid.
Think of this as building a house. The gas is the air inside the rooms, and the protein web is the framing. If the framing sets too early, the cake cracks because the gas is still trying to expand. If it sets too late, the gas escapes, and the cake collapses under its own weight. Achieving the perfect rise is essentially an exercise in timing the expansion of with the physical setting of the protein structure. Once the temperature reaches the point where the proteins have fully bonded into a stable, porous web, the cake is "set." The bubbles are now permanently trapped, creating the light, springy texture you see when you slice into a finished masterpiece.
A cake rises because chemical reactions and steam generate gas bubbles that are trapped by a heat-set protein network, locking in the airy structure before the gas can escape.
Now that we understand how gas creates the rise, we must look closer at the "walls" of these bubbles—the complex protein web that gives a cake its strength and prevents it from crumbling into dust.