Optics

What a lens is doing, and why three rays are enough

A lens bends every ray that reaches it. The construction uses three, because three are all that can be drawn without calculation — and any three that meet prove all the rest do.

Assumes: The bend at the boundary, and what it is really about

A lens does one thing to a ray: it bends it, by an amount that depends on where the ray strikes. That is all. Everything a lens is famous for — projecting, magnifying, focusing, making distant things reachable — follows from that one action applied to every ray at once.

The remarkable part is the at once. Light leaves a single point on an object in every direction, spreading and diverging, and a lens gathers a whole cone of those rays and sends them back to a single point. Every ray that left together arrives together, having taken visibly different routes.

A converging lens making a real image. An object 2.44 focal lengths from a thin converging lens. The image sits where the construction rays cross, at 1.69 focal lengths, magnified -0.69×.
Fig. 1 An object beyond the focal point of a converging lens, and the image formed by three rays traced through it. The image position is computed from the lens equation and the rays are traced to it, so their crossing is a result rather than a drawing decision.

Three rays, and why exactly those

Of the infinitely many rays leaving the arrow’s tip, three can be drawn without solving anything, because for each of them the outgoing direction is known from the definition of the focal point rather than from a calculation.

The parallel ray. A ray that arrives parallel to the axis leaves through the far focus. That is what a focal length is: the distance at which parallel light converges.

The central ray. A ray through the middle of the lens carries straight on. The two faces are parallel there, so the ray emerges displaced but undeviated, and in a thin lens the displacement is negligible.

The focal ray. A ray passing through the near focus emerges parallel to the axis, which is the previous rule run backwards — optics is time-reversible, and every statement about rays has a mirror-image statement obtained by reversing them.

Three rays leave the same point and meet again at another point. That meeting is the image, and the whole construction is a claim that all the other rays meet there too. They do, and the reason is not obvious from the picture: it is a consequence of the specific way a lens’s bending power varies with height, which is engineered — a lens is ground into the shape that makes this true, and shapes that fail to make it true are what aberration means.

A converging lens making a real image. An object 2.00 focal lengths from a thin converging lens. The image sits where the construction rays cross, at 2.00 focal lengths, magnified -1.00×.
Fig. 2 The object at exactly twice the focal length. The image forms at twice the focal length on the other side, the same size and inverted — the one configuration in which object and image are interchangeable.

One equation, and a runaway

The construction can be replaced by arithmetic. With uu the object distance, vv the image distance and ff the focal length,

1u+1v=1f,\frac{1}{u} + \frac{1}{v} = \frac{1}{f},

and the magnification is v/u-v/u, the minus sign carrying the inversion.

Image distance against object distance. Image distance in focal lengths against object distance in focal lengths. At exactly one focal length the image runs off to infinity; inside it the image distance goes negative, which means virtual.
Fig. 3 The same equation as a curve rather than as a construction: image distance against object distance, both in focal lengths. Two features are the whole of what a lens does. At exactly one focal length the image distance runs off to infinity — the rays leave parallel and meet nowhere — and inside that the branch goes negative, which is the arithmetic’s way of saying the image is on the same side as the object and cannot be caught on a screen. Far away on the right the curve flattens towards one: an object at infinity images at the focal plane, which is what a focal length is.

The reciprocals make the behaviour much less intuitive than a linear relation would be, and the interesting region is close to the focus.

Image distance against object distance, both in units of the focal length, is a hyperbola with an asymptote at the focal point — so as the object approaches the focus the image runs away without limit. That runaway is not a defect of the lens; it is the statement that parallel rays meet nowhere, read backwards. The symmetric case, object at two focal lengths and image at two, is the one point on the curve where the two distances are equal.

Far away, 1/u1/u is nearly zero and vfv \approx f: everything distant images at the focal plane, which is why a camera focused at infinity has its sensor exactly one focal length behind the lens, and why focusing on a mountain and focusing on a star are the same adjustment.

Approach the focus and the image distance climbs steeply, through 2f2f when the object is at 2f2f, and then to infinity as the object reaches ff. An object at the focus produces no image anywhere: the rays leave parallel and never meet. That is a projector’s condition run backwards, and a lighthouse’s condition run forwards.

