The Lens Equation

One solver for 1/f = 1/do + 1/di, working for both lenses and mirrors. Move the object and watch the image distance, the magnification and the ray diagram answer together.

Image distance  1/f = 1/do + 1/di
24.00 cm
real · inverted · diminished
Magnification  m = -di/do
-0.60
image height -2.40 cm
Element
Mode
Focal length |f|15 cm
Object distance do40 cm
Object height ho4.0 cm
Sign convention
Optical power P = 1/f = 6.67 D · f = +15 cm
Tip: slide the object inwards past the focal point. The image races off to infinity, then returns on the other side as a virtual, upright, magnified one — the magnifying-glass regime.