Is my solution to this exercise right? I ask because the author's official solut...

@rzeta0@mathstodon.xyz

Is my solution to this exercise right? I ask because the author's official solution is a more complex proof by contradiction.

---

Show that if \(\gcd (x, y) = 1\) and \(x^2 + y^2 = z^2\) then \(\gcd (x, z) = \gcd (y, z) = 1\).

---

Let \(g=\gcd(x,y)\). This means we can write \(x=gx'\) and \(y=gy'\), for some integers \(x', y'\), and so

\[ x^2 + y^2 = g^2(x'^2 + y'^2) = z^2 \]

This tells us \(g\) is a factor of \(z\).

And so \(g\) is factor of all three \(z\), \(x\) and \(y\).

But the only common factor of \(x\) and \(y\) is \(g=1\). And so the only factor \(z\) has in common with either \(x\) or \(y\) is \(g=1\).

That is, the constraints \(\gcd (x, y) = 1\) and \(x^2 + y^2 = z^2\) give us \(\gcd (x, z) = \gcd (y, z) = 1\).

#maths