A converging lens making a real image. An object 1.50 focal lengths from a thin converging lens. The image sits where the construction rays cross, at 3.00 focal lengths, magnified -2.00×.
Fig. 4 The object between one and two focal lengths out. The image is further away, larger and still inverted — the projector configuration, and the reason a projector sits at a distance related to the screen size.

Inside the focus, 1/v1/v turns negative. The rays leaving the lens are still diverging, so they never cross, and the image is on the same side as the object, upright and enlarged. Nothing arrives there — the light only appears to come from it — which is what makes it virtual. A magnifying glass held close to a page is a lens used in exactly this regime, and the fact that the image cannot be caught on a screen is the operational difference between a virtual image and a real one.

The same equation for a mirror

The construction was derived from refraction at two curved surfaces, and it ought to be specific to lenses. It is not.

A concave mirror forming a real image obeys character for character the same equation, with the construction rays as reflected analogues of the lens rays. The one thing that shifts is where the landmarks sit: a mirror’s centre of curvature is at twice the focal length, so the symmetric case that was clean for the lens puts the object exactly on that marker here. Same equation, different furniture.

A concave mirror obeys 1/u+1/v=1/f1/u + 1/v = 1/f with ff equal to half the radius of curvature. The rays are different — one reflects off the centre symmetrically, one arrives parallel and leaves through the focus — but the relationship between object, image and focus is identical.

This is not a coincidence and it is not deep. Both devices do the same thing to a wavefront: they add a delay that varies as the square of the distance from the axis, converting a diverging spherical wave into a converging one. A lens does it by making light take longer through the thick middle; a mirror does it by making the middle further away. Anything that imposes that quadratic delay will image, which is why a curved radio dish, a curved acoustic reflector and a zone plate made of nothing but opaque rings all obey the same formula.

Mirrors have one decisive advantage: they have no dispersion, because reflection does not depend on frequency. Every large telescope built since the nineteenth century is a reflector, and chromatic aberration is the reason. Some prism-based instruments get the reflection for free by arranging for the angle to exceed the critical one, which gives a mirror with no coating to tarnish — the reason good binoculars use glass prisms rather than silvered surfaces.

Where the bending actually happens

The construction draws rays kinking at a single plane, which is a convenience rather than a description.

Every ray in every lens diagram is doing one thing twice — refracting on the way in and again on the way out — and the lens equation is what emerges from doing it at two curved surfaces and keeping only the terms linear in the ray’s height. That last step is the whole of the “thin lens” approximation, and it is why the equation has no thickness in it and why a real lens departs from it in exactly the way a cubic term departs from a linear one.

Snell’s law is the only physics present. A ray meeting the front surface bends toward the normal; the normal points in a different direction at every height on a curved surface, so rays at different heights bend by different amounts; and the surface is ground so that the variation is exactly what is needed to bring them back together.

That is why the focal length depends on the index and the curvature and on nothing else, and it is why the lens equation is a geometric consequence rather than a law. Grind a different curve and the arithmetic changes; the physics does not.

What sets the focal length

The lens equation treats ff as given. It comes from the glass and the grinding, through the lensmaker’s equation:

1f=(n1)(1R11R2).\frac{1}{f} = (n - 1)\left(\frac{1}{R_1} - \frac{1}{R_2}\right).

Two things are worth reading out of it. The factor (n1)(n-1) says a lens works because its index differs from its surroundings — and a glass lens in a liquid of matching index is invisible and does nothing, which is a good demonstration and an unnerving one. Underwater, the eye’s own lens loses most of its power for the same reason, since the index difference between cornea and water is far smaller than between cornea and air. A diving mask restores vision by putting air back in front of the eye.

The curvature terms say power adds. Two thin lenses in contact behave as one with 1/f=1/f1+1/f21/f = 1/f_1 + 1/f_2, which is why optometrists work in dioptres — reciprocal focal lengths in metres — and why a prescription can be filled by stacking. It is also the loophole the achromatic doublet exploits: combine two glasses so the powers add to something useful while the dispersions cancel.

What the aperture costs

The construction draws three rays and says nothing about how wide the lens is, which conceals the single most consequential decision in optical design.

A wider lens gathers light in proportion to its area, so doubling the diameter quadruples the brightness of the image — and that is why anybody builds a large one. Every other consequence of doing so is a penalty.

