Integer solution of $a^2+b^2=c^2+d^2$ that relates $a,b,c$, and $d$ explicitly. I have found that the integer solution of $a^2+b^2=c^2+d^2$ is $(a,b,c,d)=(pr+qs,ps-qr,pr-qs,ps+qr)$ for integer $p,r,q,s$.
I wonder if there is an explicit relation between $a,b,c,$ and $d$? Or could you give me a hint on what topics should I learn to find this relation if it exists?
Thank you for all your help.
 A: I do not know of any relationship between the summands, only the relationship between the sum and it's factors.
For Pythagorean triples,
$\space (A^2+B^2=C^2),\space$ there are $\space 2^{n-1}\space$ primitive triples where $\space n\space$ is the number of distinct prime factors of
$\space C.\quad$ A primitive triple is one where $\space GCD(A,B,C)=1.\quad $  For example, the number $\space65=5*13\space$ so there are
$\space 2^{2-1}=2^1=2\space$ primitive triples with that hypotenuse value.
To find them, we begin with Euclid's formula shown here as:
$$A=m^2-k^2 \quad B=2mk \quad C=m^2+k^2$$
and, solving for $\space k,\space$ we test a defined range of $\space m$-values to see which, if any, yield integers.
$$C=m^2+k^2\implies k=\sqrt{C-m^2}\\
  \qquad\text{for}\qquad \bigg\lfloor\frac{ 1+\sqrt{2C-1}}{2}\bigg\rfloor \le m \le \lfloor\sqrt{C-1}\rfloor$$
The lower limit ensures $m>k$ and the upper limit ensures $k\in\mathbb{N}$.
$$C=65\implies \bigg\lfloor\frac{ 1+\sqrt{130-1}}{2}\bigg\rfloor=6 \le m \le \lfloor\sqrt{65-1}\rfloor=8\quad \\
\text{and we find} \quad m\in\{7,8\}\longrightarrow k\in\{4,1\}\\$$
$$F(7,4)=(33,56,65)\qquad F(8,1)=(63,16,65) $$
So $$33^2+56^2=63^2+16^2=65^2$$
$\textbf{Update}"\quad$ The parts of a Pythagorean triple have characteristics that may or may not be called relationships.

*

*Side-$A\space$ can be any odd number greater than one.

*Side-$B\space$ can be any multiple of four.

*Side-$C\space$ must be of the form
$\space 4x+1, x\in\mathbb{N}\space$ but not all such values are valid. A list of the first couple of dozen hypotenuse values is shown
here.

A: From https://sites.google.com/site/tpiezas/003 (10. Form $mx^2+ny^2=mz^2+nt^2$-S. Realis(complete):
$$ u^2+nv^2=x^2+ny^2 \\ \Leftrightarrow \small \{ u, v, x, y \}=\{ a^2-n(a-b)^2+n(a-c)^2, b^2-(a-b)^2+n(b-c)^2, a^2+nb^2-nc^2, c^2-(a-c)^2-n(b-c)^2 \}. $$
Substituting $n=1$;
$$ u^2+v^2=x^2+y^2 \\ \Leftrightarrow \small \{ u, v, x, y \}=\{ a^2-(a-b)^2+(a-c)^2, b^2-(a-b)^2+(b-c)^2, a^2+b^2-c^2, c^2-(a-c)^2-(b-c)^2 \}. $$
So, this is the generalized form;
$\small \{a, b, c, d\}=\{m^2-(m-n)^2+(m-l)^2, n^2-(m-n)^2+(n-l)^2, m^2+n^2-l^2, l^2-(m-l)^2-(n-l)^2\}.$
