How do photons know they can or can't excite electrons in atoms?

If you take an isolated hydrogen atom then the electron sits in well defined atomic orbitals that are eigenfunctions of the Schrodinger equation. This is a stable system that doesn't change with time.

If you now introduce an oscillating electromagnetic field (i.e. light) then this changes the potential term in the Schrodinger equation and the hydrogen atomic orbitals are no longer eigenfunctions of Schrodinger equation. So the electron can no longer be described as a $1s$ or $2s$ or whatever orbital, but rather the electron and the photon now have a single time dependant wavefunction that describes both. What happens next depends on how this new wavefunction evolves with time. As the photon moves away we expect the new wavefunction to evolve into one of three possible final states:

  1. the electron orbital is unchanged

  2. the electron in a different atomic orbital (i.e. it's been excited) and no photon

  3. the electron in a different atomic orbital (i.e. it's been excited) and a photon with a different energy

You can't predict which will happen, but you can calculate the probability of the three final states. What you find is that the probability of (2) is only high when the photon energy is the same as the energy spacing between atomic orbitals, the probability of (1) approaches unity when the photon energy doesn't match an energy spacing in the atom, and the probability of (3) is generally negligable.

So the photon doesn't need to know whether or not it has the correct energy. The photon and atom interact to form a single system, and this evolves with time in accordance with Schrodinger's equation.


Transparent media are transparent because the incoming photon does not match any of the available energy levels to transfer its energy to the atom, or molecule, or crystal.

A classical analogy is thinking of energy levels as various size sieve holes which allow only certain size of particles to go through. Not any matter of knowing or adjusting, but inherent size of the sieve holes.

The energy levels, that the electrons abide in when attached to matter, are specific and defined by the potentials entering the problem. If the photon has the correct frequency, it will interact with the atom/molecule/lattice and the energy it carries will be absorbed by the atom/molecule/lattice and the electron will either be ejected or just go to a higher level of energy and falling back give up a new photon.

The energy is not given up continuously but with the correct quantum increments defined by the matter it hits.

There do exist free electrons and they do interact with photons. In this case a photon may lose its energy in a non quantized manner, increasing the energy of the electron and becoming a photon of lower energy. That is another story.