In optics, a relay lens is a lens or lens group that inverts an image and extends the optical tube. Relay lenses are found in refracting telescopes, endoscopes and periscopes for the purpose of extending the length of the system, and before eyepieces for the purpose of inverting an image. They may be made of one or more conventional lenses or achromatic doublets, or a long cylindrical gradient-index of refraction lens (a GRIN lens).
Relay lenses operate by producing intermediate planes of focus. For example, an objective lens such as a SLR lens produces an image plane where the image sensor would usually go. If you place another lens with focal length f at the distance 2f from that image plane and then put an image sensor at 2f beyond that lens, that lens will relay the first image to the second image with 1:1 magnification (see thin lens formula showing that with object distance from the lens, the image distance from the lens is calculated to ). Ideally, this second image is the mirror image of the first image, so you could put an image sensor there and record the mirrored first image. If a longer distance is needed, this can be repeated. In practice, the lens will be an achromatic doublet.
In modern telescopes with a dual focal plane design, the relay lenses are sometimes collectively called the erector lenses as they are responsible for re-inverting the inverted image from the objective lenses into an upright end projection out of the ocular lenses, in keeping with the actual target being observed.
Also, for endoscope applications, where small tube diameter is desirable, most of the tube is filled with glass, with thin air gaps to allow for powered surfaces; because marginal ray angle is smaller at a given numerical aperture the higher the index of refraction, this allows the relay to have higher NA for a given diameter. These are known as Hopkins rod lenses.
- Lautemann, Kerstin; Leonhard, Martin; Stern, Regina; Heda, Jennifer (2014). "Chapter 264: Instrumentation for Arthroscopy and Sports Medicine". In Doral, M.N.; Karlsson, J. (eds.). Sports Injuries : Prevention, Diagnosis, Treatment and Rehabilitation (2nd ed.). Berlin: Springer Berlin. pp. 3273–3291. ISBN 978-3-642-36568-3.
- Lens erecting systems.
- Image erecting systems 
- Erecting Eyepiece 
- Endoscope