Sub topic 15
The lensmaker's equation
This chapter assumes you know the thin-lens equation, 1/f = 1/do + 1/di, and Snell's law. It also assumes you are comfortable with the paraxial approximation. The earlier chapters used the focal length f as a given number. Here you will see where f comes from: the lens material, the surrounding medium, and the curvature of the two surfaces.
What the equation says
For a thin lens of refractive index nlens in a surrounding medium of index nmedium, the lensmaker's equation is:
1/f = (nlens / nmedium − 1) · (1/R1 − 1/R2)
- R1 is the radius of curvature of the surface the light meets first.
- R2 is the radius of curvature of the surface the light meets second.
- For a lens in air, n_medium = 1 and the equation reduces to 1/f = (n − 1)(1/R1 − 1/R2).
The quantity 1/f is the lens power. It is measured in diopters (D) when f is in meters. The equation shows two separate contributions to power. The factor (nlens / nmedium − 1) comes from the material and the medium. The factor (1/R1 − 1/R2) comes from the shape.
Sign convention for radii
The radii need a sign rule that matches the real-is-positive convention used so far. Light travels left to right.
- R is positive if the center of curvature lies on the outgoing side of the surface (to the right).
- R is negative if the center of curvature lies on the incoming side (to the left).
- A flat surface has R = ∞, so 1/R = 0.
A symmetric biconvex lens therefore has R1 > 0 and R2 < 0. Both terms add: 1/R1 − 1/R2 = 1/|R1| + 1/|R2|. A biconcave lens has R1 < 0 and R2 > 0, which makes the shape factor negative. The result is f < 0, a diverging lens.
Where it comes from
Derive the equation from one refracting surface, then stack two.
- Paraxial refraction at a single spherical surface of radius R, between indices n1 (before) and n2 (after), gives n1/s + n2/s′ = (n2 − n1)/R. Here s is the object distance and s′ the image distance.
- The first surface of the lens forms an intermediate image at s1′. That image is the object for the second surface.
- The lens is thin, so the thickness is negligible. The distance from the intermediate image to the second surface is therefore −s1′.
- Add the two surface equations. The terms in s1′ cancel.
- What remains is n1/s + n1/s′ = (n_lens − n1)(1/R1 − 1/R2). Dividing by n1 and setting the object at infinity gives s′ = f, which is the lensmaker's equation.
The cancellation in step 4 is the reason the thin lens has a single focal length. It also shows that the thin-lens equation is a direct consequence of two paraxial refractions.
Computing focal lengths
import math
def lens_focal_length(n_lens, r1, r2, n_medium=1.0):
"""Thin-lens focal length from the lensmaker's equation.
r1, r2: signed radii (positive if the center of curvature is on the
outgoing side). Use math.inf for a flat surface.
Returns math.inf if the lens has zero power.
"""
power = (n_lens / n_medium - 1) * (1 / r1 - 1 / r2)
if power == 0:
return math.inf
return 1 / power
print(round(lens_focal_length(1.5, 20, -20), 1)) # 20.0 biconvex
print(round(lens_focal_length(1.5, 20, math.inf), 1)) # 40.0 plano-convex
print(round(lens_focal_length(1.5, 20, 50), 1)) # 66.7 meniscus, converging
print(round(lens_focal_length(1.5, -20, 20), 1)) # -20.0 biconcave
print(round(lens_focal_length(1.5, 20, -20, n_medium=1.33), 1)) # 78.2 same biconvex in water
print(lens_focal_length(1.5, 20, -20, n_medium=1.5)) # inf index matchedThe same glass lens has f = 20.0 in air and f ≈ 78.2 in water. The refractive index contrast shrinks, so the surfaces bend light less. When the medium matches the lens index, the power is zero and the lens has no effect.
Common lens shapes
| Shape | R1 | R2 | Shape factor 1/R1 − 1/R2 | Result (n > n_medium) |
|---|---|---|---|---|
| Biconvex | + | − | positive, large | converging |
| Plano-convex | + | ∞ | positive | converging |
| Positive meniscus | + | + (R2 > R1) | small positive | converging |
| Negative meniscus | + | + (R2 < R1) | negative | diverging |
| Plano-concave | ∞ | + | negative | diverging |
| Biconcave | − | + | negative, large | diverging |
A meniscus lens has both surfaces curved in the same direction. Whether it converges or diverges depends on which surface is more strongly curved. The more strongly curved surface (smaller |R|) dominates the shape factor.
Designing a lens
The equation can be solved for a radius. Suppose you want a symmetric biconvex lens with f = 25 cm in glass with n = 1.5. Set R1 = R and R2 = −R. Then 1/f = (n − 1)(2/R), so R = 2(n − 1)f.
n, f = 1.5, 25.0
R = 2 * (n - 1) * f
print(R) # 25.0 cm for each surface
# Check with the lensmaker's equation, then image a 100 cm object.
f_check = 1 / ((n - 1) * (1 / R - 1 / -R))
d_o = 100.0
d_i = 1 / (1 / f_check - 1 / d_o)
print(f_check, round(d_i, 2)) # 25.0 33.33The lens is then used with the thin-lens equation exactly as before. The lensmaker's equation sets f, and the thin-lens equation uses it.
Edge cases and gotchas
- Thin-lens limit. The equation assumes the thickness is much smaller than the radii and the focal length. For a thick lens, f depends on the thickness and the principal planes are no longer at the lens.
- Index depends on wavelength. Because n varies with color, f does too. Blue light usually focuses closer than red light in glass. This is the origin of chromatic aberration, covered in a later chapter.
- Paraxial only. The derivation uses small angles. Rays far from the axis do not meet at the computed focus. This causes spherical aberration.
- Lens in a denser medium. If nlens < nmedium, the material factor is negative. A biconvex shape then diverges light, and a biconcave shape converges it. An air bubble in water behaves this way.
- Orientation does not matter for a thin lens. Flipping a lens end for end swaps and negates the radii, so 1/R1 − 1/R2 stays the same and f is unchanged.
- Zero radius. R = 0 is not a flat surface. Use math.inf for a flat face.
Exercise
A symmetric biconvex lens has radii of curvature 15 cm on both faces and n = 1.5. Find f in air. Then find f when the lens is submerged in a liquid with n = 1.5.
Show answer
In air, R1 = +15 cm and R2 = −15 cm. So 1/f = (1.5 − 1)(1/15 + 1/15) = 0.5 × 0.1333 = 0.0667 cm⁻¹, and f = 15 cm. In the liquid, nlens / nmedium − 1 = 0, so the power is zero and f is infinite. The lens does not bend light at all.
Exercise
A plano-convex lens (n = 1.5, curved radius 20 cm) is turned around so that the flat face meets the light first. Does f change? Show it with the lensmaker's equation.
Show answer
Original orientation: R1 = +20, R2 = ∞, so 1/f = 0.5 × (1/20 − 0) = 0.025 and f = 40 cm. Turned around: R1 = ∞ and R2 = −20, so 1/f = 0.5 × (0 + 1/20) = 0.025 and f = 40 cm. The focal length is unchanged, as expected for a thin lens.