The similarity between the Planck-Einstein equation E = hf and the de Broglie equation p = h/λ is no accident. For light they are in fact equivalent equations. Even before the advent of the quantum theory, scientists knew that electromagnetic radiation carries both energy and momentum, and that these quantities are simply related in a propagating wave by the equation,
E = pc .
(We now know this to be the energy-momentum relationship for any massless particle.) The photon equation may therefore be rewritten in terms of photon momentum:
pc = hf .
Since c = f λ for a wave moving at speed c, this equation in turn can be written p = h/λ, identical to the de Broglie equation. This equivalence is true only for photons (or other massless particles). De Broglie’s contribution was the suggestion that the momentum-wavelength relationship should be true for all particles.