The frequency of a wave can change in several situations:
Source frequency: If the wave is generated by a moving source, such as a moving object emitting sound or light, the frequency of the wave can change. This phenomenon is known as the Doppler effect. When the source moves toward an observer, the waves get compressed, resulting in a higher perceived frequency (blue shift). Conversely, when the source moves away, the waves get stretched, leading to a lower perceived frequency (red shift).
Observer motion: Similar to the Doppler effect caused by a moving source, the frequency of a wave can also change if the observer is in motion relative to the source. The relative motion between the observer and the source affects the perceived frequency of the wave.
Medium properties: The frequency of a wave can change when it transitions from one medium to another. This phenomenon is called refraction. When a wave passes from a medium with one set of properties (e.g., speed of sound, speed of light) to another medium with different properties, its frequency can change. The change in frequency is accompanied by a change in the wave's speed and wavelength.
Gravitational effects: In the presence of a strong gravitational field, the frequency of a wave can change due to gravitational time dilation. This effect, predicted by Einstein's general theory of relativity, occurs near massive objects such as black holes or neutron stars. The gravitational field can cause a stretching or compression of time, leading to a change in the frequency of waves passing through that region.
It's important to note that for many types of waves, such as electromagnetic waves and gravitational waves, the change in frequency is typically accompanied by a change in wavelength or wave speed, as determined by the wave equation. This relationship between frequency, wavelength, and wave speed is governed by the fundamental properties of the wave and the medium through which it propagates.