# [SOLVED]Right-angled triangle

#### anemone

##### MHB POTW Director
Staff member
Suppose the lengths of the three sides of $\triangle ABC$ are integers and the inradius of the triangle is 1. Prove that the triangle is a right triangle.

#### anemone

##### MHB POTW Director
Staff member
Let $a=BC,\,b=CA$ and $c=AB$ be the side lengths, $r$ be the inradius and $s=\dfrac{a+b+c}{2}$.

Since the area of the triangle is $rs$, we get $\sqrt{s(s-a)(s-b)(s-c)}=1\cdot s=s$. Then

$(s-a)(s-b)(s-c)=s=(s-a)+(s-b)+(s-c)$

Now $4(a+b+c)=8s=(2s-2a)(2s-2b)(2s-2c)=(b+c-a)(c+a-b)(a+b-c)$.

In $(\bmod 2)$, each of $b+c-a,\,c+a-b$ and $a+b-c$ are the same. So either they are all odd or all even. Since their product is even, they are all even. Then $a+b+c$ is even and $s$ is an integer.

The positive integers $x=s-a,\,y=s-b$ and $z=s-c$ satisfy $xyz=x+y+z$. Suppose $x\ge y\ge z$. Then $yz\le 3$ for otherwise $xyz>3x\ge x+y+z$. This implies $x=3,\,y=2,\,z=1,\,s=3,\,a=3,\,b=4$ and $c=5$.

Therefore, the triangle is a right triangle.