This tool applies the thin-lens equation and draws the matching ray diagram for an ideal lens. It is for students who can quote the image rules but cannot tell whether a result is real, virtual, upright or inverted.
Lens and image formation explorer
You memorised the lens rules but the ray diagram and the sign of the answer keep disagreeing.
Everything you enter stays on this device.
Who is this tool for?
It helps Form 4 and Form 5 students in Science and Physics who meet lenses in the light and optics topic. It also helps anyone whose hand-drawn ray diagram disagrees with the equation and who wants to find out which one is wrong.
How do I use it?
- Choose a converging or a diverging lens.
- Enter the focal length in centimetres. Enter its size only, since the tool adds the sign.
- Enter the object distance and the object height.
- Press Show image.
- Read the nature of the image, the table, the diagram and the working.
How does it work?
The lens equation is 1/f = 1/u + 1/v. Magnification is m = −v ÷ u. A negative m means an inverted image, and a size above 1 means it is magnified.
The diagram shows 2 rays. One leaves the top of the object parallel to the axis and refracts through the focal point. The other passes through the centre of the lens without bending. Dashed lines mark the extensions that make a virtual image.
A short worked example
This is a worked example. A converging lens has f = 10 cm, and the object is at u = 15 cm.
Then 1/v = 1/10 − 1/15 = 1/30, so v = 30 cm and m = −30 ÷ 15 = −2. The image is real, inverted and twice the height of the object.
Move the object to 20 cm, which is 2f. The image is at 20 cm and m = −1, so it is the same size as the object. Move it inside the focal length and the image turns virtual and upright.
What are the limits?
This is an ideal thin lens with a real object on the axis. It is an illustration of the model and not a design tool.
An object distance of 0 or less, or a focal length of 0, is rejected. The tool draws no image when it would fall outside the picture, and the table still gives the numbers. It gives no advice about eyes, eyesight or looking at bright light sources.
Where does this help in your subjects?
Start with explaining image formation and comparing lens applications. Then practise by hand with drawing ray diagrams for lenses.
The light and optics practice gives exam-style questions. To work through lenses with a teacher, see SPM Physics tuition and the one-hour trial class (from RM50).
Common questions
What sign convention does the tool use?
It uses real-is-positive. The object is real and on the left, so u is positive. A converging lens has f greater than 0 and a diverging lens has f less than 0. A positive v is a real image on the far side.
What happens when the object is exactly at the focal point?
The equation would divide by zero. The rays leave the lens parallel, so no image forms at any finite distance. The tool explains this instead of printing a number.
Why is the image from a diverging lens always virtual?
A diverging lens spreads the rays apart, so they never meet on the far side. They only appear to come from a point on the object's side, which is a virtual image. It is always upright and smaller.
Can I trust the diagram for exam drawings?
Use it to check your reasoning, not to copy. It shows an ideal thin lens with two principal rays. Your exam answer needs your own construction with the labels the question asks for.
If the diagram and the equation agree here but not in your own drawings, a one-to-one Physics lesson can practise drawing the rays by hand while checking each step.
- Online one-to-one lessons for your child with an experienced teacher.
- Your first class is a one-hour trial, from RM50. The fee is agreed before you book.
- Happy with the teacher? Continue with lessons of about 1.5 hours. If not, ask for another teacher.