Chemistry is a Piece of Cake—The Science of Baking

By Published On: March 30, 2017Last Updated: October 26, 2022

When you think about it, baking involves a ton of precision: measurements, timing as well as a certain poise that all come together to yield a delectable product. All this seems remarkably similar to a chemistry experiment, yet few pastry chefs deem it necessary to understand what happens at a molecular level throughout the baking process. Well, soon enough, you’ll be one of the exceptional few! Also, what in the world is gluten? Welcome to the chemistry of baking.

Many chemical reactions are involved in the baking of cakes and pastries. The sulfur in gluten proteins form disulfide bonds, giving dough its elasticity. Water dissolves the other components while distributing the heat evenly when the pastry is cooking in the oven. Yeast ferments the sugars, creating gas that expands the dough. Fats in milk and butter are emulsifiers, preventing the insoluble chemicals from forming unsavory lumps. Finally, heat from the oven accelerates all of these reactions.

Flour and Gluten Chemistry

Some bakers are content following recipes without a second thought to the nature of the ingredients. But real chemists—ahem, bakers—know that to improve upon and even create new pastries, we must first develop a deeper understanding of the ingredients and processes involved. Enough talk, let’s apply some chemistry to the art of baking!

Our first focus is flour, as it makes up the bulk of a cake. Gluten in flour is a mixture of proteins called gliadins and glutenins. They are large proteins with molecular weights (MW) between 20,000 to 100,000 grams per mole1!

While gliadins are happy to hang about alone, glutenins like to come together to form extremely large structures (with MW over 10 million!) because of their sulfur atoms. Sulfur atoms in neighboring glutenins react to form disulfide (S-S) bonds, resulting in an interlinked mess.

This bonding provides dough with its characteristic structure and elasticity. Without gluten, pastries take on a flat and doughy texture instead.

Water, Water, Everywhere

Water works as a solvent, dissolving many of the other chemicals used in baking and allowing their chemical reactions to take place. Water also has a high heat capacity, controlling the internal temperature of the cake during baking and ensuring it’s even cooked. It also helps keep the dough nice and moist.

The glutenin structures mentioned above are held together even more strongly when water is added to flour, forming hydrogen bonds and giving the pastry more rigidity.

Water is essential in all pastries, even in recipes that don’t directly list water as an ingredient. In those recipes, water comes from wet ingredients such as melted chocolate, milk and eggs. Don’t believe us? Try to search for a recipe that doesn’t include a single ‘wet’ product in the ingredients list!

Many recipes use eggs as a source of water. Eggs are interesting because egg whites form a protective coating around air bubbles during the baking process, which prevents them from bursting. This ensures your delicious cake is free from lumps and unevenness!

No Substitute for Yeast in Baking

Water activates an enzyme in flour called amylase. Amylase breaks down starch, the main chemical in flour that consists of long chains of glucose units. We can now add baker’s yeast to kick start an important chemical process in baking: expansion.

When we add yeast to wet flour, it further converts this glucose to ethanol and carbon dioxide, through a process called fermentation. Fermentation expands (or leavens) the dough since it produces carbon dioxide gas:

C_{6}H_{12}O_{6} \to  2\: C_{2}H_{5}OH + 2\: CO2

However, yeast takes a little while to awaken, sometimes needing a few hours of being left alone to ferment all that glucose. That’s why dough takes time to ‘rise’.

In cakes, baking soda (sodium bicarbonate, Na2CO3)) is often used as a substitute for yeast to speed up the rising of cake batter. Baking soda works similarly when heated, causing expansion by producing carbon dioxide gas:

2 \:NaHCO_{3} \to  Na_{2}CO_{3} + H_{2}O + CO_{2}

The problem is that sodium carbonate has a bitter taste and also stains the batter yellow, which is bad news for our taste buds.

