Lens and Imaging Studio

Explore sign conventions, magnification, and image orientation by moving distance and focal length.

Loading interactive simulation...

This lens is better than any real piece of glass 🖖

Every ray in this tool obeys 1/f = 1/do + 1/di exactly, so the image lands as a clean point and the focal length is a single number. Real spherical glass does not cooperate. Rays passing near the rim of a spherical surface come to a focus closer than rays near the axis, so a real single lens has no one focal point at all β€” it has a smear of them, an effect called spherical aberration that gets worse as the lens is opened wider. That is why a camera lens is a stack of six to a dozen elements rather than one piece of glass: the extra surfaces exist to cancel each other's errors. The thin-lens equation is what lenses would do if they were perfect, and it is close enough near the axis to be worth learning first.

One focal point decides everything 🖖

This tool rests on a single relationship β€” the thin-lens equation 1/f = 1/do + 1/di β€” yet the whole behaviour hinges on one thing: where the object sits relative to the focal point F. Place it beyond F and a converging lens throws a real, inverted image you could catch on a screen, exactly as a camera or projector does. Slide it inside F and the same lens gives a virtual, upright, magnified image β€” precisely how a magnifying glass works.

A glass lens nearly quits underwater 🖖

A lens bends light only because of the refractive-index contrast at its surfaces, so its power depends on the surrounding medium, not the glass alone. Move a typical n = 1.5 lens from air into water (n = 1.33) and the lensmaker's equation shows its power dropping to about a quarter β€” the focal length you set here would nearly quadruple. The same effect cripples the eye's cornea underwater, which is why a diving mask (restoring an air gap) brings the world back into focus.

THIN LENSES β€” WHERE THE IMAGE LANDS, AND WHETHER A SCREEN CAN CATCH IT

Which Image Case Is Your Object In?

One equation covers every thin lens, 1/f = 1/dβ‚’ + 1/dα΅’, but the character of the answer changes as you slide the object in. The focal point is the switch: outside it a converging lens throws a real, inverted image you can catch on a screen; inside it the same lens becomes a magnifier and the image turns virtual. A diverging lens never gets the choice.

Object beyond 2f β€” real, inverted, smaller dₒ > 2f ⇒ f < dᵢ < 2f
Object at 2f β€” real, inverted, same size dₒ = 2f ⇒ m = −1
Object between f and 2f β€” real, inverted, magnified f < dₒ < 2f ⇒ dᵢ > 2f
Object inside f β€” virtual, upright, magnified dₒ < f ⇒ dᵢ < 0
Diverging lens β€” always virtual, upright, smaller f < 0 ⇒ dᵢ < 0

01

Object beyond 2f β€” real, inverted, smaller

What you know: A converging lens with the object further out than twice the focal length. The image lands between f and 2f on the far side.

Thin lens: dₒ > 2f ⇒ f < dᵢ < 2f

Worked example: f = 10 cm, dβ‚’ = 30 cm β†’ dα΅’ = 15 cm and m = βˆ’dα΅’/dβ‚’ = βˆ’0.5: real, inverted, half size

Open this case: Object beyond 2f
Object beyond 2f β€” real, inverted, smaller. Object outside 2f: the real image forms between f and 2f, upside down and reduced. A converging lens with the object further out than twice the focal length. The image lands between f and 2f on the far side.
Object outside 2f: the real image forms between f and 2f, upside down and reduced.

02

Object at 2f β€” real, inverted, same size

What you know: A converging lens with the object exactly at twice the focal length. Object distance and image distance come out equal.

Thin lens: dₒ = 2f ⇒ m = −1

Worked example: f = 10 cm, dβ‚’ = 20 cm β†’ dα΅’ = 20 cm and m = βˆ’1: real, inverted, exactly life size

Open this case: Object at 2f
Object at 2f β€” real, inverted, same size. Object at 2f: the image sits at 2f on the other side, inverted and the same size. A converging lens with the object exactly at twice the focal length. Object distance and image distance come out equal.
Object at 2f: the image sits at 2f on the other side, inverted and the same size.

03

Object between f and 2f β€” real, inverted, magnified

What you know: A converging lens with the object closer than 2f but still outside the focal point. The image lands beyond 2f.

Thin lens: f < dₒ < 2f ⇒ dᵢ > 2f

Worked example: f = 10 cm, dβ‚’ = 15 cm β†’ dα΅’ = 30 cm and m = βˆ’2: real, inverted, twice as big

Open the 2f case and slide the object to 15 cm
Object between f and 2f β€” real, inverted, magnified. Object between f and 2f: the real image forms beyond 2f, inverted and enlarged. A converging lens with the object closer than 2f but still outside the focal point. The image lands beyond 2f.
Object between f and 2f: the real image forms beyond 2f, inverted and enlarged.

