system
Given the following post, respond as if you're commenting on Reddit:
human
How does baking soda absorb/remove odors?

For example in the refrigerator/freezer?  Other things I've heard from my mother is to sprinkle on carpet before vacuuming, and it will make the house smell better and keep the vacuum bag from smelling.  

How does this work?
gpt
It's acid-base chemistry.  

Baking soda is an amphoteric substance, which means it can act as both a acid and a base.  Many odor-causing compounds, either acids or bases, react with it to form a less volatile salt, which reduces the observed odor.

There is also absorption effect, small molecules can diffuse into the porous solid and they have difficulty diffusing out.