The mirror equation expresses the quantitative relationship between the object distance (do), the image distance (di), and the focal length (f) of a spherical mirror. It is applicable to both concave and convex mirrors, with the focal length being positive for concave mirrors and negative for convex mirrors. The distances of real images are positive and virtual images are negative. For a concave mirror with a focal length of 10 cm and an object placed 15 cm in front, the mirror equation is used to calculate that the image distance is 30 cm, indicating a real image is formed behind the mirror.