Can a photon have any frequency or only certain specific?

This is a very fundamental question. I apologize for its simplicity. I did searches on the web but could not find a clear explanation.

Whenever I read about the principles of quantum physics, I always come across a statement along the lines of:
"electromagnetic energy could be emitted only in “quantized” form (i.e. restricted to discrete values rather than to a continuous set of values)"

This is my confusion: If a photon could have any frequency, than the packets of energy could have any infinite number of values. Does the quantum theory imply that photons can only have certain frequency and not other?

I would like to have a basic understanding of how the quantization is established.

Feel free to forward me to texts online if you do not feel this question is worthy of your time.

Staff: Mentor

Any frequency is possible and just about all frequencies are routinely observed.

Some particle interactions will only emit photons at particular frequencies, but any complex multi-particle system has so many different ways of producing electromagnetic radiation at so many different frequencies that we observe a continuous spectrum - one way or another, every frequency will be represented.

Staff: Mentor

It can have any since it's the force carrier of electromagnetic fields. However, if it is produced by resorption of an atom it has only certain possible energies / frequencies depending on the atoms electron configuration.

Also, if you want to know how the quantization of the electromagnetic field is established, (at least a low level version used in quantum optics), it's pretty similar to how other classical systems are made quantum mechanical, such as a mass on a spring.

In the quantum treatment of the mass on a spring, when you measure its total energy, you'll find that it comes in some number of discrete lumps of equal size, with the size depending on the frequency of the spring.

In the quantum treatment of the electromagnetic field (say inside a metal box to make things simple) If you break up the total energy of the electromagnetic field inside that box as a sum of the total energies for each frequency, you can find mathematically that at each frequency, the total energy comes in discrete lumps of equal size too. We often call these lumps "photons", though the technical explanation is a bit more subtle.

Long story short, quantum theory tells us that even though the light emitted from a single transition of the hydrogen atom would be a single photon, that photon will not necessarily have a single definite frequency. In fact, if the decay happens very fast, the energy time uncertainty principle tells us that the photon will have to have a relatively broad range of possible frequencies.