How to derive mirror equation?

How to derive mirror equation?

Mirror formula is the relationship between object distance (u), image distance (v) and focal length.
image
image
Derivation
The figure shows an object AB at a distance ā€˜uā€™ from the pole of a concave mirror. The image A1B1 is formed at a distance ā€˜vā€™ from the mirror. The position of the image is obtained by drawing a ray diagram.
Consider the D A1CB1 and D ACB
image
[when two angles of D A1CB1 and D ACB are equal then the third angle
image
image
But ED = AB
image
From equations (1) and (2)
image
If D is very close to P then EF = PF
image
But PC = R, PB = u, PB 1 = v, PF = f
By sign convention
PC = -R, PB = -u, PF = -f and PB 1 = -v
Equation (3) can be written as
image
Dividing equation (4) throughout by uvf we get
image
Hence, equation (5) gives the mirror formula.