A convex lens gathers light to a focus; a concave lens spreads it out. Drag the sliders below to switch the lens type and change the focal length, object distance and object height, watching real and virtual images form via 1/v = 1/f + 1/u.

Concave vs Convex Lens

Trace the three principal rays through a thin lens and watch where they cross to form the image: 1/v = 1/f + 1/u. A convex lens can make real or virtual images depending on where the object sits; a concave lens always makes a small, upright, virtual one.

Image nature
real · inverted · diminished
Image distance v
24.0 cm
Magnification m
-0.60
Image height h'  · power P
-2.40 cm  ·  +6.67 D
Focal length |f|15 cm
Object distance u40 cm
Object height h4.0 cm
Cartesian sign convention: real object u < 0, convex f > 0, concave f < 0 · m = v/u · P = 1/f (metres)

Load a real optical setup

Each button picks the lens type and sets all three sliders to a recognisable piece of optics, then lets the simulator trace the rays. The confirmation line quotes the lab's own readouts, not a stored answer.

Pick a setup above, or drag the sliders yourself.

What Is the Concave vs Convex Lens Simulator?

The concave vs convex lens simulator is a free interactive physics lab that runs in your browser — nothing to install and no sign-up. Change lens type, focal length and object distance and watch real and virtual images form. It reports Image nature, Image distance, Magnification and Image height h' · power as you drag the sliders.

What you can change in the concave vs convex lens simulator
ControlRangeStep
Focal length magnitude5 – 40 cm1
Object distance5 – 60 cm1
Object height1 – 8 cm0.5

How to use the lens simulator

  1. Choose the lens. The Convex (converging) / Concave buttons decide the sign of the focal length. Everything downstream follows from that one choice, so switch back and forth with the sliders held still to see it cleanly.
  2. Set the focal length. Focal length |f| runs from 5 to 40 cm. The readout beside the image height converts it to power in dioptres, P = 1/f, which is how a real prescription is written — 15 cm is +6.67 D, 40 cm is +2.50 D.
  3. Move the object. Object distance u runs from 5 to 60 cm. On a convex lens this is the interesting slider: cross u = f and the image flips from real and inverted to virtual and upright. On a concave lens nothing qualitative happens, which is itself the point.
  4. Set the object height. Object height h (1.0 to 8.0 cm) scales the arrow in the ray diagram and the image height h' readout, but leaves the image distance and magnification alone — those depend only on f and u.
  5. Read the verdict. Image distance v, Magnification m, Image height h' and the plain-English Image nature line update together. Reset returns the lab to a convex lens with f = 15 cm, u = 40 cm and h = 4.0 cm.
Concave convex lens simulator on the slide projector preset: a convex lens of focal length 15 cm with the object 20 cm away throws the image out to 60 cm at a magnification of -3.00, and the nature readout says real, inverted, magnified.
The Slide projector preset. Park the object just outside the focus and the real image runs a long way out — 60 cm for a 15 cm lens — magnified three times and upside down, which is why slides go into a projector the wrong way up.

Worked example: walk the object in towards a convex lens

Keep the lens convex with f = 15 cm and the object 4.0 cm tall, then move only the object-distance slider. Every figure below is the string the simulator itself printed at that position, read back out of the running lab rather than worked out on paper.

What the simulator reports as the object approaches the lens
Step Object distance Image distance Magnification Image height Image nature
Start (Reset) 40 cm 24 cm -0.60 -2.40 cm real · inverted · diminished
Bring it in to 2f 30 cm 30 cm -1.00 -4.00 cm real · inverted · same size
Closer still, just outside f 20 cm 60 cm -3.00 -12.00 cm real · inverted · magnified
Right on the focal point 15 cm infinity infinity infinity image at infinity (rays emerge parallel)
Inside the focal length 8 cm -17.1 cm +2.14 +8.57 cm virtual · upright · magnified
Same lens, made concave 40 cm -10.9 cm +0.27 +1.09 cm virtual · upright · diminished

The sequence is the whole of thin-lens optics in five moves. Rows 1 to 3: as the object comes in from 40 cm to 20 cm the image runs the other way, from 24 cm out to 60 cm, and grows from 0.60 of the object to three times it. Object and image are trading places along the axis. Row 2 is the crossing point: at exactly twice the focal length the image lands at twice the focal length on the far side and the magnification is exactly -1.00, the same size upside down. Inside 2f the image is magnified; outside it, diminished. Row 4 is the boundary: put the object on the focal point and the rays leave parallel, so all three numeric readouts print the word infinity. Row 5 crosses it: one step further in and the image distance is negative — the light no longer converges at all, and the eye sees a virtual, upright, 2.14× image where the rays only appear to originate. That is a magnifying glass, and it works only inside the focal length. Row 6 switches the lens type with nothing else touched: the concave lens turns the same 40 cm object into a virtual image 10.9 cm from the lens at 0.27 of the size.

Object height is the one slider that does not affect the geometry. Move Object height h from 1.0 cm to 8.0 cm at f = 15 cm and u = 30 cm and the lab still reports an image distance of 30 cm and a magnification of -1.00 — only h' changes, from -1.00 cm to -8.00 cm. Where the image forms and how much it is scaled are set by f and u alone; the object's size just rides along.

Formula and symbol reference

The lab solves 1/v = 1/f + 1/u and then m = v/u and h' = m·h. The ranges marked “in this lab” are the simulator's own displayed values at the ends of its control travel.

