atmosphere
A crescent moon rises over the cusp of the Earth's atmosphere in this picture by Japan Aerospace Exploration Agency astronaut Koichi Wakata onboard the International Space Station taken Feb. 1, 2014. Reuters

This question was originally published on Quora. Answer by Robert Frost.

When curious about why something wouldn't happen, one should ask why something would happen. Why would the atmosphere escape into space? Let's pretend we have Superman's microscopic vision and can see every molecule in the atmosphere. We'd see something like this:

molecules
Let's pretend we have Superman's microscopic vision and can see every molecule in the atmosphere. We'd see something like this. Quora

We would see a chaotic scene - molecules zooming around, bouncing off of each other, the ground, and anything else that gets in their path. Most of our atmosphere (about 78%) is nitrogen. At 25 degrees Celsius (77 F), nitrogen molecules have an average velocity of about 511 m/s (1676 ft/s). Let's imagine that the molecule highlighted by the red square (in our picture) recently bounced off the ground and is moving straight up towards space at 511 m/s (1676 ft/s). Will it stay at that speed? Will it escape? Odds are it will hit another molecule and its trajectory will be altered, but let's pretend it doesn't hit another molecule. What will happen? What does Sir Isaac say? Sir Isaac's First Law of Motion tells us that...

...every object will remain at rest or in uniform motion in a straight line unless compelled to change its state by the action of an external force.

There is only one force acting upon our lone rising molecule - gravity.

gravity
There is only one force acting upon our lone rising molecule - gravity. Quora

With every second, gravity is decelerating our lone molecule by 9.8 m/s^2 (32.2 ft/s^2). So, we can calculate the height the molecule will reach:

height
How to calculate the height a molecule will reach. Quora

Our initial velocity is 511 m/s (1676 ft/s) and our acceleration is -9.8 m/s^2 (-32.2 ft/s^2). That gives a height reached of 13,322.5 m (43,709 ft). Once our molecule reaches that height, its vertical velocity will be zero, and it will begin to fall.

So, how fast would our molecule have to be traveling to escape? There is a concept called escape velocity that determines how fast an unpropelled object will travel with gravity as its decelerant. The idea being that the object will continually slow but gravity will continually weaken as the object gets farther away. At escape velocity, the speed will hit zero at distance infinity.

velocity
At escape velocity, the speed will hit zero at distance infinity. Quora

G is the gravitational constant (6.67E-11), M is the mass of Earth (5.97E24), and r is the radius of Earth (6378100) That gives us an escape velocity of 11,179.365 m/s (36,677.7 ft/s).

Now, remember that our molecules speed of 511 m/s (1676 ft/s) was the average speed of a nitrogen molecule. Some nitrogen molecules are moving slower, which means some are moving faster. A small percentage may actually be moving at or above 11,179.365 m/s (36,677.7 ft/s) and could possible escape (although as we discussed earlier, they are likely to hit other molecules and transfer some of their kinetic energy to those molecules, and slow down).

We've been talking about nitrogen, but it isn't the only gas in our atmosphere. There is an expression of kinetic temperature that can be derived from the ideal gas law:

gas law
There is an expression of kinetic temperature that can be derived from the ideal gas law. Quora

The kinetic energy is proportional to the temperature of the gas. So, if our volume of gas is at a certain temperature, molecules with less mass must have greater (average) velocity to compensate. That tells us that molecules less massive than nitrogen have an average speed greater than the average speed of nitrogen. Hydrogen, for example, has an average speed of 1930 m/s (6,332 ft/s). Still not fast enough for the average molecule to escape, but a small amount will be moving fast enough to escape. And in fact we see that. About 95,000 tons of hydrogen manage to escape our atmosphere each year. But don't get too worried, that's only 0.00000000000017% of the Earth's supply of hydrogen.

Quora
Q&A site Quora. Quora