The short answer is that electromagnetic waves are not vibrations of matter. Sound needs air, water, or some other material because it travels by pushing particles around. A water wave needs water for the same reason. An electromagnetic wave is different: it is a moving pattern of electric and magnetic fields, and fields can exist in space even where there is no air or solid material.
That word “medium” can be confusing. In a sound wave, the medium is the stuff being disturbed. Air molecules squeeze together and spread apart, passing the disturbance from one patch of air to the next. Remove the air, and there are no molecules left to pass the sound along. That is why sound does not travel through the vacuum of space.
Electromagnetic waves do not need that chain of bumping particles. A changing electric field can create a changing magnetic field, and a changing magnetic field can create a changing electric field. Once this paired disturbance is moving, the two parts keep feeding the wave forward. It is a bit like a relay race where the electric field hands off to the magnetic field, then the magnetic field hands off back to the electric field.
This is why light from the Sun can cross the empty space between the Sun and Earth. The wave is not riding on hidden air. It is the electric and magnetic fields themselves that are changing and carrying energy. NASA puts visible light, radio waves, microwaves, X-rays, and gamma rays under the same broad idea: electromagnetic energy.
The wave is usually shown with the electric field, the magnetic field, and the direction of travel all at right angles to each other. That picture is simplified, but it gets the main idea across: an electromagnetic wave is not a single thing wiggling up and down. It is a linked pair of fields moving through space together.
So what is “space” doing in this story? It is not a material medium like air. In classical physics, an electromagnetic field is treated as something that can exist in space apart from the charges or currents that first created it. The source can start the disturbance, but after that the field pattern can carry electromagnetic energy outward.
This also explains why a vacuum is not a problem for radio signals, sunlight, or starlight. A vacuum removes matter; it does not remove the possibility of electric and magnetic fields. In fact, textbooks describe electromagnetic waves as self-propagating even in empty space, unlike waves on a string or sound waves in air.
There is a deeper quantum version of the story, where light is described as photons, or packets of electromagnetic energy. For this everyday question, the field picture is enough: electromagnetic waves do not need a material carrier because the changing electric and magnetic fields are the wave.
References
- Anatomy of an Electromagnetic Wave – NASA Science
- 24.2 Production of Electromagnetic Waves – OpenStax
- Electromagnetic radiation – Britannica
- Electromagnetic field – Britannica
- 23.2: Electromagnetic Waves and their Properties – Physics LibreTexts
Explore More
- Why can light travel through space but sound cannot?
- What is an electric field in plain language?
- How did Maxwell predict electromagnetic waves?
- Are photons particles, waves, or both?
- Why does light slow down in glass or water?