In case of spherical lenses, there are some rules for sign convention.
If the distance of object from the optical centre of the lens is u, distance of image from the optical centre is v and focal length of the lens is f, then the relationship between u, v and f for lens is:
1/f = 1/v - 1/u
This is called lens formula. Focal length for convex lens is positive, for concave lens it is taken negative.
In case of some lenses, the size of the image of an object is enlarged where as in some other cases it is diminished. The ratio of the size of the image to the size of the object for a particular lens remains constant for that lens. The ratio of the size of the image to that of the object is called as the magnification of the lens.
Magnification = size of image (I) / size of object (O)
m = I/O = v/u