Aberrations grow faster than the aperture does. The paraxial approximation fails at the edge, and it fails as a power: the blur from spherical aberration grows roughly as the cube of the diameter while the image itself grows not at all. A lens twice as wide is eight times worse at the margin, which is why fast lenses are not simply large versions of slow ones but different designs with more elements in them. The element count is the real currency of lens design: each surface adds free parameters — a curvature, a spacing, a choice of glass — and a system can only correct about as many aberrations as it has parameters to spend. A modern fast zoom contains fifteen to twenty elements, almost all of them present to cancel the errors introduced by the few that do the imaging.

Depth of field collapses. A wide aperture makes a steep cone converging on the image point, so a small error in position produces a large blur. The range of object distances rendered acceptably sharp shrinks in inverse proportion to the diameter. Photographers buy this deliberately and microscopists suffer it: at high numerical aperture the focal plane is a fraction of a micron thick, and a specimen thicker than that cannot be in focus at once.

Closing the aperture down does not escape. Narrowing it reduces the aberrations, as intended, and then diffraction takes over. The Airy disc is about 2.44λN2.44\lambda N across, where NN is the ratio of focal length to diameter, so at f/8f/8 in green light the spot is eleven microns wide — larger than the pixels on any modern sensor. The two errors run in opposite directions with aperture, and every lens has a setting where their sum is least. For ordinary photographic lenses it sits near f/5.6f/5.6, which is not a convention but a crossing point between a manufacturing limit and a wave.

That crossing is the honest summary of what a lens is. It is not a device that forms an image; it is a device that trades four incompatible quantities — brightness, sharpness, depth and cost — against each other, and the three-ray construction is a description of the one operation it performs while all four of those are being negotiated.

Throwing away the glass that does nothing

If all the bending happens at the two surfaces, then the material in between is doing nothing optical. It is there to hold the surfaces apart, and it costs weight, cost and absorption in exchange.

Fresnel drew the obvious conclusion in 1822 and built the lens that carries his name: keep the curvature of the surface and discard the bulk behind it, by cutting the lens into concentric annular zones and sliding each one back until it is flat. Every zone keeps the slope it had, so it bends its own rays exactly as before, and the whole thing collapses into a plate a few centimetres thick.

The application it was built for is the one this page has already described from the other direction. A lighthouse puts its lamp at the focus, so the light leaves as a parallel beam — the runaway at the end of the lens equation, used deliberately. Doing that with a solid lens a metre across would mean a piece of glass weighing several tonnes and absorbing much of what it transmitted, and Fresnel’s version does it in a ring of segments that can be turned on a bearing.

What it gives up is exactly what the discarded glass was quietly providing: continuity. The steps between zones are discontinuities, each one scattering a little light and leaving a visible seam, so a Fresnel lens is unusable where image quality matters and ideal where a beam is wanted. That is why they are in lighthouses, overhead projectors and solar concentrators, and never in a camera.

The lens that has no focal length

Gravity bends light, so a mass is a lens — and it is a very bad one, in a way that says precisely what the grinding on this page is for.

A good lens deflects a ray through an angle proportional to its height above the axis. That linear rule is exactly what makes every ray from one point cross at one other point, which is the whole content of the three-ray construction. A point mass does the opposite: the deflection is 4GM/c2b4GM/c^2b, which falls as the ray passes further out.

So there is no focal plane. Rays passing close in are bent sharply and cross the axis early; rays further out are bent gently and cross late; and the crossings smear into a line running away from the mass rather than meeting at a point. For the Sun the near end of that line is around 550 astronomical units out, and the gravitational focus is a region to travel along rather than a place to sit.

The consequences are what makes gravitational lensing recognisable rather than merely magnifying. A source directly behind the mass is imaged as a ring rather than a point — the Einstein ring, which is the axis symmetry doing what a single focus would otherwise do. Slightly off-axis it breaks into arcs and multiple images of one object, sometimes with measurably different arrival times, since the routes have different lengths. Every one of those is a symptom of the same defect: a bending law with the wrong power in it, which is what a lens grinder spends four centuries learning to avoid.

Where the model stops

The thin lens is an idealisation with four separate failures, and every one of them is a whole branch of lens design.

Thin. The model assumes the lens has no thickness, so both refractions happen at one plane. A real lens has two surfaces at a distance, and thick-lens optics replaces the single plane with two principal planes.

