# Why does the speed of sound relate to temperature in increasing altitude?

This graph is very puzzling to me. It is my understanding that the speed of sound relates to the density of the media it travels through. Sound travels faster in water, and even faster in steel. So what is the underlying reason for this relationship between speed of sound and temperature. Perhaps temperature relates to the speed the gas molecules, but I would still expect that the pressure drop and density drop should affect the speed of sound more. AFter all, don't they say you can't hear sound in space because there are too little moleucles. Thanks.

The sound speed squared is given by $(\partial p / \partial \rho)_s$ where $p$ is the pressure, $\rho$ the mass density, and $s$ the entropy. The $s$ outside the parentheses means that entropy should be held constant in taking the derivative. At a first pass, we can ignore this constraint, and just do some dimensional analysis using the ideal gas law, $pV = n R T$, where we can identify $\rho = n M/ V$ where $M$ is the mass of a gas molecule. Roughly then, $(\partial p / \partial \rho)$ is proportional to $T / M$. The density drops out. Of course, we performed this derivative at constant $T$, not constant $s$. Fixing this up will introduce a factor of $\gamma$, the adiabatic index, an order one number which depends on the structure of the gas molecule -- monatomic, diatomic, etc. The density, though, drops out of the sound speed. More details can be found here.