system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why does shaking soda release the carbon dioxide?
gpt
Soda is saturated with CO2 when it's in a can highly pressurized with pure CO2.

When you pop open the can, this reduces the air pressure (specifically, the partial pressure of CO2). Suddenly, the soda is highly supersaturated with CO2.

When the CO2 comes out of solution at the surface, you don't really notice, but when CO2 comes out of solution under water, a bubble of CO2 forms. The equilibrium state is a completely flat soda (leave an opened soda out for a few days - dead flat and no bubbles).

But equilibrium isn't reached instantly, it takes time. You can reduce that time by creating more nucleation sites.

A nucleation site is an irregularity that allows a bubble to begin forming. Simmer some water and you'll see steams of bubbles forming at specific locations on the bottom of the pan. Each corresponds to a tiny scratch on the pot where the bubbles form.

What's interesting is a bubble is itself a nucleation site. In boiling water, you can see the bubbles growing larger as they rise.

Shaking a can mixes air into the soda, creating more bubbles, creating more nucleation sites, and allowing the CO2 to fall out of solution faster.

A mentos tablet has an extremely rough surface that also dissolves into more rough surfaces, putting ridiculous numbers of nucleation sites in the soda, allowing the soda to reach equilibrium nearly instantly. The result is all the CO2 turns to gas.