Both the scattering and annihilation diagrams contribute to the transition matrix element. By letting k and k' represent the four-momentum of the positron, while letting p and p' represent the four-momentum of the electron, and by using Feynman rules one can show the following diagrams give these matrix elements: