The thin-lens equation, 1/f = 1/do + 1/di, is one of the most reused formulas in optics — it describes how a single converging or diverging lens forms an image, and with the same Cartesian sign convention, it describes mirrors just as well. This article walks through the equation, the sign rules that make it universal, and how to read the resulting image type from the numbers.
Why One Equation Covers Lenses and Mirrors
The thin-lens equation 1/f = 1/do + 1/di comes from tracing paraxial rays (rays close to and nearly parallel to the optical axis) through a thin lens using similar triangles. The remarkable part is that the exact same relationship — with the same Cartesian real-is-positive sign convention — also describes spherical mirrors, once you treat a mirror's reflected image the same way a lens's refracted image is treated. A converging lens (biconvex) plays the same mathematical role as a concave mirror; a diverging lens (biconcave) plays the same role as a convex mirror. That's why optics textbooks introduce the mirror equation as "the same formula, different hardware" rather than deriving it from scratch a second time.
Reading the Sign Convention
The convention used here — do always positive, f positive for converging elements and negative for diverging ones, di positive for real images and negative for virtual ones — is chosen so a single formula and a single magnification equation (m = −di/do) work in every configuration without special-casing. Object distance do is always positive because a real object is always physically in front of the lens or mirror. Focal length f flips sign between converging (positive) and diverging (negative) elements because a diverging element's focal point is virtual — rays never actually pass through it, they only appear to diverge from it. Image distance di is the variable that does the most work: its sign alone tells you whether the image is real (positive, light rays truly converge there) or virtual (negative, rays only appear to originate there). Get comfortable with this one rule and the rest of geometric optics — telescopes, microscopes, camera lenses, eyeglasses — follows from applying it correctly.
From the Numbers to the Picture
Once you've solved for the unknown distance, magnification m = −di/do tells you everything about what the image looks like without needing a ray diagram. The sign of m gives orientation: negative means inverted (upside-down relative to the object), positive means upright. The magnitude of m gives relative size: |m| greater than 1 means the image is larger than the object, less than 1 means smaller, and exactly 1 means the same size. Combine this with the sign of di and you get all four practically distinct outcomes for a converging lens depending on where the object sits: beyond 2f gives a real, inverted, reduced image (how a camera captures a distant scene onto a small sensor); between f and 2f gives a real, inverted, magnified image (how a slide projector throws a small transparency onto a large screen); inside f gives a virtual, upright, magnified image (how a magnifying glass or a single-lens eyepiece works); and exactly at 2f gives a real, inverted, same-size image, a useful calibration reference.
Where the Thin-Lens Model Breaks Down
This equation assumes an idealized thin lens or mirror: zero thickness, perfect spherical (or parabolic) curvature, and rays confined to the paraxial region close to the optical axis. Real optical elements deviate from this in ways the simple formula doesn't capture — spherical aberration (rays farther from the axis focus at slightly different points), chromatic aberration (different wavelengths of light refract by different amounts through real glass), and coma or astigmatism for off-axis objects. Thick lenses and compound lens systems (like camera zoom lenses or telescope eyepieces) require tracking principal planes rather than a single lens position. For a first-pass estimate of where an image forms and roughly how large it will be, though, the thin-lens equation remains the standard starting point taught in every introductory optics course, and it's exactly correct for an idealized single thin element.