Solution (source code)

= Solution

Adopt positive object and real-image distances $u$ and $v$ measured from a converging <thin lens>, with the object on the left. A ray through the lens centre is undeviated in the thin-lens approximation. For object height $h$ and signed image height $h'$, similar triangles give $h'/h=-v/u$.

A second ray leaves the object parallel to the axis, reaches the lens at height $h$ and then passes through the far <focal point>. Its height at distance $v$ is $h'=h(1-v/f)$. Equating the two descriptions gives
$$
-\frac vu=1-\frac vf,\qquad\boxed{\frac1u+\frac1v=\frac1f}.
$$
The signed transverse <magnification> is $\boxed{m=h'/h=-v/u}$. Since a real image has $v>0$ for $u>0$, $m<0$: it is inverted. Its size relative to the object is $|m|=v/u$.

\Image[/past-exam-of-the-physics-2-paper-of-the-university-of-oxford/2016-thin-lens-real-and-virtual-rays.png]
{title=Paraxial ray construction for real inverted and virtual upright lens images}

The derivation assumes the <paraxial approximation>, a negligible lens thickness and a <focal length> defined in the surrounding medium. The ray diagrams show actual paths as solid lines and backward extrapolations as dashed lines.