Lens Equation — 1/f = 1/do + 1/di

The lens equation 1/f = 1/do + 1/di explained: focal length, object and image distances, sign conventions, and a worked example.

What it means

The lens equation links three distances: where the object is, where the image lands, and the lens's focal length. It says a lens of fixed power trades object distance against image distance — move the object closer and the image pushes farther out. The sign convention carries the physics: a positive image distance means a real image you can project on a screen; a negative one means a virtual image on the same side as the object, like a magnifying glass view. Camera autofocus is this equation running in reverse, shifting the lens until the sensor sits exactly at di.

Variables

SymbolNameUnitMeaning
ffFocal lengthm or cmFocal length of the lens (positive for converging)
dodoObject distancem or cmDistance from object to lens
didiImage distancem or cmDistance from lens to image (positive = real image)

Assumptions

  • Thin lens (thickness negligible vs focal length)
  • Paraxial rays — rays close to the optical axis
  • Real-is-positive sign convention

Derivation

Applying Snell's law at each spherical surface of a thin lens and using the small-angle approximation gives the refraction at a single surface; combining two surfaces and taking the thin-lens limit yields 1/f=1/do+1/di1/f = 1/d_o + 1/d_i.

Worked example

Problem

An object sits 30 cm in front of a converging lens of focal length 10 cm. Where does the image form?

Given:

  • do = 30 cm
  • f = 10 cm (converging lens)
  1. Write the lens equation: 1/f=1/do+1/di1/f = 1/d_o + 1/d_i

  2. Rearrange: 1/di=1/f−1/do=1/10−1/301/d_i = 1/f - 1/d_o = 1/10 - 1/30

  3. Common denominator: 1/di=3/30−1/30=2/30=1/151/d_i = 3/30 - 1/30 = 2/30 = 1/15

  4. Invert: di=15 cmd_i = 15\ \mathrm{cm}

di = 15 cm (real image, on the opposite side of the lens)

The image forms 15 cm past the lens — closer than the object, as expected for an object outside the focal point of a converging lens. The magnification m = −di/do = −0.5, so the image is real, inverted and half-sized.