Hello, I have a problem with the two seemingly conflicting descriptions of the energy transfer from a photon to an electron I found in my textbook. The first one appears in the description of the photoelectric effect: "In Einstein's picture, an individual photon arriving at the surface [of the material] is absorbed by a single electron. This energy transfer is an all-or-nothing process, in contrast to the continuous transfer of energy in the wave theory of light; the electron gets all of the photon's energy or none at all." I cannot understand how this isn't inconsistent with Compton scattering: "The incident photon would give up part of its energy and momentum to the electron [...].The scattered photon can fly off at a variety of angles with respect to the incident direction, but it has less energy and less momentum than the incident photon." Could anyone explain how these two are not in contradiction? Thanks!