Paraxial. Every step assumed small angles — that sinθ\sin\theta could be replaced by θ\theta, which is the same substitution that makes a pendulum simple, fails quadratically in the same way, and is applied here to the sines in Snell’s law specifically. Rays far from the axis strike a spherical surface at angles where the approximation breaks, and they cross the axis nearer the lens than the paraxial rays do. That is spherical aberration, and it is not a manufacturing defect: a perfect sphere has it inherently, which is why fine lenses are ground aspheric.

One wavelength. Covered above, and the reason a cheap lens fringes purple.

Rays at all. The deepest limit. Even a perfect lens cannot focus light to a point, because light is a wave and a converging wave of finite aperture produces a spot of finite size — the Airy disc, whose radius is roughly 1.22λf/D1.22\lambda f/D. That is interference, not imperfection, and no improvement in grinding reduces it. It sets the resolution of every telescope and microscope, it is why bigger apertures see finer detail, and it is the reason optical microscopy stalls at around 200 nanometres.

What an image is, exactly

It is worth being precise about what has been constructed, because the everyday word does a lot of unnoticed work.

An image is a point-to-point correspondence. Each point of the object maps to one point where light from it reconverges. Nothing about the arrangement is picture-like; there is no screen required, no observer, and the light does not know it has formed an image. A real image exists in mid-air whether or not anything is there to catch it, and putting a hand into the space where a projector’s image forms proves it, brightly.

That correspondence is what the eye and the camera both need, and it is why the retina and the sensor sit where they do — one focal length back for a distant object, and further for a near one. It is also why an out-of-focus photograph is not a blurred picture of the object but a perfectly sharp record of a failed correspondence: each object point has spread into a disc, and every disc has been added together. Deconvolution can sometimes undo it, precisely because what happened was a definite mathematical operation rather than a loss of information.

Four centuries of grinding before the theory

Spectacles were being made in northern Italy by the 1280s. The telescope appeared in the Netherlands in 1608, and Galileo had built his own and turned it on Jupiter within a year. The first theoretical account of why any of it worked — Kepler’s Dioptrice — came in 1611, and it was written without the law of refraction, which Snell did not state until 1621 and Descartes did not publish until 1637.

So the instruments came first by three hundred years, and they came from a craft tradition that proceeded by grinding until the image looked right. That is worth remembering when a diagram like the one above is presented as the explanation of a lens. The diagram is a compression of what the craftsmen already knew how to do.

The most instructive episode came later, and it turned on a mistake by the most careful person available. Newton examined the dispersion of the glasses he had and concluded that the spread of colours was proportional to the bending, for every material — from which it follows that a lens correcting one cannot help but keep the other, and that a colour-free refracting telescope is impossible. He built a reflector instead, and the argument stood for sixty years.

It was wrong, and wrong in a way that could only be found by measuring more glasses. Chester Moore Hall paired crown with flint in the 1730s and got an achromatic doublet; John Dollond repeated the work and patented it in 1758. The dispersions of the two glasses differ in a different proportion from their refractions, so the powers can be made to add while the colour spread subtracts. Newton’s error was not a slip of reasoning but a generalisation from an inadequate sample, which is the kind that survives longest — it is protected by the reputation of the person who made it.

The ladder from here

The next rung is the aberration a perfect sphere cannot avoid, traced ray by ray rather than assumed away. After it: the lensmaker’s equation derived from refraction at two spherical surfaces. Thick lenses and principal planes. The remaining Seidel aberrations and what each does to a star image. The achromat and the apochromat. The eye as an optical instrument, with a variable-focus lens and a fixed image distance — the opposite arrangement to a camera. Telescopes and microscopes as two-lens systems, and angular magnification as the quantity that matters when the object cannot be moved. And the Fourier-optics view, in which a lens performs a mathematical transform and the focal plane holds the spatial frequencies of the object.

The diffraction limit taken seriously belongs to where rays stop being enough, the rung at which this anchor meets the interference anchor and the ray picture is retired rather than repaired.

Part 1 of 6

This essay is one argument about Imaging. The others:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down.

What this makes readable

Essays that declare this one a prerequisite.

The objects named here

The third axis, after the field and the reading path: the things themselves, and every essay that touches each one.

AberrationFocal lengthMagnificationThe paraxial approximationReal and virtual imagesThin lens equation