The Doppler effect, named after the Austrian physicist Christian Doppler, refers to the change in frequency or wavelength of a wave in relation to an observer who is moving relative to the wave source. This phenomenon is commonly observed with sound waves, but it applies to all types of waves, including light.
To explain it simply: when a sound source moves towards you, the sound waves are compressed, resulting in a higher frequency and a higher pitch—this is why a passing ambulance sounds higher in pitch when it approaches and lower when it moves away. Conversely, when the source moves away from you, the sound waves are stretched, resulting in a lower frequency.
In terms of light waves, the Doppler effect is observed as a shift in color. When a light source moves towards an observer, its light is shifted towards the blue end of the spectrum (blue shift), while moving away results in a shift towards the red end (redshift). This effect has been crucial in astronomy, allowing scientists to determine the movement of stars and galaxies.