The frequency of a wave depends on the source by which the waves are produced. The frequency of a wave is fixed and does not change even when it passes through different substances. However, the speed of sound changes, when it travels from one medium to another. As, v=f×λ, where v is the speed of sound wave, f is the frequency and λ is the wavelength of sound wave. Thus, if speed of sound changes and frequency remains same, then the wavelength must change.