Lens & Mirror Ray Diagram
Drag the object and the focal point and watch the principal rays form the image.
Drag the arrow to move the object, drag its tip to change its height, and drag the focal point to change the focal length.
About the Lens & Mirror Ray Diagram
Free ray diagram simulator for converging and diverging lenses and mirrors. Drag the object, change the focal length, and see principal rays, image position, size, and whether it is real or virtual. Built for physics, the lens & mirror ray diagram runs instantly in your browser: change a setting or drag an object and the result updates at once, so you learn by trying things out rather than only reading about them.
Drag the object and the focal point and watch the principal rays form the image. Use it to explore physics ideas at your own pace, then check what you found against the key ideas further down this page.
How to use the Lens & Mirror Ray Diagram
- Use the controls to change Focal length, Object distance, Object height. The simulation reacts instantly.
- Pick an option such as Converging lens, Diverging lens, Concave mirror, Convex mirror to switch modes or load an example.
- Where you see a glowing handle, object, weight or atom, drag it with your mouse or finger. Everything responds in real time.
- Watch the readouts and graphs update as you experiment, and compare what you see with the key ideas below.
Things to try
- Drag the object from far away to inside the focal length and watch the image flip.
- Switch between a converging lens, diverging lens and mirrors.
- Find the object position that gives an image the same size as the object.
- Place the object exactly at the focal point.
Key ideas you can learn
- Thin lens equation: 1/f = 1/do + 1/di.
- Magnification m = −di / do. A negative m means the image is inverted.
- An object inside the focal length of a converging lens gives a virtual, upright, enlarged image.
Where this is used in the real world
Cameras, telescopes, microscopes, glasses and car mirrors all rely on lenses and mirrors forming images.
Who is this simulation for?
Physics students in middle school, high school and first-year university, teachers who want a quick demonstration for the projector, and anyone revising for exams. It works well for flipped classrooms because students can explore before the lesson.
For teachers: project it on the board, let students predict what will happen, then run it together. For students: change one thing at a time and write down what changes.
Frequently asked questions
What is the difference between a real and a virtual image?
A real image is formed where light rays actually meet and can be shown on a screen. A virtual image is where rays only appear to come from, so it cannot be projected.
Where do the principal rays go?
One ray runs parallel to the axis and then passes through the focus. One passes through the centre undeflected. One passes through the near focus and comes out parallel.
Is the Lens & Mirror Ray Diagram free to use?
Yes. It is completely free, with no signup, no download and no ads inside the simulation. It runs in your web browser.
Does the Lens & Mirror Ray Diagram work on a phone or tablet?
Yes. It uses touch as well as the mouse, so you can drag objects with your finger. A larger screen makes the controls easier to see.