# Proof verification: Let $gcd(x,y)=1$. If $xy$ is a perfect square, then $x$ and $y$ are perfect squares.

Can someone please verify whether my proof is logically correct? :)

Let $gcd(x,y)=1$. If $xy$ is a perfect square, then $x$ and $y$ are perfect squares.

Proof:

If $xy$ is a perfect square, let $xy=a^{2}$ for some $a\in \mathbb{Z}$. By the fundamental theorem of arithmetic, $a$ has a unique prime factorization $a = p_{1}p_{2}\cdots p_{k}$. Then $a^{2}=(p_{1}p_{2}\cdots p_{k})^{2} = p_{1}^{2}p_{2}^{2}\cdots p_{k}^{2}$. Since $x$ and $y$ are relatively prime, they do not share the same prime factors (i.e. $x=p_{1}p_{4}\cdots p_{k-1}$ and $y=p_{2}p_{3}\cdots p_{k}$). Then $x$ and $y$ each have prime factorizations with each prime having exponent $2$. Therefore, $x$ and $y$ are perfect squares. $\square$

Corrected proof:

If $xy$ is a perfect square, by the fundamental theorem of arithmetic, $xy$ has a unique prime factorization $xy = p_{1}^{e_{1}}p_{2}^{e_{2}}\cdots p_{k}^{e_{k}}$ with each prime being distinct and having even exponent. Since $x$ and $y$ are relatively prime, they do not share the same prime factors. Then $x$ and $y$ each have prime factorizations with each prime having even exponents, such as $x=p_{1}^{s_{1}}p_{2}^{s_{2}}\cdots p_{k}^{s_{k}}$ and $y=p_{1}^{r_{1}}p_{2}^{r_{2}}\cdots p_{k}^{r_{k}}$ with $s_{i}+r_{i}=e_{i}$ for all $i=1,...,k$. Therefore, $x$ and $y$ are perfect squares. $\square$

• Seems reasonable. The proof is logically correct. Except that you might want to make $p_1,p_2,\ldots,p_k$ distinct primes, and give them explicit exponents. That way it'll be more clear when you later refer to their exponents. – jgon Jan 22 '18 at 5:43
• @jgon Hello, what do you mean by explicit exponents? Thanks. – numericalorange Jan 22 '18 at 5:45
• As in, make $p_1,\ldots,p_k$ distinct primes, and say the prime factorization of $a$ is $a=p_1^{e_1}p_2^{e_2}\cdots p_k^{e_k}$, where $e_i\in \Bbb{N}$. – jgon Jan 22 '18 at 5:46
• And $e_{i}$ is even? – numericalorange Jan 22 '18 at 5:48
• Yes. Then you could say $x$ has prime factorization $p_1^{r_1}p_2^{r_2}\cdots p_k^{r_k}$ and $y$ has prime factorization $p_1^{s_1}p_2^{s_2}\cdots p_k^{s_k}$ with $r_i+s_i=e_i$. Then since $x$ and $y$ are relatively prime, for each $i$, one of $r_i$ or $s_i$ is 0. Then since $e_i$ is even and $r_i+s_i=e_i$, the other exponent is equal to $e_i$ and hence even. Hence all the $r_i$ and $s_i$ are even, so $x$ and $y$ are perfect squares. Or something like that. That's maybe even a little too verbose. – jgon Jan 22 '18 at 5:51

$x$ and $y$ each have prime factorizations with each prime having exponent 2.
$x$ and $y$ each have prime factorizations with each prime having an even exponent.
Preceding statements should be edited accordingly, bearing in mind that the prime factors of $x^{1/2}$ might not all be distinct; similarly for $y$.
• I see, then I change $p_{1}^{2}p_{2}^{2}\cdots p_{k}^{2}$ to $p_{1}^{e}p_{2}^{e}\cdots p_{k}^{e}$? – numericalorange Jan 22 '18 at 5:48
• Better still, you might want to use $p_{1}^{e_1}p_{2}^{e_2}\cdots p_{k}^{e_k}$ where all $e_j$ are even numbers. – Alex Jan 22 '18 at 5:49