Finding rational solutions to this system of equations For a Linear Algebra problem I need to find $3$ distinct solutions, $(x,y,z)$ to the following system of equations: $$x^2+y^2+z^2=1 \\
x+y+z=\pm 1$$
such that $x,y,z\in \mathbb Z$
I have found $(x,y,z)=(\pm 1, 0, 0) , ({-1\over 3}, {2\over 3}, {2\over 3})$
But I'm having trouble finding a third solution. I'm not sure if it even exists. 
Just to be clear, by "distinct" I mean that that $(0, \pm 1, 0)$ and $(0, 0, \pm 1)$ count the same as the first solution.
 A: The general solution of the system $x+y+z=1$ and $x^2+y^2+z^2=1$ is given by
$$
x_1=\frac{\sqrt{d}+1-x_3}{2},\quad x_2=-\frac{\sqrt{d}+1-x_3}{2}
$$
for arbitrary $x_3$, 
with $d=-(x_3-1)(3x_3+1)$. To find rational solutions, we must find all rational $x_3$ such that $d$ is a rational square.
The other system with $x+y+z=-1$ and $x^2+y^2+z^2=1$ works the same way.
A: $$(-\frac{2}{7},\frac{3}{7},\frac{6}{7})$$ is another one.
A: Think this question in a geometry problem. So we know that $x^2+y^2+z^2=1$ is a sphere in 3D space, and $x+y+z=1$ is a plane. The solutions is the crosssection region of those two objects, which is a curve. So there are infinite solutions.
Maybe the above argument is not that simple to visualise (sorry if you cannot). In order to prove the above argument, here we do it in a more direct way. 
Now we solve the system equation. Easily we know $y=1-z-x$, so we can have $x^2+(1-z-x)^2+z^2+1=0$. Wiht little bit algebra, we can know that 
$x^2-(1-z)x+z^2-1=0$, solve $x$ out treating $z$ as a free variable, then we can know $x=\frac{1-z\pm\sqrt{(z-1)(-3z-1)}}{2}$, then in order to get the rational solution, we have to have $(z-1)(-3z-1)=p^2$ where $p\in Q$ and also $z^2<=1$, it is easy to see that the there is a specific case meeting this requirement where $(z-1)=1/q^2(-3z-1)$, $q\in Z$. For instance, so $q=1$ will give you $(1,0,0)$, $q=2$ will give you $(3/7,-2/7,6/7)$, $q=3$ will give you $(-1/3,2/3,2/3)$. Following this logic, keep going on, you can have infinite solutions.  
A: One hint : let $x=\frac uq$, $y=\frac vq$ and $z=\frac wq$, with $u$, $v$, $w$ and $q$ integers. Your system is equivalent to (with $\epsilon=\pm1$) :
$$\left\{\begin{matrix}u+v+w=\epsilon q \\ u^2+v^2+w^2=q^2\end{matrix} \right.\iff \left\{\begin{matrix}u+v+w=\epsilon q \\ uv+vw+wu=0\end{matrix}\right.$$
So you are looking for triplets $(u,v,w)$ of integers such that 
$$(u,v,w).(v,w,u)=0$$
So any orthogonal matrix of order $3$ should give you solutions to your problem.
For example, looking for a triplet $(2,-3,a)$, you find $a=6$, $q=\epsilon(2-3-6)=-\epsilon7$, your solutions are $x=-\epsilon\frac27$, $y=\epsilon\frac37$ and $z=\epsilon\frac67$...
