The atmosphere of Earth is a layer of gas above the Earth's surface that is gravitationally bound, for the most part, to Earth. This gas is made up of a number of different molecules and atoms, which we usually call air. At the Earth's surface, air is around 78% Nitrogen and 21% Oxygen, with the remaining 1% made up of argon, carbon dioxide, methane, and water vapor, among trace amounts of many other elements and molecules.
There are five layers of the atmosphere, all of which are defined by how the temperature changes with altitude within the layer. The lowest and most dense layer is the troposphere which is found from 0 to around 10 kilometers. The thickness of the troposphere is dependant on latitude, where it is thickest at the equator. This layer contains the majority of the water vapor in the atmosphere and is where clouds are found.
The stratosphere is found from the top of the troposphere, or tropopause, to around 50 kilometers. Within this layer, we find the ozone layer, in which the conditions are favourable to create the ozone molecule which is made of three oxygen atoms. Above the stratosphere is the mesosphere which reaches up to 85 kilometers. This layer is where the coldest atmospheric temperatures exist.
Next in height is the thermosphere, so called due to its increasing temperature with altitude. This layer of the atmosphere is most important to space scientists due to it's overlap with the ionosphere and extends to over 600 kilometers. Above this is the exosphere where the majority of the gasses left are lost to space as the gravitational pull from Earth is much lower.
The Kármán Line is the legal defined boundary between the atmosphere and outer space. This was mainly developed to allow for legislation to be written defining jurisdictions for aircraft and spacecraft. It is defined at 100 kilometeres above sea level.
The layers of the atmosphere. Credit: NOAA
Temperature and density with altitude in Earth's atmosphere. Credit: Encyclopedia Britannica
The different layers of the atmosphere are defined by a change in the temperature gradient between each layer. The troposphere has a decreasing temperature gradient, and this is why we see snow on the top of mountains. The stratosphere has an increasing gradient, mainly due to the ozone layer absorbing solar radiation. The mesosphere changes to a decreasing gradient down to the lowest atmospheric temperatures of around -90 degrees Celcius. This is due to the decreasing density of particles available to absorb solar radiation.
Finally, the thermosphere has an increasing temperature gradient which increases to over 1000 degrees Celcius. This increase is due to an increased exposure to the solar radiation.
Density of the atmosphere, or how much mass is in a square meter of air, decreases with altitude exponentially, regardless of temperature. This is due to the decreasing pull of gravity on the air molecules which decreases with height.
The density of the atmosphere at the peak of Mount Everest is 35% of the density of air at sea level, and can be as cold as -50 degrees Celcius.