# Two queries on triangles, the sides of which have rational lengths

Let us define a "rational triangle" as one in the Euclidean plane, with lengths of all sides rational.

We are aware that a positive integer is called "congruent" only if it is the area of a right triangle with rational length sides; so not every rational number is the area of some right rational triangle. However,

1. is every positive rational number the area of some (not necessarily right) rational triangle?

2. for two given rational numbers $$A$$ and $$P$$, among the infinitely many general triangles with area $$A$$ and perimeter $$P$$ (there are infinitely many such triangles if $$A$$ and $$P$$ are within a suitable range), is there a guarantee that there are any (or infinitely many) rational triangles?

• Just a remark: I would suggest to provide a definition of what GENERAL triangles are in the context of this question because it can mean different things to different people. – Manfred Weis Jul 2 '19 at 12:48
• Brahmagupta gave a parametrization of heronian triangles similar to Euclid's parametrization of right triangles. Have you tried playing with that? – Daniel McLaury Jul 2 '19 at 13:04
• I guess that "general" was meant in the sense "arbitrary". – YCor Jul 2 '19 at 17:15
• It seems that this equation defines a quartic surface with six nodes at infinity. I guess the resolution is a K3 surface. – Will Sawin Jul 3 '19 at 0:48
• It seems from counting $\mathbb F_q$-points that this K3 surface should have high rank, so maybe it will have many curves that can be used to find $\mathbb Q$-points. – Will Sawin Jul 3 '19 at 0:57

On the second question: There is the inequality $$12\sqrt{3}A\leq P^2$$ that needs to be satisfied first of all to get a triangle.

Using Heron's formula for a triangle with sides $$x$$ and $$y$$, you are asking for the rational solutions to $$(x+y-P/2)(P/2-x)(P/2-y)=2A^2/P$$. The projective closure of this curve is an elliptic curve with $$O=(1:-1:0)$$ and two other rational $$3$$-torsion points at infinity.

Now for instance the curve for $$A=1$$ and $$P=5$$ is isomorphic to the curve with Cremona label 9650m1. This curve has $$E(\mathbb{Q})=\mathbb{Z}/3\mathbb{Z}$$ and hence there is no triangle with rational side of perimeter $$1$$ and area $$5$$. So the answer to this question is no in general.

For other values the rank is positive and you get solutions. For instance $$P=6$$ and $$A=1$$, we get $$x=5/3$$ and $$y=3/2$$ corresponding to the generator of the Mordell-Weil group. There are infinitely many solutions which correspond to $$x>0$$ and $$y>0$$ and $$6-x-y>0$$.

For $$P=8$$ and $$A=3$$, the curve has $$6$$ rational points, so one only gets finitely many (3) triangles in this case. $$x=y=5/2$$ is one.

The first question can now be viewed as trying to find a solution in $$x$$, $$y$$ and $$P$$ for a fixed given $$A$$. This is a non-isotrivial elliptic surface defined over $$\mathbb{Q}$$. I would expect that the rational point on it are Zariski dense, but I don't know if this can be shown. If so, the answer to the first question would be positive.

• You probably meant $12\sqrt3A\le P^2$ in the first sentence. – Andreas Blass Jul 2 '19 at 13:56
• Indeed. Corrected. Thanks – Chris Wuthrich Jul 2 '19 at 23:02

If for the equation derived by Chris Wuthrich, we introduce the new variables $$p = 2P$$, $$q = x - P/2$$, $$r = y-P/2$$, we obtain the more symmetric relation $$pqr(p+q+r) = A^2.$$ Now I knew I recognized this equation from somewhere, and after a little searching I hit upon some slides by Noam Elkies where your Question 1 is resolved completely. (Elkies further credits Franz Lemmermeyer with bringing this problem under his attention.)

It seems that the credit for this goes to Euler. The surface described by the equation above has a K3 surface with maximal Picard rank ($$\rho=20$$) as its smooth model. Euler presumably used the elliptic fibrations and the presence of many rational curves on the surface to produce a $$1$$-parameter family of solutions (as suggested by Will Sawin).

• I was going to mention that soon . . . The $pqr(p+q+r)$ equation comes directly from Heron's formula: let $(p,q,r) = (s-a,s-b,s-c)$. For most $a$, there are only finitely many smooth rational curves on the surface $pqr(p+q+r)=a$ that are defined over the rationals, so Euler had to go further than that. But when $a=A^2$ it's a bit easier. – Noam D. Elkies Jul 4 '19 at 16:42

Here is a back of an envelope calculation which suggest that there will be many such triangles. Choose two positive rationals $$r$$ and $$t$$ to be the perimeter and twice the area respectively. We can assume that the triangle has vertices $$(0,0), (c,0), (p,q)$$ with $$c$$ a positive rational. We set $$q=\frac t c$$. $$p$$ is then determined as a solution of the quadratic equation: $$p^2+\dfrac{t^2}{q^2}= \dfrac{(c^2-2 p c -(c-r)^2)^2}{4 (c-r)^2}.$$ If this $$p$$ is rational, then we have a triangle with the required form. Given that we can choose $$r,c,t$$ arbitrarily, it seems reasonable that there will be a plethora of such cases but I haven‘t checked the details. Since the above quadratic equation was obtained by the usual squaring procedures, there is also some sign checking to be done.

• Wait $t$ is fixed in the question. You have written the problem as a quartic equation and a quadratic equation in 4 unknown variables. This seems more complicated than Heron's formula. In any case Will Sawin's comment above seems more convincing to me. – Chris Wuthrich Jul 4 '19 at 8:06