# 2004 Indonesia MO Problems/Problem 7

## Problem

Prove that in a triangle $ABC$ with $C$ as the right angle, where $a$ denote the side in front of angle $A$, $b$ denote the side in front of angle $B$, $c$ denote the side in front of angle $C$, the diameter of the incircle of $ABC$ equals to $a + b - c$.

## Solution $[asy] draw((0,0)--(30,0)--(0,40)--cycle); draw(circle((10,10),10)); draw((0,10)--(10,10)--(10,0)); draw((10,10)--(18,16)); dot((0,0)); label("C",(0,0),SW); dot((30,0)); label("B",(30,0),SE); dot((0,40)); label("A",(0,40),NW); dot((0,10)); label("X",(0,10),W); dot((10,0)); label("Y",(10,0),S); dot((18,16)); label("Z",(18,16),NE); dot((10,10)); label("O",(10,10),N); draw((0,8)--(2,8)--(2,10)); draw((0,2)--(2,2)--(2,0)); draw((8,0)--(8,2)--(10,2)); [/asy]$ Let $O$ be the center of the circle, $X$ be the intersection of the incircle and $AC$, $Y$ be the intersection of the incircle and $BC$, and $Z$ be the intersection of the incircle and $AB$.

Note that $X$ and $Y$ are tangent points of the circle, so $OX \perp AC$ and $OY \perp BC.$ Since $XC \perp YC$, we know that $XOYC$ is a square, so $XO = OY = YC = XC.$

Let $x = XC = YC$, $y = AX$, and $z = BY.$ Since $X,Y,Z$ are tangent points to the incircle, we know that $y = AZ$ and $z = BZ.$ Thus, \begin{align*} x + z &= a \\ x + y &= b \\ y + z &= c \end{align*} Adding the three equations yields \begin{align*} 2x+2y+2z &= a+b+c \\ x+y+z &= \frac{a+b+c}{2} \end{align*} Thus, $x = \frac{a+b-c}{2},$ so the diameter of the incircle is $a+b-c$.