Physics 🔦 Optics & Light

Lenses & Image Formation

Curved glass bends light in predictable ways — learn to trace the rays and you can predict exactly where any image will appear, real or imagined.

High schoolAP Physics 2 level
💡
The big idea: A lens is just a shaped piece of glass that refracts light twice — once entering, once leaving — to redirect rays toward or away from a focal point. Once you know a lens's focal length and where the object sits, the thin-lens equation and a couple of simple ray-tracing rules let you predict the size, orientation, and location of the image every time.
🎯 By the end, you'll be able to
  • Distinguish converging and diverging lenses by their shape and by how each bends parallel light
  • Trace principal rays to locate an image for a lens without doing any math
  • Apply the thin-lens equation 1/f = 1/do + 1/di and the magnification formula to solve for image distance, size, and orientation
  • Explain the difference between real and virtual images and predict which one forms in a given situation
📎 You should already know
  • Refraction and Snell's Law
  • Basic algebra (solving equations with fractions)

Why a curved piece of glass can create a picture

Look through a magnifying glass, a camera, or your own eyeglasses and something remarkable is happening: curved glass is taking the scattered light bouncing off an object and reassembling it into an organized picture — sometimes larger, sometimes smaller, sometimes flipped upside down. None of this is magic. Every ray of light entering the lens obeys the same refraction rule at both surfaces, and that consistency is exactly what lets us predict, with a plain equation, precisely where the image will land.

🔑 Two shapes, two behaviors

A converging (convex) lens is thicker in the middle than at the edges. It bends parallel rays of light inward, so they cross at a single point called the focal point — a real place where light actually meets.

A diverging (concave) lens is thinner in the middle. It bends parallel rays outward, so they spread apart as if they came from a focal point on the same side as the incoming light — light never actually passes through that point.

The distance from the lens to its focal point, on either type, is the focal length, \(f\).

\[ \frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i} \]
The thin-lens equation: relates focal length (f), object distance (d_o), and image distance (d_i). Works for both converging and diverging lenses if you keep signs consistent.
\[ m = -\frac{d_i}{d_o} = \frac{h_i}{h_o} \]
Magnification (m): the ratio of image size to object size. A negative m means the image is inverted; a positive m means it's upright.
🎮 Interactive: Ray Tracing Through a Lens LIVE
Drag the object closer to or farther from the lens and watch the three principal rays locate the image in real time. Try moving the object inside the focal length and watch the image flip from real to virtual.

Three rays are all you need

To locate an image without any arithmetic, trace these three rays from the tip of the object through a converging lens:

  • A ray parallel to the axis bends through the far focal point.
  • A ray through the center of the lens passes straight through, undeflected.
  • A ray through the near focal point emerges parallel to the axis.

Wherever these rays cross (or appear to cross, when extended backward) is where the image forms. For a diverging lens, the same three rays are traced but they bend away from the focal points instead of toward them, so they only ever appear to meet on the object's own side.

✨ Real image vs. virtual image — it's all in the sign of di

When the traced rays actually cross and converge, you get a real image: light energy is genuinely concentrated there, which is why you can catch it on a screen or film. The thin-lens equation gives a positive \(d_i\) for these.

When the rays never actually meet but only look like they're coming from a point (because your eye extends them backward), you get a virtual image — the thin-lens equation gives a negative \(d_i\), and no screen placed there would show anything. The image you see through a magnifying glass held close to a page is virtual.

📝 Worked example: A converging lens has a focal length of 10 cm. An object is placed 15 cm in front of it. Find the image distance and describe the image.
  1. Start from the thin-lens equation: \(\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}\)
  2. Solve for \(\frac{1}{d_i}\): \(\frac{1}{d_i} = \frac{1}{10} - \frac{1}{15} = \frac{3}{30} - \frac{2}{30} = \frac{1}{30}\)
  3. So \(d_i = 30\text{ cm}\). Positive, so the image is real, formed on the opposite side of the lens from the object.
  4. Magnification: \(m = -\frac{d_i}{d_o} = -\frac{30}{15} = -2\)
✓ The image forms 30 cm behind the lens, is real, inverted, and twice the size of the object (m = -2) — this is exactly how a slide/overhead projector behaves: the object (the slide) sits between f and 2f, so the lens throws an enlarged, inverted real image onto a distant screen. (A camera lens does the opposite job — the object is normally far beyond 2f, so the real image it forms is reduced, not enlarged.)
📝 Worked example: The same converging lens (f = 10 cm) now has the object placed only 5 cm away — inside the focal length. Find the image distance and describe the image.
  1. Apply the thin-lens equation: \(\frac{1}{d_i} = \frac{1}{f} - \frac{1}{d_o} = \frac{1}{10} - \frac{1}{5} = \frac{1}{10} - \frac{2}{10} = -\frac{1}{10}\)
  2. So \(d_i = -10\text{ cm}\). The negative sign means the image is virtual, forming on the same side as the object.
  3. Magnification: \(m = -\frac{d_i}{d_o} = -\frac{(-10)}{5} = +2\)
✓ The image is virtual, upright, and twice the size of the object — this is the magnifying-glass case, where the object must sit inside the focal length to get an enlarged, upright view.
⚠️ The trap: assuming every lens image is real and inverted

It's tempting to memorize "lenses flip images upside down" — but that's only true for a converging lens with the object placed beyond the focal length. Move the object inside \(f\) and the image becomes virtual and upright instead. A diverging lens is even more consistent: no matter where you place a real object, it always produces a virtual, upright, reduced image — never a real one. Always check the sign of \(d_i\) rather than assuming.

Check your understanding

1. What is the defining shape of a converging (convex) lens?
A converging lens bulges outward in the middle, which bends parallel rays inward toward a real focal point.
2. A converging lens has a focal length of 15 cm. An object sits 30 cm in front of it. Where does the image form, and what is the magnification?
1/di = 1/15 - 1/30 = 2/30 - 1/30 = 1/30, so di = 30 cm. m = -di/do = -30/30 = -1: real, inverted, and the same size as the object.
3. A diverging (concave) lens is used with a real object placed anywhere in front of it. What kind of image does it always produce?
Diverging lenses spread parallel rays apart rather than focusing them, so the traced rays never actually converge — the image is always virtual, upright, and smaller than the object, regardless of distance.
4. An object is placed exactly at the focal point of a converging lens. What happens to the image?
Plugging do = f into the thin-lens equation gives 1/di = 1/f - 1/f = 0, so di is infinite: the rays leave the lens perfectly parallel and never converge or diverge to a finite point.
✅ Key takeaways
  • Converging lenses bend parallel light inward toward a real focal point; diverging lenses spread it outward from a virtual one, defined by their focal length f.
  • The thin-lens equation 1/f = 1/do + 1/di connects object distance, image distance, and focal length for any lens, converging or diverging.
  • Magnification m = -di/do tells you both the size ratio and the orientation: negative means inverted, positive means upright.
  • A positive di means a real image (light actually converges there, projectable on a screen); a negative di means a virtual image (rays only appear to originate there).