Solutions of Pythagorean Equation/General

Theorem
Let $x, y, z$ be a solution to the Pythagorean equation.

Then $x = k x', y = k y', z = k z'$, where:
 * $\tuple {x', y', z'}$ is a primitive Pythagorean triple
 * $k \in \Z: k \ge 1$

Proof
Let $\tuple {x, y, z}$ be non-primitive solution to the Pythagorean equation.

Let:
 * $\exists k \in \Z: k \ge 2, k \divides x, k \divides y$

such that $x \perp y$.

Then we can express $x$ and $y$ as $x = k x', y = k y'$.

Thus:
 * $z^2 = k^2 x'^2 + k^2 y'^2 = k^2 z'^2$

for some $z' \in \Z$.

Let:
 * $\exists k \in \Z: k \ge 2, k \divides x, k \divides z$

such that $x \perp z$

Then we can express $x$ and $z$ as $x = k x', z = k z'$.

Thus:
 * $y^2 = k^2 z'^2 - k^2 x'^2 = k^2 y'^2$

for some $y' \in \Z$.

Similarly for any common divisor of $y$ and $z$.

Thus any common divisor of any pair of $x, y, z$ has to be a common divisor of Integers of the other.

Hence any non-primitive solution to the Pythagorean equation is a constant multiple of some primitive solution.