Inradius of Right Triangle – How to Derive Inradius in a Right Triangle

circleseuclidean-geometrygeometryplane-geometrytriangles

If we have a right triangle then the inradius is equal to $$r=\frac{a+b-c}2,$$
where $c$ is the hypothenuse and $a$ and $b$ are the legs.

This formula is mentioned in various places and it can be useful both in geometric problems and in problems on Pythagorean triples.1

Question: How can one derive this formula?


1It is stated on Wikipedia (in the current revision without a reference). Some posts on this site where this equation (or something closely related) is mentioned:
If the radius of inscribed circle in a right triangle is $3 cm$ and the non-hypotenuse side is $14cm$, calculate triangle's area.,
Prove the inequality $R+r > \sqrt{2S}$,
In a Right Angled Triangle.,
How do I find the radius of the circle which touches three sides of a right angled triangle?, Is there a way to see this geometrically?, Range of inradius of a right Triangle.


I will mention that I would be able to derive this myself in some way. (And some of the posts linked above in fact include something which basically leads to a proof.)
Still, I think that it is to have somewhere this nice fact as a reference. And I wasn't able to find on this site a question specifically about this problem.
I can post an answer myself – but I wanted to give others an opportunity to make a post first.

Best Answer

enter image description here

Let the tangent points be $A'$, $B'$ and $C'$ labelled in the usual way. Then, since tangents from a point to a circle have equal length, $CB'=r=CA'$.

Therefore, for the same reason, $$AB'=AC'=b-r$$ and $$BA'=BC'=a-r$$ And since $AC'+BC'=c$, we get $a-r+b-r=c$ and hence the result.