But since sodium carbonate is a base (in chemistry, this means it has a pH of above 7), we can neutralize it by using acids in vinegar (acetic acid), lemon juice (citric acid) or the more popular cream of tartar (tartaric acid). This is why baking soda in recipes is almost always accompanied by one of these acidic ingredients!

Here’s a secret! In order to forego this whole process like a lazy chemist/baker, you can add acid to baking soda direct in the form of monocalcium phosphate. You can find this baking soda/acid mixture in ready-to-use baking powder, producing the all-important carbon dioxide gas:

NaHCO_{3} + H^{+} \to  Na^{+} + H_{2}O + CO_{2}

A Fatty Environment

Fats play an important role in controlling the chemical environment of a bake. Fat molecules consist of long chains of hydrocarbons (carbon-based molecules) linked by glycerol, an acid. Fat-rich ingredients include butter or oil, but lard (pork fat) is also often used in the pie business.

Milk also contains a fair amount of fats. The main role of fats is an emulsifier, mixing soluble and insoluble ingredients evenly. This ensures that there’s no clumping of ingredients during the mixing and baking process.

Fats also prevent too much water from being absorbed by the flour. Because they are hydrophobic (hate water), they repel water molecules around them2.

They are also useful in shortening, or keeping the pastry crumbly. Muffins are an example of a product that tastes best when shortened. Remember gluten? Well, too much gluten the dough to be too rubbery and not crumbly enough. Shortening the dough slows down the clumping together of gluten proteins.

Fats are also responsible for giving pastries a satisfyingly smooth texture and a tender mouthfeel that makes them undeniably decadent.

Fats are the chemical equivalent to the tender loving care of a homemade pastry

Sugar, More than Just Sweet

You may be inclined to think that the only role sugar plays in baking is to excite our taste buds, but you would be doing this crucial ingredient a major disservice. Sugar, also known by its posh name sucrose, is a disaccharide. It consists of two monosaccharides (shown in the diagram below), glucose and fructose.

chemical structure of sucrose
Glucose (left ring)
Fructose (right ring)

Sucrose is involved in the chemistry of baking too, mainly by providing fuel for yeast fermentation. Sugar also locks in moisture in the finished product, increasing the shelf life of your delicious cake.

That’s why artificial sweeteners like aspartame are so difficult to incorporate into pastries, because sugar is so much more than just sweet!

Heat Accelerates Baking Chemistry

Once we mix all the ingredients together, we need to provide energy to kickstart all the important chemical reactions. That’s what the oven is for! The process of baking a pastry consists of 3 stages: expansion, setting and browning.

As soon as the pastry goes into the oven, energy in the form of heat speeds up all the chemical processes, releasing carbon dioxide and expanding the dough. Water vapor starts to form at 60°C which further expands and aerates the dough as the moisture escapes.

Next, the outside of the pastry starts to harden, so that all its goodness is contained within the confines of the crust or outer layer. The coagulation of egg proteins occurs at 80°C, which also corresponds to gluten losing its stretchiness. This combination of reactions causes the pastry to firm up.

Finally, at around 160°C, browning reactions take place on surface in the form of Maillard reactions (also found in coffee roasting). Sugar is responsible for most of the Maillard reactions. Amino acids in the dough attack the sugar molecules, resulting in product that have a range of aromas/flavors.

We don’t know much about these Maillard molecules, but we know we love them. They have yet to be identified, probably because the baked pastries end up in the stomachs of hungry chemists instead of ever making it to the lab. Oh well.



  1. Wieser, H. (2007). Chemistry of gluten proteins. Food microbiology, 24(2), 115-119.
  2. Rogers, D. (2004). Functions of fats and oils in bakery products. INFORM-CHAMPAIGN-, 15, 572-574.

About the Author

sean author
Sean Lim

Sean is a consultant for clients in the pharmaceutical industry and is a lecturer at a local university, where unfortunate undergrads are subject to his ramblings on chemistry and pharmacology.

You Might Also Like…

Go to Top