Answer explained
Diagram and assumptions
AB is the object, A′B′ the inverted real image, P the pole and F the focus. The object is beyond C. Use a small-aperture spherical mirror and paraxial rays. First use positive distance magnitudes U=PB, V=PB′ and F₀=PF. Let object height be H and image-height magnitude h.
Ray reflected at the pole
At P, incidence and reflection angles are equal. The right triangles ABP and A′B′P are therefore similar, giving h/H=V/U.
Ray initially parallel to the axis
The ray from A parallel to the axis strikes the mirror at M and reflects through F. In the small-aperture approximation, MP≈H and MP is treated as perpendicular to the axis. Similar triangles MPF and A′B′F give h/H=(V−F₀)/F₀.
Equate the ratios
V/U=(V−F₀)/F₀.
Cross-multiplying: VF₀=UV−UF₀, so UV=F₀(U+V).
Divide by UVF₀: 1/F₀=1/U+1/V.
Apply Cartesian signs
For this real-image configuration, u=−U, v=−V and f=−F₀. Negating the magnitude relation gives 1/f=1/u+1/v.
Conclusion
The mirror formula is 1/v+1/u=1/f. It applies with the appropriate Cartesian signs in other image configurations as well, under the paraxial approximation.