The Lens Equation
With a ruler, a pencil and the three special rays you can already draw the image a
converging lens makes — where it lands, which way up it is, roughly how big. But "roughly" is not
enough to build a camera, grind a pair of spectacles, or design a telescope. An optician does not
sketch a ray diagram for your eyes; they write down a number. This page turns the
picture into arithmetic: one small equation that pins down the image exactly.
You already know the geometry from
ray diagrams and image formation:
a converging lens of focal length f, an object a distance
u in front of it, and an image a distance v
on the far side. Those three lengths are not free — they are locked together by the
thin-lens equation.
The thin-lens equation
Trace the two easy rays for an object at a general distance and work out where they cross (it is a
short exercise with similar triangles). The crossing point always obeys one relation between the
object distance u, the image distance v and
the focal length f:
\dfrac{1}{f} = \dfrac{1}{v} + \dfrac{1}{u}
- u is the object distance — object to lens.
- v is the image distance — lens to image.
- f is the focal length of the lens.
- All three distances are measured from the centre of the (thin) lens.
An equation with signed quantities needs a rule for the signs, and any consistent rule will do so
long as you never mix two. Throughout this page we use the "real-is-positive"
convention, the one used most in A-level work:
- A real object and a real image have positive
distances (u > 0, v > 0).
- A virtual image — one on the same side as the object — has a
negative image distance (v < 0).
- A converging lens has positive
f; a diverging lens has negative
f.
So the whole story of real-versus-virtual is told by the sign of
v that drops out of the equation: work out
v, and its sign tells you which kind of image you have — no separate
ray diagram needed.
Worked example 1 — an object beyond the focus
A converging lens has focal length f = 10\ \text{cm}. A candle stands
u = 30\ \text{cm} in front of it. Where is the image?
Step 1 — write the equation and put in the numbers.
\frac{1}{v} = \frac{1}{f} - \frac{1}{u} = \frac{1}{10} - \frac{1}{30}.
Step 2 — combine the fractions. Over a common denominator of
30,
\frac{1}{v} = \frac{3}{30} - \frac{1}{30} = \frac{2}{30} = \frac{1}{15}.
Step 3 — invert.
v = 15\ \text{cm}.
v is positive, so the image is real —
it forms 15\ \text{cm} beyond the lens on the far side, where you could
catch it on a screen. Because v < u it is smaller than
the candle, and (as always for a real image from a single lens) inverted. This is
exactly the camera photographing a distant scene.
Worked example 2 — inside the focus: a virtual image
Same lens, f = 10\ \text{cm}, but now push the object inside
the focal length: u = 6\ \text{cm}. This is how you hold a magnifying
glass.
\frac{1}{v} = \frac{1}{10} - \frac{1}{6} = \frac{3}{30} - \frac{5}{30} = -\frac{2}{30} = -\frac{1}{15},
so
v = -15\ \text{cm}.
The equation has handed us a negative v. In the
real-is-positive convention that means the image is virtual: it sits
15\ \text{cm} out on the same side as the object, it is
upright, and — as we are about to compute — it is magnified. No
screen can catch it; you must look through the lens to see it. The maths gave us all of
that from a single minus sign, without drawing a thing.
Magnification
The equation locates the image; the linear magnification
m tells us its size. It compares image height with object height, and —
from the similar triangles of the ray through the lens centre — that ratio also equals the ratio of
the two distances:
m = \dfrac{v}{u} = \dfrac{\text{image height}}{\text{object height}}
- m is a pure ratio, so it has no units.
- m > 1: the image is enlarged;
m < 1: diminished.
- Use the magnitudes of u and
v for the size; the sign of v separately
flags real/inverted (v > 0) from virtual/upright
(v < 0).
Back to Example 1 (u = 30,
v = 15):
m = \frac{v}{u} = \frac{15}{30} = 0.5,
so a 4\ \text{cm} candle makes a
4 \times 0.5 = 2\ \text{cm} image — half height, inverted, real.
And Example 2 (u = 6,
|v| = 15):
m = \frac{|v|}{u} = \frac{15}{6} = 2.5,
the magnifying glass makes everything 2.5\times taller — enlarged,
upright, virtual. Same lens, opposite behaviour, decided entirely by whether the object sat outside
or inside f.
The power of a lens
Opticians and lens-makers rarely quote a focal length. They quote a lens's power,
P — literally how hard the lens bends light. A short focal
length means strong bending, so power is simply the reciprocal of the focal length:
-
Power — with the focal length in metres,
P = \dfrac{1}{f}, measured in dioptres
(\text{D} = \text{m}^{-1}). A converging lens has positive power,
a diverging lens negative power.
-
Lenses in contact add. Two thin lenses pressed together act as one lens whose
power is the sum:
P = P_1 + P_2 (equivalently
\tfrac{1}{f} = \tfrac{1}{f_1} + \tfrac{1}{f_2}).
Getting the metres right. A lens of focal length
f = 20\ \text{cm} = 0.20\ \text{m} has power
P = \frac{1}{0.20} = 5\ \text{D}.
Run it backwards: a 2\ \text{D} lens has
f = 1/2 = 0.5\ \text{m} = 50\ \text{cm} — a gentle, weakly curved lens.
A +10\ \text{D} lens has f = 10\ \text{cm}:
stronger, and visibly fatter.
Worked example 3 — combining lenses (spectacles). A reading lens of
+1.5\ \text{D} is held against a magnifier of
+2.0\ \text{D}. Their combined power is
P = P_1 + P_2 = 1.5 + 2.0 = 3.5\ \text{D},
a single effective lens of focal length
f = 1/3.5 \approx 0.29\ \text{m} \approx 29\ \text{cm}. Stacking a
diverging lens instead subtracts: +3\ \text{D} next to
-1\ \text{D} gives +2\ \text{D}. This adding
of powers is exactly how an optician fine-tunes a prescription.
A diverging lens
For a diverging lens the only new thing is the sign: its focal length is negative.
Take f = -15\ \text{cm} and a real object at
u = 10\ \text{cm}.
\frac{1}{v} = \frac{1}{f} - \frac{1}{u} = \frac{1}{-15} - \frac{1}{10} = -\frac{2}{30} - \frac{3}{30} = -\frac{5}{30} = -\frac{1}{6},
v = -6\ \text{cm}, \qquad m = \frac{|v|}{u} = \frac{6}{10} = 0.6.
v is negative, so the image is virtual,
upright, and with m = 0.6 it is
diminished — closer to the lens than the object. This is always what a diverging
lens does to a real object: a small, upright, virtual image. It is the lens in glasses for short
sight, shrinking the world just enough to bring it into focus.
See the equation move
Here is a converging lens of focal length f = 10\ \text{cm} (the focal
points F and the 2F points are marked). Drag
the object distance u. For every position the image is
placed at v = \dfrac{uf}{u - f} straight from the thin-lens equation, and
the readout shows the live values of u, v and
m = v/u.
Watch the sign of v. Beyond the focus the image is real (solid, inverted,
on the far side) and v is positive; slide the object inside
f and v flips negative — the image jumps to the
object's own side, turns upright, and swells. The picture and the arithmetic tell the exact same
story.
Reading real or virtual straight off v
This is the payoff of the sign convention. Once you have solved the equation you do
not need a ray diagram to classify the image — the number
v already carries the answer:
-
v > 0 → a real image, on the far side of the lens,
inverted, catchable on a screen.
-
v < 0 → a virtual image, on the same side as the
object, upright, seen only by looking through the lens.
A converging lens gives whichever the object asks for — real for
u > f, virtual for u < f. A diverging lens,
with its negative f, always returns
v < 0 for a real object: it can only make a virtual, upright,
diminished image. The equation knows all of this before you have drawn a single ray.
The three traps that quietly wreck lens-equation answers:
-
Pick a sign convention and never drift from it. We use real-is-positive:
converging f > 0, diverging f < 0, and a
virtual image comes out with v < 0. If you forget the minus on a
diverging lens's f, or "fix" a negative v by
making it positive, the answer is simply wrong. Let the signs do their job — a negative
v is the equation telling you the image is virtual.
-
Power is 1/f with f in
METRES. Dioptres are per-metre. A 2\ \text{D} lens has
f = 0.5\ \text{m}, not 0.5\ \text{cm}. Put a
focal length in centimetres straight into P = 1/f and your power comes
out 100\times too big — convert to metres first.
-
It is the thin-lens equation. The whole derivation assumes the lens is
thin enough that u and v can both be
measured from the same central plane. For a fat lens, or two lenses spaced apart, you must handle
each surface (or lens) in turn — the one-line formula no longer applies as written.
That "plus 2.25" is a power in dioptres — the very
P = 1/f on this page. A prescription is just a list of powers: the
sphere value is the basic converging (+) or diverging
(-) power your eye needs, in quarter-dioptre steps because that is about
the smallest change the eye notices. Long-sighted? You are handed a positive (converging) lens; short
sight gets a negative (diverging) one, which is why those glasses shrink your eyes a little to
anyone looking at you — a diminished virtual image, exactly like the diverging example above.
And because powers of lenses in contact simply add, an optician can build any
prescription by combining standard trial lenses, and a bifocal can carry a distance power over most
of the lens with an extra + "reading add" powered in at the bottom.
Meanwhile the reason a strong lens looks fat is the same equation from the other end: more
power means shorter f, and to bend light into a shorter focal length the
glass must be more sharply curved. A +10\ \text{D} lens is a stubby
little dome; a +0.5\ \text{D} lens is almost flat.