The thin lens equation relates object, image, and focal length
For a thin lens, the focal length f is a property determined by the lens shape and refractive index: 1/f = (n-1)(1/R1 - 1/R2), where R1 and R2 are the curvatures of the two surfaces. The lens equation 1/f = 1/d_o + 1/d_i connects the object distance d_o, image distance d_i, and focal length. A converging lens (positive f) brings parallel rays to a focus at the focal point. An object placed beyond 2f forms a real, inverted, reduced image between f and 2f on the opposite side (the basis of cameras and projectors). An object between f and 2f forms a real, inverted, magnified image beyond 2f (the basis of microscopes and telescopes). An object closer than f forms a virtual, upright, magnified image on the same side as the object (magnifying glass). Ray tracing through the principal planes and focal points provides a graphical method to find images without calculations.
Aberrations and practical design
Real lenses deviate from the thin-lens model. Spherical aberration occurs because outer rays through a spherical lens focus slightly closer than paraxial rays, blurring the image. Chromatic aberration arises because refractive index varies with wavelength, so different colors focus at different distances. Coma and astigmatism affect off-axis points. To minimize aberrations, sophisticated optical systems combine multiple lens elements with different shapes and materials. Achromatic doublets pair a high-index crown glass lens with a low-index flint glass lens to cancel chromatic aberration. Telescope and camera objectives use arrays of up to 10-15 elements to correct aberrations over a wide field and wavelength range. Computational optics now optimizes lens designs using algorithms, producing designs better than any hand-designed system.