Sub topic 11
A consistent sign convention
This chapter assumes you know the law of reflection, Snell's law, the difference between real and virtual images, and what focal length means for mirrors and lenses. You also need to be comfortable solving equations that contain reciprocals.
Why a convention is needed
The mirror equation and the thin-lens equation have the same form:
1/f = 1/do + 1/di
The same equation covers a magnifying glass, a camera lens, a makeup mirror, and a security mirror. It can do that only if the signs of f, do and di carry the geometry. Without a fixed convention, you must choose a separate formula for each case. That is how sign errors get into answers.
This tutorial uses the real-is-positive convention. A quantity is positive when it describes something real, meaning light actually passes through or converges there. It is negative when it describes something virtual.
The rules
| Quantity | Positive when | Negative when |
|---|---|---|
| Object distance d_o | Real object, with light diverging from it toward the optic (almost every case) | Virtual object: light is already converging toward a point beyond the optic |
| Image distance d_i | Real image, formed where light converges | Virtual image, formed where light only appears to diverge from |
| Focal length f | Concave mirror, converging lens | Convex mirror, diverging lens |
| Magnification m | Image is upright relative to the object | Image is inverted relative to the object |
The two key points are:
- For a mirror, a real image is on the same side as the object, since reflected light returns to that side.
- For a lens, a real image is on the opposite side from the object, since light passes through.
You never need to memorize which side is "positive" in space. Ask whether light really reaches the image point. If it does, d_i is positive.
Magnification is defined as m = -di / do. The size of the image is |m| times the size of the object. Because of the minus sign, a real image of a real object has a negative m, so it is inverted. A virtual image of a real object has a positive m, so it is upright.
A worked example in code
The function below applies the equations and then reads the signs, as in the diagram.
def describe(f, d_o):
"""Classify the image formed by a thin lens or spherical mirror."""
if d_o == f:
return "image at infinity"
d_i = 1 / (1 / f - 1 / d_o)
m = -d_i / d_o
kind = "real" if d_i > 0 else "virtual"
orientation = "inverted" if m < 0 else "upright"
if abs(m) > 1:
size = "enlarged"
elif abs(m) < 1:
size = "reduced"
else:
size = "same size"
return round(d_i, 3), round(m, 3), kind, orientation, size
print(describe(10, 30)) # converging lens or concave mirror, object beyond 2f
print(describe(10, 5)) # object inside the focal length
print(describe(-10, 30)) # diverging lens or convex mirrorThe output is:
(15.0, -0.5, 'real', 'inverted', 'reduced')
(-10.0, 2.0, 'virtual', 'upright', 'enlarged')
(-7.5, 0.25, 'virtual', 'upright', 'reduced')These three cases are the ones to know.
- Object beyond the focal point of a positive-f optic. The image is real and inverted. Here d_i = 15, which is positive. Since m = -15/30 = -0.5, the image is half the size of the object.
- Object inside the focal length. Here 1/di = 1/10 - 1/5 = -1/10, so di = -10. The image is virtual. Since m = +2, it is upright and twice as large. This is a magnifying glass, or a concave shaving mirror used up close.
- Negative f. Here 1/di = -1/10 - 1/30 = -4/30, so di = -7.5. For any real object, a diverging optic gives a virtual, upright, reduced image.
The same code serves both mirrors and lenses. A concave mirror with f = 10 behaves in the equation exactly like a converging lens with f = 10. Only the physical location of the image differs, as in the side rule above.
Virtual objects
Negative do is rare, but it occurs in systems of more than one optic. Suppose the first lens would form a real image at some point, but a second lens sits closer than that point. The converging light reaches the second lens before it comes to a focus. For the second lens, the object is "virtual", and do is negative.
def image(f, d_o):
d_i = 1 / (1 / f - 1 / d_o)
return d_i, -d_i / d_o
f1, f2, separation = 10, 5, 10
d_i1, m1 = image(f1, 30) # first lens: 15.0, -0.5
d_o2 = separation - d_i1 # -5.0: image lies beyond lens 2, so virtual object
d_i2, m2 = image(f2, d_o2)
print(round(d_o2, 3), round(d_i2, 3), round(m1 * m2, 3)) # -5.0 2.5 -0.25The first image would form 15 units past the first lens, but the second lens is only 10 units away. The second lens therefore receives converging light, with do2 = -5. The equation gives di2 = +2.5, a real image, and the total magnification is (-0.5)(0.5) = -0.25. The same formula works with no special case. This is the benefit of one convention applied everywhere.
Other conventions
Some textbooks use the Cartesian convention. It measures distances from the optic like coordinates, with positive in the direction of the incoming light. The equation then often appears as 1/v - 1/u = 1/f, with u negative for real objects. The physics is identical, but the signs differ. If you copy a formula from a source that uses a different convention, your answers can come out with the wrong sign or the wrong magnitude.
Common errors
- Using a positive f for a diverging lens or convex mirror. The focal length of these optics is negative. Input it as a negative number.
- Treating the sign of d_i as a direction on the page. In this convention it tells you real or virtual. For a mirror, a real image lies in front of it. For a lens, a real image lies on the far side.
- Dropping the minus sign in m. The formula is m = -di / do. Without the minus sign, real images appear upright.
- Dividing by zero at d_o = f. The reflected or refracted rays are parallel, so the image is at infinity. The code above checks for this case.
- Forgetting that d_o can be negative. In multi-lens problems, a negative d_o means a virtual object, not a mistake.
- Reading a negative m as a smaller image. The sign gives orientation only. The size is given by |m|.
Checking an answer
Before accepting a result, run these checks:
- A real object and a positive-f optic with d_o > f must give a real, inverted image.
- A real object with d_o < f must give a virtual, upright, enlarged image.
- A real object and a negative-f optic must always give a virtual, upright, reduced image.
- For a real object, |d_i| should never be smaller than f in a way the ray diagram contradicts. When in doubt, sketch the principal rays.
If the algebra and the sketch disagree, the sign of f or d_o is usually wrong.
Exercise
A convex mirror has focal length f = -12 cm. An object stands 24 cm in front of it. Find d_i and m, and describe the image.
Show answer
1/di = 1/f - 1/do = -1/12 - 1/24 = -3/24, so di = -8 cm. The image is virtual, 8 cm behind the mirror. The magnification is m = -di/d_o = -(-8)/24 = +1/3. The image is upright and one third the size of the object.
Exercise
A converging lens with f = 10 cm forms an image of an object 30 cm away. A second converging lens with f = 5 cm sits 10 cm behind the first. Find the final image distance from the second lens and the total magnification.
Show answer
First lens: di1 = 15 cm, m1 = -0.5. The separation is 10 cm, so do2 = 10 - 15 = -5 cm (a virtual object). Second lens: 1/di2 = 1/5 - 1/(-5) = 2/5, so di2 = +2.5 cm, a real image on the far side of the second lens. m2 = -2.5/(-5) = +0.5, so the total magnification is (-0.5)(0.5) = -0.25. The final image is real, inverted, and one quarter the size of the object.