"Three positive integers $x$, $y$ and $z$ are called a Pythagorean triple if $x^2 + y^2 = z^2$. A Pythagorean triple is called primitive if the only positive integer that is a factor of all three integers $x$, $y$ and $z$ is $1$. Explain why, if $x$, $y$ and $z$ is a primitive Pythagorean triple, either $x$ or $y$ must be odd." - From book
An exercise from my proof book that I'm confused about. I'm a beginner any help would be appreciated
Suppose both $x$ and $y$ are even then $x^2$ and $y^2$ will be even and their sum $z^2=x^2+y^2$ will also be even. That implies that $z$ is also even. So all of $x$, $y$, and $z$ are divisible by $2$. Hence, their gcd is not $1$. A contradiction.