James Clerk Maxwell discovered that he could apply his equations for electromagnetism, which had been previously discovered, along with a slight modification to describe self-propagating waves of oscillating electric and magnetic fields.
While the 19th century had seen the success of the wave theory at describing light, it had also witnessed the rise of the atomic theory at describing matter.