Science Academy
☰✕

Convex Lens Ray Diagrams: Real vs Virtual Images

Draw a convex lens ray diagram in three steps, using the lens formula 1/f = 1/u + 1/v to find real and virtual images, with worked examples for each object position.

Convex Lens Ray Diagrams: Real vs Virtual Images: Lenses & Light: Light rays passing through a convex lens and meeting to form an image
The Lenses & Light in 3D: open it and try this yourself, free.
Try it in the Lenses & Light

A convex lens ray diagram shows where a lens forms an image by tracing two rays from the top of an object: one travelling parallel to the axis that bends through the focal point, and one travelling straight through the centre of the lens. Where the two rays cross (or appear to cross) marks the top of the image. Whether that image is real or virtual depends only on how far the object sits from the lens compared with the focal length.

What is a convex lens?

A convex lens is thicker in the middle than at the edges and bends (refracts) parallel light rays inwards so they meet at a point called the focus or principal focus (F). The distance from the centre of the lens to the focus is the focal length (f). Because it brings light together rather than spreading it apart, a convex lens is also called a converging lens.

How to draw a ray diagram

Here's how to draw a ray diagram for a convex lens, in the same three steps every time, whatever the object's position:

  1. Draw the first ray from the top of the object, travelling parallel to the principal axis until it hits the lens, then refracting through the focal point F on the far side.
  2. Draw the second ray from the top of the object straight through the centre of the lens — this ray doesn't bend.
  3. Mark the image where the two rays cross. If they cross on the far side of the lens from the object, the image is real; if they only appear to cross when extended backwards on the same side as the object, the image is virtual.

A third ray — through the near-side focal point and out parallel to the axis — is sometimes added to check the construction, but any two of the three rays are enough to locate the image.

What are real and virtual images?

Real image Virtual image
Formed by Light rays that actually meet Rays that only appear to meet when extended backwards
Can be projected onto a screen? Yes No
Orientation Usually inverted (upside down) Always upright
Where it forms On the opposite side of the lens from the object On the same side as the object
Example A camera or projector image A magnifying glass image

What is the lens formula?

The lens formula links the object distance (u), the image distance (v) and the focal length (f):

1/f = 1/u + 1/v

Using the "real-is-positive" sign convention: distances to real objects and real images are positive, f is positive for a converging (convex) lens, and a negative result for v means the image is virtual.

The magnification formula compares the image height to the object height:

m = v / u (also equal to image height ÷ object height)

A magnification greater than 1 means the image is bigger than the object; between 0 and 1 means it's smaller; a negative sign (in some conventions) marks an inverted image.

Worked example: object beyond 2f

An object sits 30 cm from a convex lens of focal length 10 cm. Where does the image form?

1/f = 1/u + 1/v → 1/10 = 1/30 + 1/v

1/v = 1/10 − 1/30 = 3/30 − 1/30 = 2/30

v = 15 cm

Magnification: m = v/u = 15/30 = 0.5 — the image is real, inverted, and half the size of the object. This is how a camera lens forms a small image of a distant scene onto the sensor.

Worked example: object inside the focal length

A different object sits 5 cm from the same 10 cm focal-length lens.

1/10 = 1/5 + 1/v → 1/v = 1/10 − 2/10 = −1/10

v = −10 cm

The negative sign means the image is virtual, forming 10 cm on the same side as the object. Magnification: m = v/u = −10/5 = −2, so the image is twice the size of the object — this is exactly how a magnifying glass works: hold it closer to an object than its focal length, and you see an enlarged, upright, virtual image.

How does object distance change the image?

Object position Image type Image size Orientation
Beyond 2f Real Smaller than object Inverted
Exactly at 2f Real Same size as object Inverted
Between f and 2f Real Larger than object Inverted
Exactly at f No image forms (rays leave parallel) — —
Inside f Virtual Larger than object Upright

This is why moving an object closer to a convex lens — once it's nearer than the focal length — switches the image from real and inverted to virtual, upright and magnified.

Common mistakes with ray diagrams

  • Forgetting the ray through the centre doesn't bend. It's the easiest ray to get wrong, but it travels in a dead straight line.
  • Drawing the virtual image on the wrong side. A virtual image always forms on the same side of the lens as the object, found by extending the rays backwards with a dashed line.
  • Mixing up signs in the lens formula. With u and f positive for a real object and converging lens, a negative v always means a virtual image — don't force it to be positive.
  • Assuming every convex lens image is inverted. It's only inverted when the object is further away than the focal length; closer than that, the image is upright and virtual.

For how light bends at a boundary rather than through a lens, try the refraction mode in the same tool. For every optics equation in one place, see Physics formulas.

Frequently asked questions

Why does a convex lens form a real image sometimes and a virtual image other times?

It depends on where the object sits relative to the focal length. If the object is further from the lens than the focal length, the refracted rays actually converge on the far side, forming a real image that could be projected onto a screen. If the object is closer than the focal length, the rays spread apart after the lens and never meet — you only see an upright, magnified virtual image by looking back through the lens.

What is the focal length of a lens?

The focal length is the distance from the centre of a lens to the point where parallel rays of light (such as rays from the sun) converge after passing through it. A lens with a short focal length bends light more strongly and is more powerful; a lens with a long focal length bends light gently. It's measured in metres or centimetres and is a fixed property of a particular lens's shape and material.

How is a convex lens different from a concave lens?

A convex lens is thicker in the middle and converges (bends inward) parallel rays to a real focal point, so it can form either real or virtual images depending on object distance. A concave lens is thinner in the middle and diverges (spreads out) parallel rays, so it only ever forms upright, smaller, virtual images, wherever the object is placed. Concave lenses are used to correct short-sightedness; convex lenses are used in magnifying glasses, cameras and to correct long-sightedness.

What does magnification greater than 1 mean?

A magnification greater than 1 means the image is larger than the object — the lens is magnifying it. A magnification between 0 and 1 means the image is smaller than the object, and exactly 1 means the image is the same size. Magnification is calculated as image height divided by object height, or equivalently image distance divided by object distance (v/u).

Try it yourself

Open Lenses & Light, choose the convex lens mode, and drag the object closer to the lens than the focal point, then further away. Watch the image flip between an upright virtual image and an inverted real one, and check the numbers against the lens formula yourself.

See it for yourself, in 3D and free.

Try it in the Lenses & Light