Lens Images

Ray diagrams for convex and concave lenses. Drag the object and see how real and virtual images and magnification change. A free physics simulation in your browser (Lens equation, Real and virtual images, Focal point).

How it works and what to look for

1/a + 1/b = 1/f, magnification m = b/a (concave lens: f < 0; virtual image: b < 0)

For a convex lens, a ray parallel to the axis (pink) passes through the far focal point, a ray through the center (yellow) goes straight, and a ray through the near focal point (green) exits parallel. These three meet at an inverted real image. Place the object at 2F and an image of the same size forms at 2F on the other side.

Move the object inside the focal length and the outgoing rays spread without meeting; their extensions (dotted) meet on the object side. That's an upright virtual image — what you see through a magnifying glass.

A concave lens spreads parallel rays as if they came from the near focal point, so it always forms a small upright virtual image regardless of the object's position. The diagram uses the thin-lens approximation, where a ray hitting the lens at height h changes its slope by h/f.

Today's question: How does the image change when an object moves inside the focal length?

  1. Choose a convex lens with focal length 15 cm and object distance 30 cm.
  2. Record image position, orientation, and magnification. Trace the rays.
  3. Change only object distance to 10 cm. Compare image type and orientation.

Read the explanation and model assumptions

An object at 2f forms an inverted real image of equal size at 2f on the opposite side. Inside the focal length, an upright enlarged virtual image forms on the object's side, where the backward ray extensions meet.

This model assumes a thin lens and paraxial rays. An object exactly at the focus has no image at a finite distance. Dashed extensions are not actual light paths.

Everyday examples

Common misconceptions

Misconception: Covering half a lens removes half of the image.
In fact: Every point of the image receives light through the whole lens. Covering half makes the image dimmer, but the whole image remains.
Misconception: A magnifying glass always shows things larger and upright.
In fact: Only objects inside the focal length give an enlarged upright virtual image. Objects beyond it form an inverted image.

Related simulations