The Thin Lens Formula, Ray Diagrams & Sign Convention
If you learn one equation from this whole chapter, learn this one. A magnifying glass, a camera, a projector, your spectacles, the eyepiece of a telescope — every one of them is a thin lens forming an image, and a single relation locates that image every time:
Feed it any two of the object distance , image distance and focal length , and it hands you the third — together with a companion, the magnification , that tells you how big the image is and which way up. It is the workhorse of ray optics, and it is examined harder than almost anything else in the syllabus. But look at that equation again, because it hides the single most examined trap in optics. Two chapters ago, in The Mirror Formula, the relation was — a plus — with magnification . The lens equation is — a minus — with . The sign flips, and the magnification loses its minus, precisely because a lens passes light through to the far side while a mirror bounces it back. Get the two confused and a correct method scores zero: a real lens image comes out on the opposite side (), the exact reverse of a real mirror image (). This page derives the lens equation honestly, from two construction rays and a pair of similar triangles; states the New Cartesian convention in full; drills the cases every board reuses — object beyond the focus (real, inverted) and inside it (the magnifying glass) — and hammers, at every step, the contrast with the mirror that trips up more candidates than any other single point in the chapter.
- The thin lens formula locates the image of any object through a thin lens; the magnification is .
- Note the minus. It is for a lens versus for a mirror, and versus the mirror's — the top exam confusion in the whole chapter.
- New Cartesian signs: real object ; converging lens , diverging ; a real lens image is (far side), the opposite of a real mirror image.
- Two construction rays build every image: one parallel to the axis then through the far focus, one straight through the optical centre undeviated.
- Anchors (converging cm): , (real, inverted); , (virtual, erect — the magnifier). Diverging : , (always virtual, diminished).
- Key idea: one equation, with , locates and classifies every thin-lens image — and its minus sign, opposite the mirror's plus, is the difference students lose most marks on.
The thin lens formula , with magnification , is derived from the two-construction-ray similar triangles and locates and classifies any thin-lens image; its minus sign and positive magnification are the exact opposites of the mirror formula's plus and negative magnification, because a lens transmits light while a mirror reflects it.
Where this lives today
The thin lens formula runs quietly inside almost every optical device you touch. A camera places the sensor at the image distance the equation predicts for a given subject distance ; "focusing" is a motor moving the lens so that is satisfied with landing exactly on the sensor, and for a distant subject that means , which is why a lens is labelled by its focal length. A projector is the same equation run with the object (the slide or LCD panel) just outside the focus, throwing a large real inverted image on the wall — which is why slides go in upside down. The magnifying glass and the jeweller's loupe are the object-inside- regime, a virtual erect enlargement. Your own eye is a lens of variable focal length: the ciliary muscles change so that , fixed at the retina, stays in focus as changes — and spectacles add a second lens whose power nudges the combined focal length back to where a healthy eye's would be. Every autofocus, every zoom, every reading correction is this one relation, solved in real time.
The physical picture
A thin lens does to transmitted light what a curved mirror does to reflected light: it takes the diverging fan of rays from an object point and, if it is a converging lens, folds them back to a single image point on the far side. The lens maker's formula of the last article already told us why — two refracting surfaces, and a focal length built from the glass and the curvatures. This article takes that as given and asks the user's question: put an object here, where does the image go, and what does it look like? You never need to trace the whole fan. Two special rays are enough, because they are the two whose paths you can draw without any calculation. First, a ray leaving the object top parallel to the axis: a converging lens bends it to pass through the far focus . Second, a ray heading straight through the optical centre of the lens: it passes undeviated, because at the centre the two lens faces are parallel, like a thin slab, and a thin slab does not deflect a ray. Wherever these two emergent rays cross is the top of the image; drop a perpendicular to the axis and you have the whole image. The thin lens formula is nothing but the algebra of that crossing, and the derivation below extracts it from the similar triangles the two rays make.
The two working equations
The whole numerical life of a thin lens is two lines. The first locates the image:
where: is the object distance and the image distance, both measured from the optical centre with New Cartesian signs, and is the focal length ( converging, diverging). Read it as a rule for combining reciprocal distances — but note the minus, which is not a typo for the mirror's plus. Rearranged for the usual unknown, , so once you know and the image distance drops out, and its sign tells you the side: for a lens, is a real image on the far side, a virtual image on the near side. The second equation gives the size and orientation:
where: is the object height, the image height, and the magnification — and here there is no minus, unlike the mirror's . It still does the same job: for a real image and , so , correctly flagging the image as inverted; for a virtual image and , so , erect. The magnitude reports the scale — magnified, diminished. Every worked answer ends by reading these two signs back into words, which is exactly what boards mark.
The lens is the mirror's mirror image — literally in the signs
This is the point the whole chapter turns on, so it gets its own table. The New Cartesian convention is identical to the mirror chapters — origin at the optical centre, incident light positive, real object — but the equations are systematically flipped, because reflection returns light to the same side while refraction carries it through to the other:
| quantity | mirror (The Mirror Formula) | thin lens (this article) |
|---|---|---|
| image equation | (plus) | (minus) |
| magnification | ||
| a real image has | (same side, in front) | (far side, opposite) |
| converging element | concave, | convex, |
Memorise the reason, not just the table: light comes back off a mirror, so its real images sit in front (); light goes through a lens, so its real images sit behind (). Everything else follows. If you ever blank on a sign in the exam, reconstruct it from that one physical sentence.
The goal is to prove and for a thin converging lens forming a real image, using only the two construction rays and the similar triangles they make — no calculus, exactly the geometry a ray diagram already draws. As before, we work with plain positive lengths and attach the New Cartesian signs in the final line, which is where the minus that distinguishes the lens from the mirror is born.
Step 1. Set up the two rays. An object of height stands a distance in front of a thin converging lens with optical centre and focal length . From the top draw the two easy rays: one parallel to the axis, which after the lens passes through the far focus (a distance beyond ); and one through , which goes straight on. They meet at , the top of a real image of height at distance beyond the lens.
Step 2. Use the centre ray. It makes the triangles and similar (vertical angles at , both right-angled at the axis). Corresponding sides give — the image is scaled from the object by the ratio of the distances. Call this equation (i).
Step 3. Use the parallel ray. Where it leaves the lens it is at height (it ran parallel at the object's height), and it then descends through to . The little triangle between the lens and (vertical side , horizontal side ) is similar to the triangle between and the image (vertical side , horizontal side ). So . Call this equation (ii).
Step 4. Equate and simplify. Equations (i) and (ii) share the left side, so . Cross-multiply: . Divide every term by and rearrange to .
Step 5. Attach New Cartesian signs. A real object is in front, so , i.e. ; a real lens image is on the far side, so . Substituting : , that is — the minus appears because the real object's distance is negative, the very same mechanism that gave the mirror a plus once its real image was also negative. And from equation (i) with signs, , no minus needed. Test: , gives , cm, — the worked anchor. Verified: the anchor , from , , and the sign structure, are recomputed in verify_hs2-thin-lens-formula.py.
Go deeper · Derivation B · 1 minThe two regimes of a converging lens
The goal is to show, from equation (1) alone, why a converging lens is a projector for an object beyond its focus and a magnifying glass for an object inside it — and why the changeover is a jump from to as the object crosses . This is the single most useful qualitative fact about lenses, and it explains a camera and a hand lens in one stroke.
Step 1. Object beyond the focus, . Then is a small negative number and a larger positive one, so and : a real image on the far side. With and (between and ), cm, magnified and inverted — the projector and the camera live here (the camera at , giving a small ).
Step 2. Object inside the focus, . Now , so and : a virtual image on the same side as the object. With and , cm, and — erect and four times enlarged. This is the magnifying glass: hold a lens closer to the print than its focal length and the letters swell, upright.
Step 3. The changeover. Exactly at (object at the focus), , so : the emergent rays are parallel and no image forms at any finite distance. This is the boundary between the two regimes, and it is why a lensmeter or a collimator places its source exactly at the focus to make a parallel beam.
Step 4. Read the moral. One converging lens is two instruments, split at its focal point: a real-image former for distant things, a virtual magnifier for near things. The diverging lens, by contrast, has no such split — with is negative for every real object, so always: virtual, erect, diminished, no exceptions. Verified: the two regimes (real) and (virtual magnifier), and the diverging-lens always-virtual result, are recomputed in verify_hs2-thin-lens-formula.py.
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| (distant object) | image at the focal plane — the camera and the eye | |
| (object at focus) | emergent rays parallel; no image (the collimator) | |
| converging, object inside | , | virtual, erect, magnified — the magnifying glass |
| converging, object at | , | real, inverted, same size — object and image swap |
| diverging lens, any real object | , | always virtual, erect, diminished |
| (flat glass) | , | no lens: light passes straight through |
Worked examples
Board level — a converging lens at four object positions (CBSE and NEET pattern)
A converging lens has focal length 20 cm. A 5 cm tall object is placed on the axis at (a) 30 cm, (b) 40 cm, (c) 60 cm, and (d) 15 cm in front of the lens. In each case find the image distance, the magnification and the full nature of the image.
Step 1. Fix the signs once: converging, so ; real object throughout, so in every part. Use and .
Step 2. Part (a), : , so and . Nature: real (far side), inverted, magnified — a real, inverted image twice the object's size, so . This is the projector regime, object between and .
Step 3. Part (b), (the object now at ): , so and : real, inverted, same size, at on the far side — the symmetric case, object and image swappable. Part (c), (beyond ): , so , : real, inverted, diminished — the camera regime.
Step 4. Part (d), (now inside the focus): , so and . Now : the image has jumped to the same side as the object — virtual, erect, magnified fourfold. This is the magnifying glass. Watch how the single sign of flipped the entire story as the object crossed the focus, exactly as it did for the concave mirror — but note the numbers are opposite in sign to the mirror's, because a real lens image is , not .
Competitive level — the diverging lens always behaves, and a mirror trap (JEE pattern)
(a) An object is placed 30 cm in front of a diverging lens of focal length 20 cm. Find the image. (b) A student, solving the same numbers for a concave mirror of focal length 20 cm, writes cm. Explain why the lens and mirror answers differ.
Step 1. Diverging lens: , real object . Then , so .
Step 2. Magnification: . Nature: virtual (same side), erect, diminished — and a diverging lens gives exactly this, virtual-erect-diminished, for every real object, just as a convex mirror always does. The image sits 12 cm in front, on the object's side, at of the height.
Step 3. Now the trap in part (b). The mirror uses with the plus. For a concave mirror (concave is ), : , so — not . The student got by accidentally using the lens's minus-equation numbers, or by mishandling the mirror's plus. The lesson: the lens's and the mirror's come from genuinely different equations. Never carry a lens result into a mirror problem or vice versa. Timing note: about 60 seconds for the lens, and the whole point of part (b) is to make you slow down for one second and ask "lens or mirror?" before choosing between the minus and the plus. That one-second check is worth more marks over a paper than any algebra speed. Decide the element first, then pick the equation.
Exam traps
Mirror's plus for a lens. The number-one lost mark in the chapter. A lens is (minus); a mirror is (plus). Choose the element first, then the equation.
Magnification sign. For a lens ; for a mirror . Do not carry the mirror's extra minus into lens work — it will flip every orientation you report.
Which side is a real image. A real lens image is , on the far side from the object; a real mirror image is , on the near side. If your "real image" has the wrong sign, you have crossed the two conventions.
Dropping the object's . A real object is negative for a lens exactly as for a mirror. Forgetting it is the fastest way to a wrong side and a wrong nature.
Not stating the nature. Boards mark "real or virtual, erect or inverted, magnified or diminished". Read it off the signs ( for side, for orientation and size) and write it down.
Board scope — read carefully. The thin lens formula in New Cartesian form is examined by CBSE, ICSE, JEE Main, JEE Advanced and NEET, and by AP Physics 2 (Unit 13) — but AP uses the "real-positive" convention ( both positive for real object and image), so its equation reads ; flag the convention difference and never switch mid-solution. IGCSE 0625 requires the converging-lens ray diagrams and linear magnification but not the signed equation. Among A-Levels, only OxfordAQA International A-Level carries lens imaging; CIE 9702 and current Edexcel IAL do not do lenses at all, so a 9702 student should treat this as enrichment. IB has no lens or mirror image formation at SL or HL. Know your board before you memorise a convention.
Origins · 1 minCarl Friedrich Gauss and how this was discovered
Gauss, often called the prince of mathematicians, gave optics the framework this equation lives in. Already famous for number theory, least squares and the survey of Hanover, he turned late in life to lenses, and in Dioptrische Untersuchungen (1841) he recast image formation in the form still taught today. His insight was that any system of lenses, however complicated, can be replaced for paraxial rays by a set of cardinal points — focal points and principal planes — between which the simple conjugate relation holds exactly. The thin-lens formula on this page is the special case when the lens is thin enough that its two principal planes merge into one. That a pure mathematician produced the working equation of every optician and photographer is a happy accident of physics.
Going further
Texts. NCERT Physics Class 12, Ch. 9 ("Ray Optics and Optical Instruments"), §9.5 "Refraction by a Lens", the thin lens formula and ray diagrams · H. C. Verma, Concepts of Physics Vol. 1, "Geometrical Optics" · Cambridge IGCSE 0625, converging-lens ray diagrams · OxfordAQA International A-Level, lens imaging.
Provenance. Standard paraxial optics, New Cartesian. Recompute (converging cm): , ; , ; , ; , ; image height cm. Diverging : , . Mirror cross-check (concave , ): , distinct from the lens. Limits: ; .
Prerequisites. The Lens Maker's Formula — which builds the this equation uses; Refraction at a Spherical Surface — the surface physics beneath it. Leads to. Lens Power & Magnification, where becomes the dioptre and is developed; and Lenses in Contact & Combination.
Go deeper (UG). The full Gaussian theory — cardinal points, principal planes, thick lenses and the matrix method — is developed in Image Formation and Magnification in the university optics track. It is enrichment; every result here follows from two rays and similar triangles.
Why does the lens formula have a minus where the mirror has a plus?
Because light goes through a lens but bounces back off a mirror, and that reroutes where the real image lands. For a mirror the real image forms in front, on the same negative side as the object, and the algebra collapses to . For a lens the real image forms on the far, positive side, and the same similar-triangle algebra collapses to . The minus is not a convention someone chose to be awkward — it falls out of the derivation the moment you note that a lens's real image has while a mirror's has . Learn the physical sentence "lens transmits, mirror reflects" and you can rebuild either sign on the spot.
How do I remember whether m has a minus?
Tie it to the real-image test, not to rote. For both lens and mirror, a real image must come out inverted, so must be negative for a real image. For a mirror a real image has and (same signs), so to make negative you need the extra minus: . For a lens a real image has and (opposite signs), so is already negative and no extra minus is needed: . The magnification formula carries whatever sign it takes to make a real image inverted — that is the memory hook, and it works both ways round.
What exactly is a "thin" lens, and when does the approximation fail?
A thin lens is one whose thickness is negligible compared with the object distance, the image distance and the focal length, so both refracting surfaces can be treated as sitting at a single plane — the optical centre — through which a central ray passes undeviated. This lets us use one focal length and one origin instead of tracking the small gap between the faces. It fails for a fat lens (a glass sphere, a thick condenser), where the two surfaces are genuinely far apart and you must use the full Gaussian treatment with two principal planes, or trace the light surface by surface as the lens maker's derivation did. For school problems the lens is always thin unless the question says otherwise.
The object is real, so why is u negative?
For the same reason as with a mirror: the New Cartesian convention measures distances from the optical centre and takes the direction of the incident light as positive, and a real object always sits on the incoming side, against that positive direction — so its distance is negative. It is not a property of "objectness"; it is simply that "in front of the lens, where the light comes from" is the negative side. The only way to get a positive object distance is a virtual object — converging light already heading toward a point behind the lens — which you meet only in multi-lens systems, and which the lens-combination article touches on.
Why do the two construction rays work, and are there others?
The two we use are just the two whose paths need no calculation: a ray parallel to the axis must, by the definition of the focus, pass through after the lens; and a ray through the optical centre passes straight, because there the lens is like a thin parallel slab. A third easy ray goes through the near focus and emerges parallel to the axis — you can use any two of the three, and the third is a handy check that they meet at the same point. All other rays from the object top also pass through the image top (that is what "image" means), but their paths require the lens formula to compute, so we do not draw them. Two rays fix a point; the third confirms it.
My AP Physics book writes the lens equation with a plus. Who is right?
Both — you are seeing two conventions for the same physics. AP Physics 2 uses the "real-positive" convention, in which a real object and a real image both take positive distances, and the equation is written with for a converging lens. Indian boards, and this article, use New Cartesian, in which a real object is negative and the equation is . Plug a real object into each with its convention's sign and you get the same physical image location. What you must never do is mix them — a New Cartesian with the AP equation, or vice versa. Pick the convention your exam uses, state it, and stay inside it for the whole problem.