Sign convention for Spherical Lenses
All distances are measured from the optical centre of the lens.
Distances measured in the direction of the incident rays are positive and those measured in a direction opposite to the direction of the incident rays are negative.
Heights measured above the principal axis are positive and those measured below the principal axis are negative.
According to our sign convention,
The focal length of convex lens is positive.
The focal length of a concave lens is negative.
The distance of the object is negative but the distance of a real image is positive. The distance of a virtual image is negative.
Height h1 of the object is positive.
Height h2 of a virtual image is positive but height h2 of a real image is negative.
Magnification is positive for a virtual image and negative for a real image.