The basic idea
A lens is a transparent piece of material — usually glass or transparent plastic — with curved surfaces. When light enters and exits the lens, it refracts (bends) at each curved surface. The two refractions together produce a controlled redirection: all rays from a given object point converge to a corresponding image point.
That's the whole physics. The art is in shaping the surfaces correctly.
This article goes through the geometry, the equations, and the practical consequences.
Why curved surfaces bend rays
How optics actually works covers the basics of refraction. The summary: light entering a denser material (higher refractive index) bends toward the normal of the surface; entering a less-dense material it bends away. Snell's law gives the exact angle.
For a flat surface, parallel rays stay parallel (all bend by the same angle). For a curved surface, parallel rays hit at different angles depending on where they strike — central rays nearly normal, edge rays at steeper angles. So they bend by different amounts. The result: a curved surface converges or diverges parallel rays.
A convex (outward-curved) surface, with a denser material behind it, converges parallel rays toward a focal point.
A concave (inward-curved) surface, with a denser material behind it, diverges parallel rays as if they came from a focal point on the same side as the source.
Most lenses have two curved surfaces (one on each side). The combined refraction at both surfaces determines the lens's overall behavior.
Converging vs diverging lenses
The two main categories:
Converging lens (also called positive or convex). Thicker in the middle than at the edges. Parallel rays entering converge to a real focal point on the far side. Used in magnifying glasses, camera lenses, projectors, the eye's natural lens (for close focus), and far-sighted eyeglasses.
Diverging lens (also called negative or concave). Thinner in the middle than at the edges. Parallel rays entering diverge as if they came from a virtual focal point on the same side as the source. Used in near-sighted eyeglasses and in compound lenses to correct aberrations.
Some lens shapes:
- Biconvex: both surfaces curve outward. Converging.
- Plano-convex: one flat, one convex. Converging.
- Meniscus (positive): one convex, one less-strongly concave. Converging.
- Biconcave: both surfaces curve inward. Diverging.
- Plano-concave: one flat, one concave. Diverging.
- Meniscus (negative): one concave, one less-strongly convex. Diverging.
The overall convergence or divergence depends on the surfaces' relative curvatures and the refractive index.
Focal length
The focal length (f) is the distance from the lens to its focal point — where parallel rays from a distant source converge (converging lens) or appear to diverge from (diverging lens).
Shorter focal length = stronger lens (rays bend more). Longer focal length = weaker lens (rays bend less).
For a thin lens in air, the focal length is given by the lensmaker's equation:
1/f = (n - 1) · (1/R₁ - 1/R₂)
where n is the refractive index of the lens material and R₁, R₂ are the radii of curvature of the two surfaces (with sign conventions).
For practical lens design, the focal length is set by the chosen glass and the chosen curvatures. Higher refractive index = shorter focal length for the same curvatures.
The diopter is the unit eye doctors use: D = 1/f (with f in meters). +1 D is a lens with 1 m focal length; +2.5 D is a lens with 0.4 m focal length. Reading glasses are typically +1 to +3 D; strong corrective lenses can be ±10 D or more.
The thin lens equation
For a lens thin enough to ignore its thickness, the relationship between object distance (d_o), image distance (d_i), and focal length (f) is:
1/f = 1/d_o + 1/d_i
Sign conventions:
- d_o is positive for real objects (on the incoming side of the lens).
- d_i is positive for real images (on the outgoing side) and negative for virtual images.
- f is positive for converging lenses and negative for diverging lenses.
With this equation, you can predict where the image forms for any object position.
Some special cases:
- Object very far away (d_o → ∞): d_i → f. The image forms at the focal length. This is the basis of "focused at infinity" in cameras and telescopes.
- Object at d_o = 2f: d_i = 2f, magnification = 1 (same size, real, inverted). The unit-magnification setting.
- Object at d_o = f: d_i → ∞. The lens makes parallel rays from this object — a "collimator" setup.
- Object closer than f (converging lens): produces a virtual, upright, magnified image. This is the magnifying glass mode.
Magnification
The linear magnification of a lens is:
M = -d_i / d_o
The negative sign indicates inversion (real images from converging lenses are inverted). |M| > 1 means enlarged; |M| < 1 means reduced.
For a magnifying glass held at the right distance (object inside the focal length), you get a virtual upright magnified image with M > 1. The classic 5x magnifier has f = 50 mm; held just inside its focal length, it shows objects about 5x larger.
For a camera lens photographing a scene at infinity, M = -f/d_o → 0 (the image is much smaller than the scene, which is exactly what we want on a sensor a few cm wide).
Compound systems (microscopes, telescopes) multiply magnifications: total magnification = product of individual stages.
Aperture and f-number
A lens has a finite diameter — the aperture — that limits how much light enters. Larger aperture = more light per unit time, but also more aberrations and shallower depth of field.
The f-number is the ratio of focal length to aperture diameter:
N = f / D
Smaller f-numbers (e.g., f/1.4, f/2) mean larger relative apertures; larger f-numbers (f/8, f/16) mean smaller relative apertures. Each "full stop" change halves or doubles the light:
f/1.0 → f/1.4 → f/2 → f/2.8 → f/4 → f/5.6 → f/8 → f/11 → f/16 → f/22
Each step represents the square root of 2 in linear dimension, hence factor of 2 in area, hence factor of 2 in light gathered.
The f-number also determines:
- Depth of field: lower f-number = shallower DOF (only a narrow range in focus).
- Diffraction: very small apertures (f/16 and up) introduce visible diffraction softness.
- Lens cost: faster lenses (lower f-numbers) require larger glass elements and tighter aberration corrections — typically much more expensive.
A "fast" lens (low f-number) lets you shoot in dim light or with very fast shutter speeds. A "slow" lens (high f-number) is cheaper, smaller, has more depth of field, and works well in bright light.
Aberrations and compound lenses
A simple single-element lens has several aberrations (covered in how optics actually works):
- Chromatic aberration: different colors focus at different distances.
- Spherical aberration: edges of the lens focus at a different distance than the center.
- Coma: off-axis points produce comet-shaped distortions.
- Astigmatism: rays in different planes focus differently.
- Field curvature and distortion.
Real high-quality lenses are compound — they combine multiple elements (typically 5-20 in a modern camera lens) with different glass types and shapes to cancel out most aberrations.
Achromatic doublets: two elements (one crown glass, one flint glass) cancel chromatic aberration at two specific wavelengths. The mainstay of microscope and telescope design.
Apochromatic triplets: three elements correct chromatic aberration at three wavelengths. Used in high-end astrophotography and microscopy.
Aspheric elements: lenses with non-spherical surfaces correct spherical aberration without needing multiple elements. Common in modern compact lenses.
Anti-reflection coatings: thin-film coatings on lens surfaces reduce reflections, increasing transmission and contrast. Modern lenses have multi-layer coatings that work across the visible spectrum.
Lens design is one of the more sophisticated specialties in optical engineering. Computer optimization of compound systems is essential — the best lens designs have been tuned through generations of refinement.
The eye as a lens
The human eye is a compact optical system. Two main refracting elements:
Cornea: the curved front surface of the eye. n ≈ 1.376. Does most of the refraction (~70%) because it's the boundary between air (n ≈ 1) and corneal tissue.
Crystalline lens: a flexible biological lens inside the eye. n varies from ~1.39 at the surface to ~1.42 at the core. Adjustable by ciliary muscles for focus at different distances.
Combined focal length: about 22 mm when relaxed (focused on distant objects).
Refractive errors:
- Myopia (nearsightedness): eye too long for its lens system; distant images blur. Corrected by diverging glasses.
- Hyperopia (farsightedness): eye too short; close images blur. Corrected by converging glasses.
- Astigmatism: uneven corneal curvature; rays in different planes focus differently. Corrected by cylindrical lenses.
- Presbyopia: the crystalline lens stiffens with age (typically starting in the mid-40s), losing accommodation range. Corrected by reading glasses or progressive multifocal lenses.
LASIK and similar refractive surgeries reshape the cornea (using precise UV laser pulses) to correct refractive errors at the source.
A note on electron lenses
The same focal-length math applies to electron optics, but with magnetic or electrostatic "lenses" instead of glass. In a scanning electron microscope:
- Electromagnetic lenses focus electron beams using carefully shaped magnetic fields.
- The relationship between current in the coils and effective focal length follows analogous equations.
- Aberrations exist (especially chromatic and spherical) and are far more severe than in optical lenses.
- Calibration of electron-optical columns is a specialized routine task — see SemSip's SEM optics calibration cluster for the practical workflow.
Electron-optical aberration correction has been a major research area; modern aberration-corrected SEM and TEM achieve resolutions below 0.5 Å, well into atomic-scale detail.
If you'd like a guided 5-minute course on lenses and what each parameter does, NerdSip can generate one.
The takeaway
A lens uses refraction at two curved surfaces to redirect light rays. Converging (convex) lenses focus parallel rays to a real focal point; diverging (concave) lenses spread them as if from a virtual focal point. The focal length depends on the surface curvatures and the refractive index of the material. The thin lens equation (1/f = 1/d_o + 1/d_i) predicts image position for any object distance. Magnification, depth of field, and brightness all follow from focal length and aperture. Real high-quality lenses combine multiple elements to correct aberrations — chromatic, spherical, coma, and others — which is most of what makes lens design difficult. The eye and the SEM both use the same underlying principles, with cornea/crystalline-lens or electromagnetic elements instead of glass.
refraction at two curved surfaces, and ive had these on my face for 20 years without knowing the basics. embarassing but great read
two curved surfaces doing all the bending, and that same idea runs my glasses, my camera and my actual eyeballs. one concept everywhere