The lateral magnification m of an optic element is defined as the ratio of
image height to object height:
m = hi/ho (definition)
It follows from the Lens Equation
that the magnification can be calculated as:
m = - di/do
The negative sign is needed to conform to the convention that magnification
is negative if the image is inverted, and positive if the image is upright.
The net magnification of a system of two lenses is equal to the product
of the magnification of each lens:
m12 = m1*m2