Sub topic 16
Combining two lenses
This chapter assumes you can use the thin-lens equation, 1/f = 1/do + 1/di, and the magnification m = -di/do with the real-is-positive sign convention. Combining lenses adds no new physics. You apply the single-lens rules repeatedly and keep track of where each image lies relative to the next lens.
The core rule
Light passes through the first lens and forms an image. That image sends light on toward the second lens as if it were a physical object. So:
- Find the image from lens 1 using its focal length and the original object distance.
- Treat that image as the object for lens 2. Measure its distance from lens 2, not from lens 1.
- Apply the thin-lens equation again for lens 2.
- Multiply the magnifications: m_total = m1 × m2.
The object distance for lens 2 is
do2 = s - di1
where s is the separation between the lenses and di1 is the image distance from lens 1. This formula holds for every case below, including when di1 is larger than s.
Worked example: a real intermediate image
A converging lens with f1 = 10 cm sits 30 cm from an object. A second converging lens with f2 = 5 cm is 40 cm behind the first.
- Lens 1: 1/di1 = 1/10 - 1/30 = 1/15, so di1 = 15 cm and m1 = -15/30 = -0.5.
- Object for lens 2: d_o2 = 40 - 15 = 25 cm. The intermediate image lies in front of lens 2, so it acts as a real object.
- Lens 2: 1/di2 = 1/5 - 1/25 = 4/25, so di2 = 6.25 cm and m2 = -6.25/25 = -0.25.
- Total: m_total = (-0.5)(-0.25) = +0.125.
The final image is real, 6.25 cm past lens 2, upright relative to the original object, and one eighth of its size. The two inversions cancel.
A function that handles any number of lenses
The code below repeats the procedure for each lens. It measures every position along a single axis, with the object at a negative coordinate and light travelling toward positive values. A lens at coordinate x with object coordinate p has do = x - p, and its image lands at x + di.
def image(f, d_o):
"""Thin lens: returns (d_i, m), or None if the object is at the focal point."""
if d_o == f:
return None
d_i = 1 / (1 / f - 1 / d_o)
return d_i, -d_i / d_o
def trace(lenses, x_object):
"""lenses: list of (focal_length, axis_position), ordered along the axis.
Returns (final_image_position, total_magnification), or None."""
position = x_object
m_total = 1.0
for f, x in lenses:
result = image(f, x - position)
if result is None:
return None # rays leave this lens parallel
d_i, m = result
position = x + d_i
m_total *= m
return position, m_total
# Example from this chapter: object 30 cm before lens 1, lenses 40 cm apart
pos, m = trace([(10, 0), (5, 40)], -30)
print(round(pos, 2), round(m, 3)) # 46.25 0.125The final position of 46.25 is 40 + 6.25, which is 6.25 cm past lens 2. The round calls hide floating-point noise such as 0.12500000000000003.
Virtual objects
If lens 2 sits closer than image 1, then di1 > s and the formula gives a negative do2. Light reaches lens 2 already converging toward a point behind it. That point is a virtual object, and a negative d_o is correct. Do not "fix" the sign.
Place lens 2 (f2 = 5 cm) only 12 cm behind lens 1, with the same object:
- Image 1 is 15 cm past lens 1, so d_o2 = 12 - 15 = -3 cm.
- 1/di2 = 1/5 - 1/(-3) = 1/5 + 1/3 = 8/15, so di2 = 1.875 cm and m2 = -1.875/(-3) = +0.625.
- m_total = (-0.5)(0.625) = -0.3125.
pos, m = trace([(10, 0), (5, 12)], -30)
print(round(pos, 3), round(m, 4)) # 13.875 -0.3125The final image is real and inverted. Lens 2 acts on converging light and pulls the image in to 1.875 cm behind it, closer than its own 5 cm focal length.
Intermediate image on the far side of the focal point
If image 1 lands exactly at the focal point of lens 2, then d_o2 = f2 and the second lens sends out parallel rays. The final image is at infinity, and the code returns None. This is the working principle of a relaxed-eye telescope, covered later in this tutorial.
If the first lens has a virtual image (a diverging lens, or an object inside the focal length), di1 is negative. The same formula still works. Image 1 sits on the object side of lens 1, so do2 = s + |d_i1|, which is larger than s.
Equivalent focal length
Sometimes you want one number describing the pair. For two thin lenses separated by s:
1/f_eq = 1/f1 + 1/f2 - s/(f1 f2)
| Situation | Separation s | Result |
|---|---|---|
| Lenses in contact | 0 | 1/f_eq = 1/f1 + 1/f2 (powers add) |
| Separated pair | s > 0 | Subtract s/(f1 f2) from the sum |
| Afocal pair | f1 + f2 | 1/f_eq = 0, parallel in gives parallel out |
Optical power P = 1/f, measured in diopters (m⁻¹) when f is in metres, is the convenient quantity for lenses in contact. A +2 D lens touching a +3 D lens acts as a +5 D lens, with f = 0.2 m.
Common errors
- Measuring from the wrong lens. di1 is measured from lens 1. do2 must be measured from lens 2. Always subtract.
- Adding magnifications. The total is the product, not the sum. A negative factor flips the orientation, so two negative factors give an upright final image.
- Dropping a negative d_o2. A negative object distance is valid and signals a virtual object. Keep it in the equation.
- Ignoring order. Swapping the lenses generally changes the result, because the image from the first lens sets the object for the second.
- Mixing units. Keep all distances in the same unit before taking reciprocals.
Checking the result
A good habit is to confirm three things after each lens: the sign of di (real or virtual), the sign of m (upright or inverted), and that the next object distance matches the sketch. If the final image distance is huge, check whether do2 is close to f2.
Exercise
A converging lens with f1 = 20 cm is at x = 0 and a converging lens with f2 = 10 cm is at x = 50 cm. An object is 30 cm in front of lens 1. Find the final image position relative to lens 2, the total magnification, and whether the image is real or virtual and upright or inverted.
Show answer
Lens 1: 1/di1 = 1/20 - 1/30 = 1/60, so di1 = 60 cm and m1 = -60/30 = -2. Object for lens 2: do2 = 50 - 60 = -10 cm, a virtual object. Lens 2: 1/di2 = 1/10 - 1/(-10) = 1/5, so d_i2 = 5 cm and m2 = -5/(-10) = +0.5. Total magnification is (-2)(0.5) = -1. The final image is real, 5 cm past lens 2, inverted, and the same size as the object.
Exercise
Two lenses of focal lengths 10 cm and 5 cm are used with separation s = 15 cm. What is 1/f_eq, and what does it mean for rays entering parallel to the axis?
Show answer
1/f_eq = 1/10 + 1/5 - 15/(10 × 5) = 0.1 + 0.2 - 0.3 = 0. The pair is afocal: parallel rays entering leave as parallel rays. This is the telescope arrangement, where the separation equals f1 + f2.