Derivation of Formula for Radius of Incircle
The radius of incircle is given by the formula
$r = \dfrac{A_t}{s}$
where At = area of the triangle and s = semi-perimeter.
Derivation
Let
At = Area of triangle ABC
At = Area of triangle BOC + Area of triangle AOC + Area of triangle AOB
$A_t = A_{BOC} + A_{AOC} + A_{AOB}$
$A_t = \frac{1}{2}ar + \frac{1}{2}br + \frac{1}{2}cr$
$A_t = \frac{1}{2}(a + b + c)\,r$
Let $\frac{1}{2}(a + b + c) = s$, the semi-perimeter
Thus,
$A_t = sr$
$r = \dfrac{A_t}{s}$