Why is ozone $\rm O_3$ in the Earth's upper atmosphere?

If you look at the density table, you will see that ozone has the highest density among other gases, so why is it in the upper layer of the atmosphere, in the picture I schematically drew how the earth's atmosphere should look in my view.

• IDK, but I can guess: Ozone is created when a lone oxygen atom meets an $\text{O}_2$ molecule. The lone atoms are liberated from $\text{O}_2$ and $\text{O}_3$ molecules when those molecules absorb UV light photons in a certain band of wavelengths. (en.wikipedia.org/wiki/Ozone_layer#Sources). Because that process absorbs UV light, the UV light can only penetrate so far into the atmosphere. Feb 4 at 2:41
• P.S., As for why different gasses in Earth's atmosphere do not settle out into different layers according to their density, see en.wikipedia.org/wiki/Solution_(chemistry)#Gaseous_mixtures Feb 4 at 2:45
• It's a good question, and a quantitative answer that compares the relevant factors would clear things up. But I think your model is incorrect here, where the layers would sit on top of each other. Is there not room for $\rm{N}_2$ molecules between the $\rm{O}_2$ molecules? Unlike liquids, gasses is mostly empty space. Feb 4 at 3:25
• I think you should pursue the link @SolomonSlow suggested. The altitude ozone is produced (mainly ~25 km) and how it is destroyed (or convected to other altitudes) is important. You have to consider detailed transport phenomena between the troposhere-stratosphere and less probably the mesosphere. Feb 4 at 3:27
• See this post: chemistry.stackexchange.com/questions/162605/… Feb 9 at 5:08

There is ozone production at all altitudes, but a majority of it is in the uppermost regions because at these heights, ozone is produced at much higher rates.

Ozone is produced when high enough energy light strikes oxygen molecules O$$_2$$ producing ionic oxygen that will then bond with other oxygen molecules forming ozone O$$_3$$ That is, $$O_2 + {\bf\large\gamma} \rightarrow O + O \\ \rightarrow O+O + 2O_2 \rightarrow2 O_3$$

There is less ozone production at lower altitudes because the once higher energy light at greater altitudes gets scattered on its journey down, loosing energy on the way, so that at lower heights ozone production occurs at a much smaller rate. Also note that the ozone molecule has a short lifetime (from 30 minutes to 2 hours before turning back into oxygen). That is, $$O + O_3\rightarrow 2 O_2$$

• Actually, the lifetime of an ozone molecule is small. The main point is that the rate of production of ozone is highest a high altitudes. Cheers. Feb 4 at 5:43
• @josephh I found your answer enlightening, but, like the OP, I still found myself wondering why the concentration of ozone is highest in the upper atmosphere: Just because that's where most of it is produced does not mean that's where most of it must be located. But your comment about the short lifetime of ozone cleared up that confusion for me. I think the short lifetime info should be included as part of the answer, rather than being relegated to a comment on the answer. Feb 4 at 16:20
• Thanks Mike. I’ll make an edit soon. Cheers. Feb 4 at 18:52
• I am puzzled by the short lifetime statement, given that ozone can be liquified (it is blue) and even solidified (violet, if I remember correctly). The condensed forms are touchy, but it does not just fall apart without provocation. So do you mean the ozone, in the environment where it is generated, has short lifetime? That makes sense, given ozone is a strong oxidizing agent.
– Ed V
Feb 4 at 19:10
• Yes. That is its lifetime in the atmosphere. Feb 4 at 19:13