Thin lens equation and magnification, worked examples
How to use 1/f = 1/do + 1/di and m = -di/do, the sign rules that decide real vs virtual, and worked lens and mirror examples.
Two equations handle nearly every lens and mirror problem in an intro physics course:
- Thin lens equation: 1/f = 1/d_o + 1/d_i
- Magnification: m = h_i / h_o = -d_i / d_o
Here f is the focal length, d_o the object distance, d_i the image distance, and h_o and h_i the object and image heights. The arithmetic is easy. The signs are where the marks go, so start there.
The sign convention
This is the convention OpenStax College Physics uses, and the one most algebra-based courses follow:
- f is positive for a converging (convex) lens and negative for a diverging (concave) lens.
- d_o is positive for a real object, which is every object in an intro course.
- d_i is positive for a real image and negative for a virtual image. For a lens, a real image forms on the opposite side from the object; a virtual image forms on the same side.
- m is negative for an inverted image and positive for an upright one. If |m| > 1 the image is larger than the object; if |m| < 1 it is smaller.
Real images can be projected onto a screen because light actually converges there. Virtual images can't: light only appears to come from them, as with the image you see through a magnifying glass.
A useful rearrangement for solving for the image: d_i = f x d_o / (d_o - f).
Example 1: object beyond 2f (camera)
An object is 30.0 cm from a converging lens with f = 10.0 cm.
- 1/d_i = 1/10.0 - 1/30.0, so d_i = (10.0 x 30.0) / (30.0 - 10.0) = 15.0 cm
- m = -15.0 / 30.0 = -0.500
Positive d_i means a real image; negative m means inverted; |m| = 0.5 means half size. If the object is 2.00 cm tall, h_i = -0.500 x 2.00 = -1.00 cm, which is 1.00 cm tall and upside down. A camera works in this regime: distant object, small real inverted image on the sensor.
Example 2: object between f and 2f (projector)
Same lens, object at 15.0 cm.
- d_i = (10.0 x 15.0) / (15.0 - 10.0) = 30.0 cm
- m = -30.0 / 15.0 = -2.00
Real, inverted and twice the size. A projector puts the slide or display just outside f to throw a large image onto a distant screen. At exactly d_o = 2f = 20.0 cm, d_i is also 20.0 cm and m = -1.00: real, inverted, same size.
Example 3: object inside f (magnifying glass)
Same lens, object at 5.00 cm.
- d_i = (10.0 x 5.00) / (5.00 - 10.0) = 50.0 / -5.00 = -10.0 cm
- m = -(-10.0) / 5.00 = +2.00
Negative d_i means the image is virtual, on the same side as the object. Positive m means upright, and it is twice the size. This is the only case where a single converging lens gives an upright image.
Example 4: object at the focal point
Put the object at 10.0 cm, exactly at f. Then 1/d_i = 1/10.0 - 1/10.0 = 0, and there is no finite d_i. The rays leave the lens parallel and never meet, so the image is said to be at infinity. This is not an error in the problem. It is how a lens makes a parallel beam from a point source, as in a flashlight or searchlight design.
Example 5: diverging lens
A diverging lens has f = -10.0 cm, and the object is at 20.0 cm.
- d_i = (-10.0 x 20.0) / (20.0 - (-10.0)) = -200 / 30.0 = -6.67 cm
- m = -(-6.67) / 20.0 = +0.333
A diverging lens always gives a virtual, upright, reduced image of a real object, whatever the object distance. If your diverging-lens answer comes out real or inverted, recheck the sign of f.
Example 6: solving for the focal length
A lens forms a real image 15.0 cm away from an object placed 30.0 cm away. What is f?
- 1/f = 1/30.0 + 1/15.0, so f = (30.0 x 15.0) / (30.0 + 15.0) = 450 / 45.0 = 10.0 cm
Optometrists quote lens strength as power, P = 1/f with f in meters, in diopters (D). This lens has f = 0.100 m, so P = 1 / 0.100 = 10.0 D. A diverging lens with f = -0.100 m has P = -10.0 D.
Mirrors use the same equation
Spherical mirrors follow the same thin lens equation and magnification formula, with f = R/2, where R is the radius of curvature. The signs change meaning slightly:
- A concave (converging) mirror has positive f; a convex (diverging) mirror has negative f.
- A real image forms in front of the mirror (positive d_i); a virtual image appears behind it (negative d_i).
Example: a concave mirror with R = 40.0 cm has f = 20.0 cm. An object 60.0 cm in front gives d_i = (20.0 x 60.0) / (60.0 - 20.0) = 30.0 cm and m = -30.0 / 60.0 = -0.500: real, inverted, half size, in front of the mirror.
A convex mirror with f = -10.0 cm and an object at 10.0 cm gives d_i = (-10.0 x 10.0) / (10.0 + 10.0) = -5.00 cm and m = +0.500: virtual, upright and reduced. That is why convex mirrors are used for store security and car side mirrors: a wide, smaller, upright view.
Quick summary table (converging lens or concave mirror)
| Object position | Image | Orientation | Size |
|---|---|---|---|
| Beyond 2f | Real | Inverted | Reduced |
| At 2f | Real | Inverted | Same size |
| Between f and 2f | Real | Inverted | Magnified |
| At f | At infinity | - | - |
| Inside f | Virtual | Upright | Magnified |
For a diverging lens or convex mirror, the image is always virtual, upright and reduced.
Common mistakes
- Dropping the negative on f for a diverging lens or convex mirror.
- Forgetting to invert after subtracting reciprocals. 1/d_i = 0.0667 is not d_i = 0.0667 cm.
- Mixing units. Keep every distance in the same unit. Only lens power needs meters.
- Reading a negative d_i as an error. It just means the image is virtual.
Check your work
The thin lens calculator solves for f, d_o or d_i, reports the magnification and image height, and tells you whether the image is real or virtual, upright or inverted. It also flags the object-at-f case. For where optics sits in the course, see what's in College Physics 2. The eye is the biology version of this problem, and vision comes up in the animal physiology units of General Biology II. If you are coming from the first semester, the four kinematic equations and when to use each uses the same "list your knowns, pick the equation" habit, and how to memorize a list, a table, or a formula sheet helps with the summary table above.
Encodr's free College Physics 2 course, including the optics units, is coming soon; the current courses are on the decks page.
Thin Lens Equation Calculator
Solve for f, do or di, get the magnification, and see if the image is real or virtual, upright or inverted.
Try it →Encodr turns this into a habit: study anything in a feed, and it schedules the rest.
Get started free