The intimate chemistry among key ingredients delivers the foundation for good cake. Flour thickens the batter and provides gluten, a protein that gives the cake structure. It forms when flour is combined with a liquid and agitated. Don’t overmix, which can cause your cake to turn tough. Leaveners, like baking soda or powder, produce carbon dioxide bubbles, which are trapped by the starch in the batter and expand during baking, causing the cake to rise. Fats, like butter, shortening, or oil, help retard gluten formation while providing moisture for the cake. This ensures a tender texture. Sugar breaks up gluten, keeping the texture tender; it absorbs liquid, keeping the cake moist; and it caramelizes in baking, enriching flavors and helping the cake brown. Eggs firm up when cooked, helping cake batters set in the oven. Egg yolks contain fat, as well as lecithin, an emulsifier that allows fats and water to mix smoothly and ensures even texture.