All electromagnetic waves have the same velocity in vacuum. The frequency of the electromagnetic wave decided the energy stored in it. Later it was shown using quantum mechanics that these waves are, in fact, packets of waves. The energy of this packet depends on the frequency of the wave. This opened the field of wave â particle duality of matter.