This lesson is from Rick Matthews, Professor of Physics, Wake Forest University.
Lesson 1, convex lens
The object is far from the lens.
Lesson 2, convex lens
The object is near the lens.
The rules for concave lenses, are similar:
A horizontal ray is refracted outward, as if emanating from the near focal point.
A ray that strikes the middle of the lens continues in a straight line.
A ray coming from the object, far from the far focal point, will leave the lens horizontal.
Lesson 3, concave lens.
Note that object placement has little effect on the nature of the image.
The rays diverge.
In every case:
if the rays leaving the lens actually intersect then the image is real.
If the rays leaving the lens diverge then someone looking back through the lens
would see a virtual image:
Your mind would extrapolate where you think the image should be,
even though one isn’t really there, as shown below with the dotted lines.