baking powder is a leavening agent that produces carbon dioxide gas during the baking process. the carbon dioxide gas bubbles become trapped in the batter as it bakes, forming air spaces in the resultant muffins.