Thin Lens Equation
$$\frac{1}{f}= \frac{1}{d_o}+ \frac{1}{d_i}$$
$$m = -\frac{d_i}{d_o}$$
$d_i > 0$: real image (projectable)
$d_i < 0$: virtual image (non-projectable)
$m < 0$: inverted $m > 0$: upright
Adjust focal length and object distance to instantly see 3 principal rays move and compute image distance, magnification, and real/virtual image classification for converging and diverging lenses.
$$\frac{1}{f}= \frac{1}{d_o}+ \frac{1}{d_i}$$
$$m = -\frac{d_i}{d_o}$$
$d_i > 0$: real image (projectable)
$d_i < 0$: virtual image (non-projectable)
$m < 0$: inverted $m > 0$: upright
The fundamental relationship governing image formation by a thin lens is derived from the geometry of light rays. It connects the focal length of the lens to the positions of the object and the image.
$$\frac{1}{f}= \frac{1}{d_o}+ \frac{1}{d_i}$$$f$: Focal length of the lens. Positive for converging (convex) lenses, negative for diverging (concave) lenses.
$d_o$: Object distance (always taken as positive for real objects).
$d_i$: Image distance. Positive values indicate a real image formed on the opposite side of the lens from the object. Negative values indicate a virtual image formed on the same side as the object.
The lateral magnification describes how much larger or smaller the image is compared to the object, and whether it is inverted.
$$m = -\frac{d_i}{d_o}$$$m$: Lateral magnification. If $|m| > 1$, the image is magnified; if $|m| < 1$, it is diminished. The sign of $m$ indicates orientation: $m < 0$ means the image is inverted relative to the object; $m > 0$ means it is upright.
Digital Camera & Smartphone Lenses: The lens focuses light from a distant object onto the camera sensor (a real image). Autofocus systems physically move lens elements to adjust the effective focal length or image distance ($d_i$) to satisfy the thin lens equation for sharp focus on the sensor plane.
Magnifying Glass (Simple Microscope): When you hold a magnifying glass close to an object (with $d_o < f$), the lens produces a virtual, upright, and magnified image ($m > 0$). This is why text appears larger when viewed through the lens.
Eyeglasses & Contact Lenses: These are thin lenses designed to correct vision. For a nearsighted person, a diverging lens (negative $f$) is used to take a distant object and create a virtual image at the person's far point, which their eye can then focus on clearly.
Projectors and Overhead Projectors: These devices use a converging lens to take a small slide or LCD image (the object) and project a large, real, and inverted image ($m$ is negative and large in magnitude) onto a distant screen. The setup requires $d_o$ to be slightly greater than $f$.
First, don't be misled by the term "thin lens." This is an idealized model that assumes "the lens thickness is negligible compared to the focal length." You cannot design real lenses, especially the complex lens assemblies in smartphone cameras, based on this calculation alone. Use it strictly as a "first approximation" concept.
Next, pay attention to the behavior when you set the object distance $d_o$ to a value just slightly larger than the focal length $f$. For example, with an $f=50mm$ lens and $d_o=55mm$, the formula gives a very large $d_i$ of $550mm$. In this state, the magnification is high (approximately -10x) and the image forms far away, so even a tiny error in $d_o$ (e.g., 1mm) can cause $d_i$ to fluctuate by tens of millimeters, resulting in a significant focus shift. This is precisely why focus becomes so critical in high-magnification macro photography in practical applications.
Also, while it's common to memorize that "a concave lens always forms a virtual image," there are cases where a concave lens can form a real image if you treat the object as a "virtual object" (i.e., converging light rays coming from another lens). This is an advanced concept important for designing optical systems with multiple combined lenses. While it's fine to think "always a virtual image" when working with a single concave lens in NovaSolver, it's good to keep this nuance in the back of your mind.
This thin lens calculation actually has applications far beyond just "optics." For instance, in acoustical engineering, the same formula is applied in designing ultrasonic lenses used for focusing sound waves. You'll find these used inside the transducers of medical ultrasound diagnostic equipment, for example.
Photolithography, a core technology in semiconductor manufacturing, is the ultimate application of lens systems. Huge, complex projection lenses are used to reduce and project circuit patterns. Here, the goal is to reduce aberrations (deviations from the ideal) to nearly zero, and the thin lens formula serves as the starting point.
Furthermore, in fields like electromagnetic wave engineering and antenna design, the design principles for focusing radio waves, such as in parabolic antennas and lens antennas, are very similar to geometric optics. Although it uses radio waves instead of light, the principle of placing a feed at the "focal point" to radiate a plane wave is essentially the same concept as a lens.
Once you're comfortable with thin lenses, the next recommended step is to learn the "lensmaker's equation." This formula calculates the focal length $f$ of a lens from its radii of curvature, thickness, and the refractive index of the material, expressed as $$ \frac{1}{f} = (n-1)\left( \frac{1}{R_1} - \frac{1}{R_2} + \frac{(n-1)d}{n R_1 R_2} \right)$$. Understanding this will help you grasp why lenses have convex or concave shapes and how the material affects their properties.
The next challenge is understanding "aberrations." The thin lens formula only considers ideal "paraxial rays." In real lenses, aberrations occur, such as shifts in focal position due to color (chromatic aberration) or image distortion (distortion). High-performance camera lenses combine multiple lens elements precisely to cancel out these aberrations. A good way to visualize this is to think of the scattering of rays that appears in simulation tools when you push parameters to extremes as the seeds of aberration.