You’ve probably heard that baking is a science, and depending on who you are — and how effective your high school science teachers were — that’s either intimidating or exciting.

Don’t let nightmares of chemistry class scare you away. Understanding the mechanics of common baking ingredients isn’t that complicated, and the payoff is real — because we all know that the friend who’s really good at baking has a lifelong invite to every party and potluck.

Each baking ingredient plays their own special role (or roles). Think of them as characters: each one has their own strength but the final outcome of the show depends on how they interact with one another.

Depending on how they each plays their part, (aka how you pinch and pour each one), you can create everything from a cookie to a muffin to a biscuit — and so, so much more.

Temperature check

Make sure your ingredients are at the right temperature or all this baking science info will be a moot point. Unless otherwise stated in the recipe, assume wet ingredients like eggs, butter, and milk all need to be at room temperature before you start mixing in order to produce a consistent batter.

Learn how to quickly bring your ingredients up to room temperature, plus other helpful hacks, here.

Like your type A friend who sends out the Doodle two months ahead of time and books all the reservations, flour provides structure. When flour is mixed with water — or water-based liquids like milk or eggs — protein strands called gluten are formed. As a general rule, less protein creates a lighter, fluffier product and more protein creates a chewier one. That’s why different recipes call for different types of flour.

All-purpose flour and whole-wheat flour are on the higher-protein side, at 10 to 12 percent and 13 to 14 percent protein, respectively. Cake flour and pastry flour are pretty low in protein, at 5 to 8 percent and 8 to 9 percent, respectively.

The way you mix also creates structure

The more you mix or knead flour and water (dry and wet ingredients), the more gluten strands are formed, which, as we said above, creates a denser product.

You should pretty much always mix gently (if using an electric mixer, use the lowest setting). And watch out for recipes that call for “folding,” a technique used to combined delicate mixtures into heavier ones without popping air bubbles.

In general, just make sure to pay close attention to what the recipe says about mixing.

A sweet guy isn’t just sweet because of what he does, it’s also the ripple effect of how he makes you feel. Sugar’s role in baking? Same thing.

First, it tenderizes by bonding with water molecules and drawing moisture away from proteins and starches (thus restricting gluten formation).

Second, it helps batters rise. When you mix sugar and butter at a high speed (or “cream” them), the sugar granules create friction and form tiny air bubbles that get trapped in the fat.

And third, it retains moisture, which is key if you like rich, chewy baked goods. While the word “moist” may not roll off the tongue easily, most tongues like a moist baked good.

White vs. brown sugar

Brown sugar is naturally more moist than white so it creates a softer, more moist product. It also usually turns your goods a darker color. For the casual baker, they are somewhat interchangeable.

But since sugar reacts differently depending on the other ingredients in a project, you can’t easily say white sugar will do one thing and brown another. If you really want to dive into different types of sugars, this baker gives a detailed explanation.

Egg yolks have the natural ability to make your ingredients fall in love. They’re referred to as emulsifiers because they bind fats and water-based liquids, which is essential in baking to create a consistent mixture.

Egg whites are made up of mostly protein and some water, which, as we’ve explained, provide rise and structure.

For example, when egg whites are whipped, as when making a meringue, air bubbles are introduced and cause the water and protein molecules to reconfigure. These molecules spread out and trap the air bubbles, producing a much larger mass with a foamy texture.

Like your friend who works full-time, trains as a yoga instructor, and finds the time to make bread in-between, shortening does it all. It contributes to structure, texture, and taste by providing rise, moisture, and richness. Appropriately named for the effect it has on gluten, shortening shortens the protein strands by coating them and restricting bonding.

Common shortenings (which are fats at room temperature) include lard, ghee, coconut oil, and butter, which has become the go-to because of its rich flavor.

What about oils?

Like shortening, oil contributes tenderness and moisture to baked goods — but you shouldn’t use these fats interchangeably.

Oils work well in cakes that are light and airy, such as chiffon cake, but not so well in cookies, which rely on structure from creaming butter.

When things are feelings a little…off, salt rolls through and balances it all out. (So yes, you do really need to add that 1/4 teaspoon!) Salt balances the flavor of sweet baked goods and counteracts bitter flavors (which, in turn, enhances sweetness).

In bread making, salt plays an essential role in slowing and stabilizing the fermentation process by absorbing moisture from the yeast.

Like your friend who never seems to work out but who could open any jar, milk is the muscle. The elements of milk — protein, fat, and sugar, which, as we’ve learned, provide structure, moisture, and sweetness — create a strong batter. The sugar in milk also contributes to browning. The combination of these components helps batters and doughs keep their shape and texture.

What about buttermilk?

Buttermilk, which is essentially sour milk, yields a lighter, more tender crumb because the acidity works with the baking soda to create rise. It also adds a touch of tang to the flavor.

Baking soda: The hype man

You know that guy on stage at concerts who tells everyone to get their hands in the air? Baking soda is that guy, except it gets projects to rise by making CO2 bubbles. It does this at two stages in baking — once at room temperature when mixed with a liquid and an acid, and again when heated in the oven.

Sodium bicarbonate is naturally alkaline, or basic, which means it needs an acid to activate. Some common acidic ingredients are buttermilk, yogurt, brown sugar, cacao powder, and applesauce.

Baking powder: The cheerful friend

You know that friend who’s always in such a good mood they bring the mood up of everyone around them? Baking powder is kind of like that.

It’s often confused with baking soda, but there are a few key differences, which means you can’t use them interchangeably.

Baking powder is a leavening agent that contains sodium bicarbonate, but it has an acid (cream of tartar) mixed in. This means all you need to activate it is moisture and heat.

Also, baking soda is three times stronger than baking powder, so baking powder doesn’t have the same leavening ability.

Baking powder is often used in recipes that don’t contain acidic ingredients like those mentioned above. But many recipes call for both baking soda and baking powder. If there isn’t enough acid in the recipe for baking soda to interact with, baking powder is added to provide more rise.

Yeast: The life of the party

Yeast is that charismatic friend who creates life and energy wherever they go. It’s a live organism that feeds on sugars and starches and produces carbon dioxide and alcohol. It’s a natural leavening agent used in bread making.

Yeast comes in several forms. Most common are active dry yeast and instant yeast. The main difference is that active dry yeast needs to be added to water before being used, whereas instant yeast can be added straight to mixtures or batters.

Our parting advice is to make sure you follow the recipe instructions to a T. All those hyperspecific directions — like mixing your dry ingredients in a separate bowl and adding eggs one at a time — exist for a reason, and skipping one could change the whole outcome.

More baking questions? Check out our article on tips, tricks, and ingredient swaps.

Grace Simmons is a San Francisco-based writer, former line cook, and health food guru. After being diagnosed with Crohn’s disease at age 14, she became passionate about health and using food to nourish the body. Check her out on Twitter.