# Is there a primitive Heronian triangle with two integer heights?

I found no primitive Heronian triangle with two integer heights in Heronian triangles with side length no more than 100.

So I want to know the solution of the following problem.

Is there a primitive Heronian triangle with two integer heights?

https://en.wikipedia.org/wiki/Heronian_triangle

How about primitive Pythagorean triangle $$3,4,5$$? Its area is 6, one height is 3 and the other is 4. I also searched all the primitive Heronian triangles listed at https://en.formulasearchengine.com/wiki/Heronian_triangle and 5th, 10th, 17th, 35th, 38th, 41st and 59th entries have two integer heights.

So my answer is all primitive Pythagorean triangles are primitive Heronian triangles with two integer heights in addition to (potentially infinitely many) others.

Any primitive Heronian triangle with at least two integer altitudes is Pythagorean. In other words, no primitive Heronian triangles, except Pythagorean triangles, have at least two integer altitudes.

Let the triangle $$T$$'s sides be $$a, b, c$$ with $$s=(a+b+c)/2$$. Let $$T$$'s area be $$\Delta$$. Then $$\Delta^2=s(s-a)(s-b)(s-c).$$

$$T$$'s altitudes are $$2\Delta/a, 2\Delta/b$$ and $$2\Delta/c$$.

At least two of $$T$$'s altitudes are integers, WLOG those on $$a$$ and $$b$$. Then $$2\Delta/a, 2\Delta/b$$ are integers.

Claim: $$a$$ and $$b$$ are coprime.

Suppose $$a$$ and $$b$$ are both even. Then, if $$c$$ is even, then $$T$$ is not primitive, and if $$c$$ is odd, then $$s$$ is not an integer. Therefore $$a$$ and $$b$$ are not both even, so if they have a common prime factor $$p$$, then $$p$$ is odd.

Suppose, for some odd prime $$p$$, $$p\mid a$$ and $$p\mid b$$. Then $$p\nmid c$$ (as $$T$$ is primitive) so $$p\nmid s$$, $$p\nmid (s-a)$$, $$p\nmid (s-b)$$. But $$p\mid 2\Delta$$, so $$p\mid\Delta$$ (as $$p$$ is odd) so $$p^2\mid\Delta^2$$, so $$p^2\mid(s-c)$$. But $$s-c=(a+b-c)/2$$, and $$p$$ is odd, so $$p\mid a+b-c$$. $$p\mid a$$ and $$p\mid b$$, so $$p\mid c$$, and $$T$$ is not primitive. Contradiction.

Therefore the claim is true: $$a$$ and $$b$$ are coprime. So $$ab\mid 2\Delta$$. But the greatest possible area of a triangle where two sides have lengths $$a$$ and $$b$$ is $$ab/2$$, which occurs when those sides are at right angles. Therefore $$ab=2\Delta$$ and $$T$$ is a Pythagorean triangle.