In the SEM, secondary electrons are produced from the surface of the sample or topmost part of the interaction volume; backscattered electrons come from the top half of the interaction volume; and x-rays are generated within the whole of the interaction volume.