# Can a parallelogram have whole-number lengths for all four sides and both diagonals?

Is it possible for a parallelogram to have whole-number lengths for all four sides and both diagonals?

One idea I had was to arrange four identical right triangles such that the right angles are adjacent. For example if we take four triangles that are all 3-4-5 right triangles, and arrange them so that their legs form a cross with two arms that are 3 units and two arms that are 4 units, their hypotenuses will form a parallelogram in which all sides are 5 units – that is, a rhombus.

A second idea was to take two pairs of isosceles triangles with all legs the same length, where one vertex angle is supplementary to another, and arrange them so that their vertex angles are adjacent. For example we could take two triangles with two sides of 6 units that form a 25° angle, and another two triangles with two sides of 6 units that form a 155° angle, and arrange them to form a quadrilateral with 12-unit diagonals – that is, a rectangle.

That's all I can imagine. My hunch is that a parallelogram can have whole-number lengths for all four sides and both diagonals only if it is either a rhombus or a rectangle.

Is that right? If so, can this limitation be explained elegantly?

Your hunch is wrong. A non-rectangular non-rhomboid parallelogram with integer side and diagonal lengths exists: Suppose that the parallelogram is $$ABCD$$ with $$AB=a$$, $$AD=b$$ and $$BD=c$$. By the law of cosines: $$\cos\angle DAB=\frac{a^2+b^2-c^2}{2ab}$$ Since $$\angle CDA=\pi-\angle DAB$$, $$\cos\angle CDA=-\cos\angle DAB$$. Then $$AC^2=d^2=a^2+b^2-2ab\cos\angle CDA=a^2+b^2+2ab\cdot\frac{a^2+b^2-c^2}{2ab}=2a^2+2b^2-c^2$$ $$\color{red}{c^2+d^2=2(a^2+b^2)}$$ If $$c=d$$ we have a rectangle; if $$a=b$$ we have a rhombus. Thus, we look for a number that is a sum of two unequal squares $$a$$ and $$b$$ whose double is also a sum of two unequal squares $$c$$ and $$d$$, with triangle inequalities satisfied to ensure the parallelogram is non-degenerate: $$|a-b|.

Fixing $$a$$ and $$b$$, a trivial choice is $$c=a-b$$ and $$d=a+b$$ because $$2(a^2+b^2)=(a-b)^2+(a+b)^2$$. However, these assignments do not satisfy the triangle inequalities, making numbers that have multiple representations as sums of two squares valuable for this problem. I used OEIS A025426 to find them; the first number I saw was $$145=9^2+8^2=12^2+1^2$$, whose double is $$290=13^2+11^2=17^2+1^2$$. The first representations listed here allowed me to quickly construct the parallelogram above, although it is not the smallest: there is a parallelogram with sides 4 and 7, diagonals 7 and 9.

The numbers being squared in the above equations relate to the above parallelogram as follows. The lengths of its sides are 9 and 8, and of its diagonals 13 and 11. If its left side is extended upwards along the same straight line by 8 (so that it is now 16), the resulting quadrilateral has sides 16, 9, 8 and 11, and its diagonals are 17 and 13.

Here is a way to efficiently generate infinitely many such integer parallelograms. Let $$r$$ and $$s$$ be two coprime integers with $$r>s>0$$ and $$(r,s)\ne(3,1)$$. The product $$(2^2+1^2)(r^2+s^2)$$ can be written as a sum of two squares in two different ways (the Brahmagupta–Fibonacci identity): $$(2^2+1^2)(r^2+s^2)=(2r+s)^2+(2s-r)^2=\color{blue}{(2s+r)^2+(2r-s)^2}$$ From these two representations, we can write twice the product as two different sums of two squares too: $$2(2^2+1^2)(r^2+s^2)=\color{blue}{(2(r+s)-(r-s))^2+(2(r-s)+(r+s))^2} =(2(r-s)-(r+s))^2+(2(r+s)^2+(r-s))^2$$ To satisfy the triangle inequalities we choose $$\color{blue}{a=2r-s\qquad b=2s+r\qquad c=2(r+s)-(r-s)\qquad d=2(r-s)+(r+s)}$$ These are guaranteed to form a non-rectangular non-rhomboid integer parallelogram with the given restrictions on $$r$$ and $$s$$. The one pictured at the top of this answer corresponds to $$(r,s)=(5,2)$$ and the smallest instance (the one with side lengths 4 and 7) corresponds to $$(r,s)=(3,2)$$.

