Electromagnetic waves, including visible light, radio waves, and X-rays, always travel at the speed of light in a vacuum, denoted by the symbol 'c.' This statement holds true regardless of whether they are moving towards or away from an observer or if their motion is perpendicular to the observer. This behavior arises from the fundamental properties of electromagnetic waves and the theory of special relativity.
The speed of light in a vacuum is considered to be a fundamental constant of nature. According to Maxwell's equations, which describe the behavior of electromagnetic waves, the speed of electromagnetic waves in a vacuum is determined by the electric and magnetic properties of the medium. In the absence of any medium or material, such as in a vacuum, electromagnetic waves propagate at their maximum possible speed, which is the speed of light.
The theory of special relativity, developed by Albert Einstein, further established that the speed of light in a vacuum is the same for all observers, regardless of their relative motion. This theory posits that the laws of physics are invariant under Lorentz transformations, which include time dilation and length contraction at high speeds. As a consequence of this theory, it is impossible for an object with mass to reach or exceed the speed of light, and electromagnetic waves, being massless, always propagate at the speed of light.
When an observer moves relative to a source of electromagnetic waves, the observed frequency and wavelength of the waves may change due to the Doppler effect. However, the speed of light remains constant, and the changes in frequency and wavelength are a result of the relative motion between the observer and the source.
In contrast to electromagnetic waves, sound waves are mechanical waves that require a medium, such as air or water, to propagate. The speed of sound depends on the properties of the medium through which it travels and can vary significantly. Additionally, the motion of the source or observer relative to the medium can affect the perceived speed of sound. These factors contribute to the differences between the behavior of sound waves and electromagnetic waves when it comes to their motion relative to an observer.