A transaction is zero sum, the market is net positive. For the market to be zero sum, the market cap would have to be constant. If I buy something from someone for $1 then sell it to you for $2, I gained a dollar and you own a share that's worth $2.
It's easy to see that this is nonsense: I could buy a widget from someone for $1, then turn around and sell it to my brother for $10000, does that really mean the widget is now magically worth $10000, and we doubled our collective holdings? No, what actually happened is that we together still have that same $10000, plus a worthless $1 widget.
Derivatives like options can be zero sum, options expire worthless.