This Demonstration lets you visualize the ray diagrams for concave and convex spherical mirrors. By manipulating the object and mirror locations, you can create real or virtual images. The ray parallel to the principal axis and the ray that hits the center of the mirror are drawn.
Locators allow you to drag both the object and the mirror. You can change the focal length using a slider. The degree of magnification and nature (real or virtual) of the image are displayed.