Symbols, units and working ranges
Symbol Meaning SI unit Typical range
f Focal length — positive for the convex lens, negative for the concave one metre, m 5 to 40 cm in this lab, set as a magnitude by the slider and signed by the lens-type button.
u Object distance from the lens metre, m 5 to 60 cm in this lab.
h Object height metre, m 1.0 to 8.0 cm in this lab, in 0.5 cm steps.
v Image distance. Positive means a real image on the far side, negative a virtual image on the object’s side metre, m the lab has printed values from +5.71 cm (convex, f = 5, u = 40) out to -1560 cm (convex, f = 40, u = 39), and the word “infinity” when u = f exactly.
m Magnification. The sign is the orientation: negative is inverted, positive upright dimensionless ratio -0.14 to +40.00 across this lab’s range.
h' Image height, h' = m·h metre, m +0.31 cm at the diverging extreme up to +160.00 cm at the converging one.
P Lens power, P = 1/f with f in metres dioptre, D (m−1) +20.00 D (convex, f = 5 cm) down to +2.50 D (convex, f = 40 cm), and -2.50 D to -20.00 D for the same concave focal lengths.
Image nature The three-part verdict the lab prints: real or virtual, inverted or upright, magnified, diminished or same size not a unit a convex lens produces all of them; a concave lens prints “virtual · upright · diminished” at every setting the lab allows.

Concave vs Convex Lens: One Gathers, One Spreads

Your two lenses do opposite things to the same rays. A convex lens is converging: it pulls incoming light toward a single focus. A concave lens is diverging: it fans the same light outward. That one difference decides every image you can form. Flip the lens-type toggle and watch the traced rays swing from meeting to splaying apart while the readouts recompute the outcome.

The simulation solves the thin-lens equation in the form it displays, 1/v = 1/f + 1/u, giving the image distance v and the magnification m = v/u. Convex lenses carry a positive f; concave lenses a negative one. Drag Object distance across a convex lens and the image jumps between two lives: a far object yields a real, inverted image that could land on a screen, while an object tucked inside the focal length yields a virtual, upright, magnified one — the magnifying glass in your hand.

A concave lens refuses that drama. Slide the object anywhere and it stays virtual, upright, and diminished, its rays only appearing to diverge from a point you cannot project. Real images meet; virtual ones merely seem to. Only the converging lens can enlarge; the diverging one always shrinks — confirm each rule by reading m as you go. Push the same numbers through the lens and mirror calculator, then open more optics playgrounds.

Concave convex lens simulator on the magnifying glass preset: a convex lens of focal length 15 cm with the object only 8 cm away gives an image distance of -17.1 cm and a magnification of +2.14, and the nature readout says virtual, upright, magnified.
The Magnifying glass preset. Inside the focal length the image distance goes negative: the rays never meet, and the 2.14× upright image you see is on the same side of the lens as the object.
Concave convex lens simulator on the short-sight spectacle preset: a concave lens of focal length 40 cm, a -2.50 dioptre prescription, with the object 60 cm away gives an image distance of -24 cm and a magnification of +0.40, virtual, upright and diminished.
The Short-sight spectacle lens preset, a -2.50 D concave lens. Whatever you do with the object slider, a diverging lens only ever returns a virtual, upright, diminished image — here 0.40 of the object's height.

Frequently asked questions

What is the difference between a concave and a convex lens?

A convex lens is converging: it is thicker in the middle and bends parallel light to a focus. A concave lens is diverging: it is thinner in the middle and spreads light outward. A convex lens has a positive focal length, a concave lens a negative one.

What kind of image does a convex lens form?

It depends on the object distance. An object beyond the focal length gives a real, inverted image that can be projected on a screen. An object inside the focal length gives a virtual, upright, magnified image — the magnifying-glass effect.

What image does a concave lens form?

Always a virtual, upright, diminished image, at any object distance. A diverging lens cannot form a real image of an ordinary object, so it always makes the object look smaller.

What is the difference between a real and a virtual image?

A real image forms where light rays actually meet, so it can be caught on a screen and is inverted. A virtual image forms where rays only appear to come from, so it cannot be projected and is upright.

What happens when the object sits exactly on the focal point?

The rays leave the lens parallel and never meet, so there is no image at any finite distance. Set f = 15 cm and u = 15 cm in the simulator and all three readouts change to the word infinity, with the nature line reading "image at infinity (rays emerge parallel)". This is the boundary between the real-image and virtual-image behaviour of a convex lens.

Where do you put the object to get a same-size image?

At exactly twice the focal length. With f = 15 cm, setting the object distance to 30 cm makes the simulator report an image distance of 30 cm and a magnification of -1.00, described as real, inverted, same size. Object and image sit symmetrically either side of the lens, which is how a 1:1 copying setup is arranged.

What is lens power and why is it in dioptres?

Power is simply the reciprocal of the focal length in metres, so a 15 cm convex lens reads +6.67 D in the simulator and a 40 cm concave lens reads -2.50 D. Dioptres are used because thin lenses in contact add their powers directly, which is far easier than combining focal lengths — and it is why spectacle prescriptions are written in dioptres rather than centimetres.

Why does the magnification go negative?

The sign carries the orientation, not the size. A negative magnification means the image is inverted, a positive one means it is upright. In the lab, m = -3.00 is an image three times the object's height and upside down, while m = +2.14 is a little over twice the height and the right way up.

References & formula source

  • Halliday, Resnick & Walker — Fundamentals of Physics, Chapter 34 (Images).
  • Young & Freedman — University Physics with Modern Physics, §34.4 (Thin Lenses).
  • R. Nave — HyperPhysics, Georgia State University, "Lenses" section.
  • Hecht — Optics, Chapter 5 (Geometrical Optics), thin-lens equation and sign conventions.
  • Further reading: Lens — Wikipedia