Temperature affects the speed of sound by changing the density of the medium in which a sound wave travels. In most cases, when the temperature of a medium increases so does the speed of sound through that medium.
Sound waves require a medium in order to travel. A medium can be a solid, liquid, or a gas such as air. The speed of sound depends on both the elasticity and density of the medium. When the elasticity increases and density decreases of a medium, sound is allowed to travel faster. Higher temperatures lower the density of a medium, which puts less resistance on the sound waves. For example, sounds travels 1,087 feet per second through air at a temperature of 32 degrees Fahrenheit. At a higher temperature of 68 F, the air density is significantly lower and sound is able to travel at 1,127 feet per second.