Skip to main content

The Thin Lens Equation, Explained Without the Algebra Panic

How the thin lens equation ties object distance, image distance and focal length together, with magnification, sign conventions, and a worked example.

Published By Li Lei
#optics #physics #lens equation #thin lens #magnification

The Thin Lens Equation, Explained Without the Algebra Panic

Every optics chapter eventually drops the same three letters on you: focal length, object distance, image distance. They are bound together by one short relationship, and once you can read that relationship out loud, most lens problems stop being scary and start being mechanical. This post walks through the thin lens equation, what magnification actually tells you, how to read a real image apart from a virtual one, and the sign convention that quietly decides every answer.

One equation, three quantities

The thin lens equation is:

1/f = 1/do + 1/di

Here f is the focal length of the lens, do is how far the object sits in front of it, and di is how far the image forms behind it. The reciprocals are the part that trips people up, but the idea is simple: the bending power of the lens (1/f) gets split between the object side and the image side. Push the object farther away and 1/do shrinks, so 1/di has to grow to keep the sum fixed, which pulls the image closer to the focal point. Bring the object in close and the opposite happens.

A converging convex lens has a positive focal length. A diverging concave lens has a negative one. That single sign is doing a lot of work, and we will come back to it.

Magnification: sign and size in one number

The image is rarely the same size as the object, and the lens equation has a partner that tells you the difference:

magnification = -di/do

Read it in two halves. The magnitude is the scale factor: an |m| above 1 means the image is enlarged, below 1 means reduced. The sign is the orientation: a negative m means the image is inverted, a positive m means it stays upright. So a magnification of -0.5 is shorthand for "upside down and half the height of the object." If you also know the object height, multiply it by m to get the image height directly. A 4 cm object at m = -0.5 forms a 2 cm tall inverted image, no extra geometry required.

That minus sign in front of di/do is not decoration. It is what makes the orientation fall out of the same numbers that already gave you the size, which is why I find it cleaner than memorizing separate rules for upright and inverted.

A worked example you can trust

Let us run the textbook classic. Take a converging lens with a focal length of 10 cm and place an object 30 cm in front of it. Leave the image distance as the unknown:

1/di = 1/f - 1/do
1/di = 1/10 - 1/30
1/di = 3/30 - 1/30 = 2/30 = 1/15
di = 15 cm

So the image forms 15 cm behind the lens. Now the magnification:

m = -di/do = -15/30 = -0.5

The verdict reads cleanly: a real image (positive di), inverted (negative m), and half the size of the object. That is exactly the inverted, shrunk picture a projector throws when the slide sits well outside the focal length. I have re-derived this exact case more times than I want to admit, usually because I dropped a reciprocal somewhere in 1/10 - 1/30. These days I type the two known numbers into the lens equation calculator, leave the third box blank, and let it confirm the algebra before I trust my own arithmetic — it returns di = 15 cm, m = -0.5, and the real-inverted-reduced label all at once.

Real images versus virtual images

The single most useful habit in optics is reading the sign of the image distance. A positive di means a real image: it forms on the far side of the lens and you can catch it on a screen, like the picture on a projector wall or the sensor in a camera. A negative di means a virtual image: it appears to sit on the same side as the object and cannot be projected. That is what you see through a magnifying glass when the object sits inside the focal length.

Try it. With f = 10 cm and an object at do = 5 cm — closer than the focal length — the equation gives di = -10 cm and m = 2. Negative image distance, positive magnification greater than one: virtual, upright, and twice as large. That is the magnifier in a nutshell, and the negative di is precisely the flag that tells you the image is virtual rather than something you did wrong.

The sign convention that decides everything

Most intro courses use the real-is-positive convention, and this is the rule that quietly determines whether your answer is right or backwards:

  • Converging convex lens: focal length positive (e.g. f = 10 cm).
  • Diverging concave lens: focal length negative (e.g. f = -10 cm).
  • A normal object in front of the lens: object distance positive.
  • Positive di: real image, opposite side, projectable.
  • Negative di: virtual image, same side, not projectable.

A diverging lens always produces a virtual, upright, reduced image no matter where the object is. Feed it f = -10 cm and do = 20 cm and you get di near -6.67 cm with m around 0.33. The most common mistake I see is entering a concave lens as f = 10 instead of f = -10. That one slip flips real to virtual and inverts the orientation, so the entire verdict comes out wrong even though every other number was typed correctly. Sign first, magnitude second.

There is one edge case worth naming: put the object exactly at the focal point (do = f) and the rays leave the lens parallel, meeting only at infinity. There is no finite image distance — the answer is "image at infinity," not a number. That is the principle behind a collimator, and it is why a slide goes out of focus as you nudge it toward the focal plane.

Putting it to work

Once the relationship clicks, the equation runs both directions. Solving for the object distance instead of the image distance is the same algebra: fix the focal length and where the screen sits, leave do blank, and you get the distance that brings the image into focus — handy for setting up a projector throw or a camera's subject distance. If you want to chain a lens result into a larger calculation, the scientific calculator handles the reciprocals and unit math without losing precision.

The takeaway is small but durable: 1/f = 1/do + 1/di plus m = -di/do, read the sign of di for real versus virtual, and respect the focal-length sign convention. Get those three habits down and the rest of the optics chapter is bookkeeping.


Made by Toolora · Updated 2026-06-13