Any medium has its characteristic such as refractive index which affects the characteristics of a wave such as wavelength, velocity etc. Frequency is also a characteristic of a wave. The velocity and wavelength of a wave decrease by a factor μ (refractive index) on passing through a medium but frequency remains unchanged. Hence, it is independent of medium.