While air is primarily composed of nitrogen and oxygen, it also contains trace amounts of other gases like carbon dioxide, argon, and neon.