The speed of sound is the distance travelled by a point on a sound wave per unit of time. The speed of sound is not a fixed constant but rather, its speed is a changing variable that can be influenced by different factors. The speed of sound changes together with the change in the medium through which it travels. The speed sound has an inverse relationship with the density of the medium. Density is defined as the mass of an object per unit volume. When an object has greater density, sound travels more slowly in comparison to its speed when travelling through an object with lesser density. Similarly, sound travels faster in oxygen than hydrogen because oxygen has a lesser density. The speed of sound has a direct relationship with temperature. As the temperature of an object goes up, the speed of sound increases, too. This change in speed occurs because a higher temperature reduces the density of material and as a result, the speed of sound increases. The speed of sound in a material, particularly in a gas or liquid, varies with temperature because a change in temperature affects the material's density.
This theory is proved in this project where the dry ice is used as a medium to control the temperature while the temperature will control the density of air in the styrofoam. As the temperature increase, it will reduce the density of air in the styrofoam and as a result the speed of sound travelling in the styrofoam increases. This is due to the fact that sound travels by vibrating molecules and passing the energy on to a nearby molecule. Sound travels faster through warm air than cold air because the molecules in the warm air are vibrating faster. Besides, with a higher temperature, more energy is in the air. With more energy, particles are able to vibrate faster, thus increasing the speed of sound. Then, this change in speed is brought about by the difference in spacing between molecules in different temperature. In higher temperature, the molecules are tightly packed due to higher energy in comparison to lower temperature, which has loosely packed molecules. Vibrations occur more easily when molecules are closer together; hence, the speed of sound becomes faster.