The energy of a photon causing the photoelectric effect is found through formula_2, where formula_3 is Planck's constant, J·s, formula_4 is the frequency of the electromagnetic wave, formula_5 is the kinetic energy of the photoelectron and formula_1 is the work function for the metal. If the photon has a lot of energy, Compton scattering (~ thousands of eV) or pair production (~ millions of eV) may take place.