A magnetic lens is a device for the focusing or deflection of moving charged particles, such as electrons or ions, by use of the magnetic Lorentz force. Its strength can often be varied by usage of electromagnets.
Magnetic lenses are used in diverse applications, from cathode ray tubes over electron microscopy to particle accelerators.