raatools/

Thin Lens Ray Diagram

Interactive ray diagram for converging and diverging lenses. Drag the object to see how the image changes.

FF
200.0
Image Distance
1.00ร—
Magnification
Real
Image Type
Inverted
Orientation

What is the thin lens equation?

The thin lens equation relates the focal length of a lens to the distances of the object and image from the lens: 1/f = 1/do + 1/di, where f is the focal length, do is the object distance, and di is the image distance. This equation governs how converging (convex) and diverging (concave) lenses form images, and is fundamental to understanding cameras, eyeglasses, microscopes, and telescopes.

Magnification is the ratio of image height to object height: M = -di/do. A negative magnification means the image is inverted. Converging lenses can produce both real (inverted, projectable) and virtual (upright, visible only through the lens) images depending on where the object is placed relative to the focal point.

Lens types

  • Converging (convex) lens: Positive focal length. Brings parallel light to a focus. Used in magnifying glasses, cameras, and corrective lenses for farsightedness.
  • Diverging (concave) lens: Negative focal length. Spreads light outward. Used in corrective lenses for nearsightedness and in combination with converging lenses in compound optical systems.

How to use this tool

Enter any two of the three values (focal length, object distance, image distance) and the calculator solves for the third. It also computes the magnification and indicates whether the image is real or virtual, upright or inverted. A ray diagram visualizes how light passes through the lens.

Image formation cases

For a converging lens: when the object is beyond 2f, the image is real, inverted, and smaller. At 2f, the image is real, inverted, and same size. Between f and 2f, the image is real, inverted, and larger. At f, no image forms (rays are parallel). Inside f, the image is virtual, upright, and larger (magnifying glass effect).

Frequently asked questions

What does 'thin lens' mean?

The thin lens approximation assumes the lens thickness is negligible compared to the focal length and object/image distances. This simplifies the math by treating the lens as a single plane. For thick lenses (like a glass ball) or precise optical design, more complex equations using principal planes are needed.

How is the focal length related to lens power?

Lens power (in diopters) is the reciprocal of the focal length in meters: P = 1/f. A lens with f = 0.5m has a power of +2 diopters. Eyeglass prescriptions are written in diopters. Positive values are for converging lenses (farsightedness correction), negative for diverging lenses (nearsightedness correction).