Electron optics is a mathematical framework for the calculation of electron trajectories in the presence of electromagnetic fields. The term optics is used because magnetic and electrostatic lenses act upon a charged particle beam similarly to optical lenses upon a light beam.