• I understand the demands related to (1) the triangle inequality rule, (2) the 1:2 proportion, and (3) the sums of unequal squares. Is there another requirement that (4) each number be the sum of two different pairs of squares? I don't understand why that fourth requirement exists. Can you give me an example of numbers that pass the first three hurdles, trip on the fourth, and so do not work as lengths in a parallelogram? Feb 28, 2018 at 17:57
• @Chaim: OEIS is the online enclyclopedia of integer sequences at oeis.org. It is a useful way to find such things. Feb 28, 2018 at 18:04
• @Chaim Regarding the requirement that the numbers be the sum of different squares, I have already said it in my answer. If $a=b$ then we have a rhombus, and if $c=d$ we have a rectangle. Both of these examples you already found, so I imposed the unequal components restriction to find the non-trivial ("general") parallelogram. Feb 28, 2018 at 18:15
• @Parcly Taxel I see that a=b means rhombus and c=d means rectangle. So if a, b, c and d are respectively 8,9,11 and 13, we have a quadrilateral that is neither a rhombus nor a rectangle, as each of those four numbers is unique. Feb 28, 2018 at 18:26
• @Parcly Taxel The thing I'm not getting is this. 145=9^2 + 8^2; 290=13^2 + 11^2; and 290=2*145. Why is this not enough? Somehow the fact that 145 is the sum of two different pairs of different squares (not just the squares of 9 and 8 but also the squares of 12 and 1) and likewise 290 is the sum of two different pairs of different squares, means that the triangle inequality is satisfied. I'm not getting that connection. Feb 28, 2018 at 18:26

For a quadrilateral of sides $a,b,c,d$, diagonals $D_1,D_2$ and $m$ the distance between the midpoints of these diagonals it is known the formula $$a^2+b^2+c^2+d^2=D_1^2+D_2^2+4m^2$$ For a parallelogram we have $a=c$ and $b=d$ and $m=0$ so one has the formula $$2(a^2+b^2)=D_1^2+D_2^2$$ On the other hand for the equation $X^2+Y^2=2Z^2$ the general solution with $(X,Y)=1$ is given by the identity $$(r^2-s^2+2rs)^2+(r^2-s^2-2rs)^2=2((r^2-s^2)^2+(2rs)^2)$$ where $Z=r^2+s^2$ complete in the RHS a pythagorean triple. Consequently making $$\begin{cases}a=r^2-s^2\\b=2rs\\D_1=r^2-s^2+2rs\\D_2=r^2-s^2-2rs\end{cases}$$ we can get infinitely many examples of the required parallelograms.

• I've never seen the formula $a^2+b^2+c^2+d^2=D_1^2+D_2^2+4m^2$ before, does it have a name? Feb 28, 2018 at 21:37
• @Silverfish: I don't know but surely it becomes from old times (greeks?) Feb 28, 2018 at 23:10
• Wikipedia gives it as a generalization of the parallelogram identity but without naming it; it is also listed on Mathworld's article on quadrilaterals, with reference to an 1880s book, "A sequel to the first six books of the Elements of Euclid, containing an easy introduction to modern geometry, with numerous examples" by John Casey, but he doesn't state its origin. Mar 1, 2018 at 0:06
• Casey gives it as Proposition 4 of Book 2, and it follows as a consequence of Proposition 2, that for any triangle $ABC$ we have $AC^2 + BC^2 = 2AD^2 + 2DC^2$ where $D$ is the midpoint of $AB$. Mar 1, 2018 at 0:10
• Wait a minute. Your values for $a,b,D_1=c$ and $D_2=d$ give a degenerate solution and do not satisfy the triangle inequalities. Perhaps you meant to say something else? Mar 1, 2018 at 4:36