The thin lens equation is stated as follows: where

d_{o} is the distance (measured along the axis) from the object to the center of the lens

d_{i} is the distance (measured along the axis) from the image to the center of the lens

f is the focal length of the lens
The expression 1/f in called the power of a lens. It is measured in Diopters, where 1 D = 1 m^{1}.
When using this equation, signs are very important:
d_{o} 
positive

when the object is placed "in front of the lens"




d_{i} 
positive

when real images are formed (inverted, "behind the lens")

d_{i} 
negative

when virtual images are formed (upright, "in front of the lens")




f

positive

when the lens is converging 
f

negative

when the lens is diverging 
Remember that d_{o}, d_{i}, and f must be measured in the same unit  usually meters is preferred.
The following formula is used to calculate the magnification of an image:
If a problem states that a real image is formed that is twice as large as an object, then you would use the relationship d_{i} = +2d_{o} in the thin lens equation. If a problem states that a virtual image is formed that is twice as large as the object, then you would use the relationship that d_{i} = −2d_{o}.