04

Object inside f β€” virtual, upright, magnified

What you know: A converging lens with the object closer than the focal length. dα΅’ comes out negative, meaning the image sits on the same side as the object.

Thin lens: dₒ < f ⇒ dᵢ < 0

Worked example: f = 10 cm, dβ‚’ = 6 cm β†’ dα΅’ = βˆ’15 cm and m = +2.5: virtual, upright, two and a half times bigger

Open this case: Object inside f
Object inside f β€” virtual, upright, magnified. Object inside f: the rays still diverge, and the eye reads a large upright image behind the lens. A converging lens with the object closer than the focal length. dα΅’ comes out negative, meaning the image sits on the same side as the object.
Object inside f: the rays still diverge, and the eye reads a large upright image behind the lens.

05

Diverging lens β€” always virtual, upright, smaller

What you know: A concave lens, so f itself is negative. Wherever you put the object, the answer keeps the same character.

Thin lens: f < 0 ⇒ dᵢ < 0

Worked example: f = βˆ’10 cm, dβ‚’ = 20 cm β†’ dα΅’ = βˆ’6.7 cm and m = +0.33: virtual, upright, a third of the size

Open this case: Concave lens
Diverging lens β€” always virtual, upright, smaller. A diverging lens: the image is virtual, upright and shrunk, always inside the focal point. A concave lens, so f itself is negative. Wherever you put the object, the answer keeps the same character.
A diverging lens: the image is virtual, upright and shrunk, always inside the focal point.
References (2)
  • Insight block 1 β€” why a real lens has a smear of focal points rather than one: M. Born and E. Wolf, Principles of Optics, 7th (expanded) edition, ch. 5. Cambridge University Press, 1999. ISBN 978-0-521-64222-4 β€” the aberrations a thin-lens model leaves out.
  • Insight block 3 β€” the lensmaker's equation, and why the surrounding medium is in it: E. Hecht, Optics, 5th edition, ch. 5. Pearson, 2017. ISBN 978-0-13-397722-6.
Move the object further away and the image gets smaller

The intuition that a more distant object makes a bigger image is backwards. For a thin lens the magnification is m = βˆ’f/(do βˆ’ f), so what sets the size is the gap between the object and the focal point, not the object distance itself. The tool’s own presets show it: with f = 10 cm, the 4 cm object at do = 20 cm gives a 4 cm image, and sliding it out to 30 cm shrinks the image to 2 cm. Move it from 11 cm to 110 cm and the image falls from 40 cm to 0.4 cm β€” a hundredfold, off a lens that never changed.

Problem solved in full

  1. Image of a 4 cm object 30 cm from a converging lens 5 steps

    An object 4 cm tall stands 30 cm from a converging lens of focal length 10 cm. Locate the image β€” and then find the closest a screen can ever be to that object and still catch a sharp one.

    1. The thin-lens equation is all the physics the first half needs. Solve it for the image distance: the reciprocals subtract and 15 cm comes out positive, which is the equation's way of saying the light genuinely converges there.

    2. Magnification is the ratio of the two distances, with a sign convention carrying the orientation. Negative means inverted and a magnitude below 1 means smaller, so the 4 cm object becomes a 2 cm image, upside down β€” and because it is real, a screen at 15 cm would show it.

    3. Now the question the tool will not answer. Write the object-to-image separation as a function of the object distance alone, by substituting the lens equation into dβ‚’ + dα΅’.

    4. Differentiate and set to zero. The condition collapses to (dβ‚’ βˆ’ f)Β² = fΒ², so the turning point sits at dβ‚’ = 2f, where the image distance is 2f as well.

    5. The separation there is 4f = 40 cm, and it is a minimum rather than a maximum: move the object either way and the total grows, running to infinity in both directions.

    Answer

    The tool prints di = 15, m = βˆ’0.5 and an image height of βˆ’2, real and inverted. The result it does not print is the 4f rule: no real image of this object can be formed closer to it than 40 cm, whatever you do with the lens. The present arrangement spans 45 cm, so it is not even the tight one. That constraint is what sizes optical benches, projector throws and camera bodies. You can check it in one click: the preset at dβ‚’ = 20 puts the image at 20 as well β€” at the minimum, object and image distances are equal.

Learning path

Bending light

Example problems

  • Object beyond 2f - Object beyond 2f forms a real inverted reduced image between f and 2f.
  • Object at 2f - Object at 2f forms a real inverted same-size image at 2f.
  • Object inside f - Object inside focal length forms a virtual upright magnified image.
  • Concave lens - Concave lens always forms a virtual upright reduced image.