The atmosphere, a thin envelope of gases that surrounds our planet and supports life on Earth, evolved in stages. When the Earth first formed over 4.6 billion years ago, its surface was molten, with almost no atmosphere. As it cooled, the atmosphere formed from gases like carbon dioxide and water vapor that spewed from volcanic eruptions. The water vapor eventually condensed to form Earth’s oceans. Carbon dioxide began dissolving into shallow seas and allowed cyanobacteria—blue-green algae—to perform oxygen-emitting photosynthesis.
Over 2.4 billion years ago, this oxygen eventually accumulated until the atmospheric composition changed enough to kill off most of the then-existing microorganisms. The methane remaining in the air created a haze. At the time, oxygen was only present in compounds, not as part of the gases that comprised the Earth’s atmosphere.
Complex chemical reactions in the early oceans transformed carbon-containing molecules into simple, living cells that did not need oxygen to survive. They used sulfur and other elements as energy sources instead of photosynthesis. Over time, tiny photosynthetic organisms produced enough oxygen to react with the methane in the atmosphere. Eventually, the methane haze cleared, the mix of gases that support the kinds of life forms on our planet today developed, and the sky became blue.