The speed of a wave depends on the characteristics of the medium, such as pressure, density, and temperature. The denser the medium, the slower the wave generally travels. More elastic or rigid materials allow waves to travel faster. In some cases, temperature can affect the speed of sound waves in gases and liquids.