Thin Lens Equation
1/f = 1/u + 1/v. f is a lens's focal length, u is how far the subject sits from the lens, and v is how far behind the lens the sharp image actually forms — a single equation tying all three together.
It's a deliberate simplification, treating a lens as one infinitely thin element rather than the several real glass elements inside an actual lens — accurate enough for the geometry behind depth of field and hyperfocal distance without needing to model a specific lens design. See the thin lens equation answer page for a worked example and how image distance drives macro extension.
Frequently Asked Questions
Where does this equation actually show up in a real camera?
In the physical distance a lens's elements travel when you turn the focus ring — that movement is the lens changing image distance to keep the equation balanced as subject distance changes, which is also why longer lenses generally need to travel further to focus close than short ones do.
Does the thin lens equation apply the same way to a zoom lens?
The same relationship holds at whatever focal length the zoom is currently set to, though a zoom's actual internal element movement to achieve that focus is considerably more complex than a single prime lens, since multiple element groups shift together rather than one simple element.