A right-angled triangle has sides of integer length. Its area (in square metres) is twice its perimeter (in metres). What are the lengths of the sides?

The equations I have made so far is:

Using Pythagoras' Theroem and Area Formula: $$\frac{ab}{4}=a+b+\sqrt{a^2+b^2}$$

Using Heron's formula:

$$s(s-a)(s-b)(s-c)=4(a+b+c)^2$$ For LHS:$$(\frac{a+b+c}{2})(\frac{a+b+c-2a}{2})(\frac{a+b+c-2b}{2}) (\frac{a+b+c-2c}{2})$$ $$\frac{1}{16}((a+b+c)(b+c-a)(a+c-b)(a+b-c))$$ $$\frac{1}{16}(((b+c)^2-a^2)(a^2-(b-c)^2))$$

Please find the original link for the question here: https://www.maths.uq.edu.au/qamt/papers/Year9-10-2022-Paper.pdf Question 4

I believe that even though this question is simple, it is quite tricky and does need some consideration. Additionally, I needed this question's answer while I was preparing for the Year 9-10 UQ/QAMT Paper, as it still holds relevance as it still only is a 2-year old question!

My question is often compared to A right triangle with integer sides has area equal to twice its perimeter. Find sum of all possible circumradii., but I believe the question is different.


4 Answers 4


I don't think you need Heron's Formula. Parameterize the triangle:

$a=2mn, b=n^2-m^2, c=n^2+m^2$

$A=\frac{ab}{2}$. $ \ \ $ $P=a+b+c.$

$A=mn\cdot (n^2-m^2)$


$A=2P\implies mn(n^2-m^2)=4nm+4n^2$


So $m$ must be a factor of $4$.

$m=1\implies n=5\implies (10, 24, 26)$

$m=2\implies n=4 \implies (16, 12,20)$

$m=4 \implies n=5 \implies (40, 9, 41)$

  • $\begingroup$ Heron's formula would probably be known to students sitting this paper, but I do prefer the solutions that don't use it (just personal preference). $\endgroup$
    – Red Five
    Apr 25 at 5:25

$$\frac{ab}{4}=a+b+\sqrt{a^2+b^2}\\ \implies ab=4a+4b+4\sqrt{a^2+b^2}\\ \implies -4\sqrt{a^2+b^2}=4a+4b-ab \\ \implies (-4\sqrt{a^2+b^2})^2=(4a+4b-ab)^2 \\ \implies 16a^2+16b^2=16a^2+16b^2+a^2 b^2 + 32ab-8a^2b-8b^2a \\ \implies 8a^2b+8b^2a=a^2b^2+32ab\\ \implies 8a+8b-ab=32\\ \implies a+b-\frac{ab}{8}=4\\ \implies b=\frac{8(a-4)}{(a-8)}$$ From here, we can get integer $b$ when $(a-8)$ is either a factor or multiple of 8. Thus $a=9,10,12,16,24,40$. Consequently $b=40,24,16,12,10,9$.

I don't take further $a$ values because in the expression, $a-4>a-8,\frac{a-4}{a-8}>1,\frac{8(a-4)}{a-8}>8,b>8$. Thus when I saw that at $a=40,b=9$ this meant all other greater $a$ values gave non integer $b,8<b<9$. ($b$ is decreasing as $a$ increases)

Magically enough, all these pairs are Pythagorean triplets. $$9^2+40^2=41^2,12^2+16^2=20^2,24^2+10^2=26^2$$


Let $a$ and $b$ be the legs. Then the area $ab/2$ doubles the perimeter $a+b+\sqrt{a^2+b^2}$. So


Multiply by the conjugate $a+b-\sqrt{a^2+b^2}$ and apply the difference of squares factorization to simplify the right side:








and we identify three distinct triangles:

$a-8=1,b-8=32\implies a=9,b=40,c=\sqrt{a^2+b^2}=a+b-8=41$

$a-8=2,b-8=16\implies a=10,b=24,c=26$

$a-8=4,b-8=8\implies a=12,b=16,c=20.$


First we apply a lemma

Lemma. Let $p,r,A$ be the perimeter, inscribed radius and the area of the triangle respectively. Then we have $pr=2A$.

The proof is easy, just because radius of inscribed circle is perpendicular to triangle side, so we can divide it into three slices, and $\cdots$

Now with this fact, we have $pr=2A=4p$, so we get $r=4$.

From now on, we let the triangle be $\Delta ABC$ with $\angle A$ is right angle. set $I_C,I_B$ be the projection of the incenter on the line $AB$ and $AC$ respectively. Note $AI_B=AI_C=r=4$. Let $I_BC=t,I_CB=s$. By tangent property we have $BC=s+t$. By pythagorus theorem, we have $$(4+s)^2+(4+t)^2=(s+t)^2$$ Rearranging we get (Here we know $c\ne4$, can you do it yourself?)$$s=\dfrac{4t+16}{t-4}=4+\dfrac{32}{t-4}$$ Thus, we have $t-4$ is a factor of $32$, i.e. $$t-4=1,2,4,8,16,32\iff (s,t)=(36,5),(20,6),(12,8),(8,12),(6,20),(5,36)$$

Now I give you a task, is to verify how much of them is actually a solution.

  • 2
    $\begingroup$ OP has already given meaning to $b$ and $c$, perhaps you should use some other letters if your $b$ and $c$ aren't the same as those of OP. $\endgroup$ Apr 25 at 4:01
  • 1
    $\begingroup$ yah that's a good idea, i will adjust it. $\endgroup$
    – Angae MT
    Apr 25 at 4:04
  • 1
    $\begingroup$ Check your ordered pairs for $s$ and $t$. They should be symmetrical, that is a given $(s,t)$ should be accompanied by $(t,s)$. A correct rendering gives no extraneous solutions but counts the good ones twice due to this symmetry. $\endgroup$ Apr 26 at 20:12
  • $\begingroup$ arh yes I'm too lazy to check it, thanks for pointing out. $\endgroup$
    – Angae MT
    Apr 27 at 1:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .