# How can we check if a system of equations accepts an integer solution?

I have the following system: $$x_1 + y_1 + z_1 = 0$$ $$x_2 + y_2 + z_2 = 0$$ $$x_1^2+y_1^2+z_1^2 = x_2^2 + y_2^2 + z_2^2$$ $$x_1x_2 + y_1y_2 + z_1z_2 = 0$$

Geometrically, this is equivalent to find an orthogonal basis composed only of integer values, for a plane whose equation in the 3D space is $$x+y+z=0$$

I tried finding a solution using a python script by testing with numbers up to 50, but couldn't find any. I also tried solving it geometrically. I'm staring to think that there is not an integer solution, but I'm not sure how it could be proven. Thanks in advance for sharing your thoughts.

• The integral points in that plane form a triangular lattice. It is probably easier to prove the 2-dimensional problem, i.e. proving there are no two orthogonal vectors of equal length in a lattice of regular triangles. Jul 3 '19 at 10:57
• do you mean something as $(1,1,1), (1,-1,0),(1,1,-2)$ ? Jul 3 '19 at 11:17

Let $$x_1=a$$, $$y_1=b$$, $$z_1=c$$, $$x_2=x$$, $$y_2=y$$ and $$z_2=z$$.
Thus, $$a+b+c=x+y+z=0,$$ $$a^2+b^2+c^2=x^2+y^2+z^2$$ and $$ax+by+cz=0.$$ Hence, $$ax+by+(a+b)(x+y)=0,$$ which gives $$(2a+b)x+(a+2b)y=0$$ and since $$a^2+b^2+(a+b)^2=x^2+y^2+(x+y)^2,$$ we obtain: $$a^2+ab+b^2=x^2+xy+y^2,$$ which gives $$(a^2+ab+b^2)(2a+b)^2=y^2((a+2b)^2-(a+2b)(2a+b)+(2a+b)^2)$$ or $$(a^2+ab+b^2)(2a+b)^2=3y^2(a^2+ab+b^2).$$ Can you end it now?
$$q(x,y)=x^2+xy+y^2$$ is a peculiar quadratic form, associated to the ring of Eisenstein integers $$\mathbb{Z}[\omega]$$. It is well-known that every prime $$\equiv 1\pmod{3}$$ can be represented by such quadratic form in a essentially unique way: if we take a product of $$\geq 2$$ primes of the form $$3k+1$$, such number can be represented in at least two ways by our quadratic form. For instance $$91=7\cdot 13$$ is simultaneously $$q(1,9)$$ and $$q(5,6)$$. This gives that $$(x_1,y_1,z_1)=(1,9,-10),\quad (x_2,y_2,z_2)=(5,6,-11)$$ have the same length and lie on the plane $$x+y+z=0$$, for instance. On the other hand they are not orthogonal to each other. This is not a coincidence, since if $$z\in\mathbb{Z}[\omega]\setminus\{0\}$$, then $$iz\not\in\mathbb{Z}[\omega]$$.
This is equivalent to the statement "There are no non-trivial squares in $$\mathbb{Z}[\omega]$$" or to the statement "There are no non-trivial equilateral triangles in $$\mathbb{Z}[i]$$". Ultimately, they both are consequences of $$\sqrt{3}\not\in\mathbb{Q}$$.