<s>[INST] If x,y and z are positive integers and $\frac 1x + \frac 1y = \frac 1z$ then $\sqrt{x^2+y^2+z^2}$ is rational. To solve this problem I first started off by factoring to get $z^2=(x-z)(y-z)$ only to realise that this does nothing so I then tried squaring both sides to get the reciprocals of $x,y$ and $z$ squared minus $2$ over $xy$ but after this I have no idea what to do any form of help would be appreciated.(sorry for not using mathjax as my browser does not support it)
 [/INST] The solutions to $\dfrac 1x + \dfrac 1y = \dfrac 1z$ are characterized by
 (See this)
\begin{align}
   x &= kp(p+q) \\
   y &= kq(p+q) \\
   z &= kpq
\end{align}
Then 
\begin{align}
   \dfrac{x^2+y^2+z^2}{k^2} 
      &= p^2(p+q)^2 + q^2(p+q)^2 + p^2q^2 \\
      &= p^4 + 2p^3q + 3p^2q^2 + 2pq^3 + q^4 \\
      &=  \left( \begin{array}{l}
   p^4 &+ &p^3q &+ &p^2q^2 &+ \\
       &  &p^3q &+ &p^2q^2 &+ &pq^3 &+ \\
       &  &     &+ &p^2q^2 &+ &pq^3 &+ &q^4
\end{array} \right) \\
      &= p^2(p^2 + pq + q^2) + pq(p^2 + pq + q^2) + q^2(p^2 + pq + q^2) \\
      &= (p^2 + pq + q^2)^2
\end{align}
</s>