$a, b, m$ are integers, such that $ab=m^2$
Prove that $a\over b$ and $b\over c$ are perfect squares, where $c$ is the GCF of $a$ and $b$.

I'm fairly new to mathematics and had never attempted to prove anything before. However, I did give this one a try and I'm hoping to receive constructive criticism, as well as other solutions to the problem(or, the correct solution, if mine is incorrect).

My solution goes as follows:


$ab$ can be represented as $m(m)$

Hence, $gcf(a,b) = c = gcf(m,m) = m$
Therefore, $\frac ac = \frac bc = \frac mm = 1$
$1$ can be represented as $1(1)$ and is a perfect square. I apologize if the formulation of my proposed proof is incorrect or difficult to understand. I'm still learning.

  • 2
    $\begingroup$ Here's a MathJax tutorial :) $\endgroup$
    – Shaun
    Sep 17, 2019 at 21:34
  • 3
    $\begingroup$ The alleged identity $\operatorname{gcf}(a,b)=\operatorname{gcf}(m,m)$ is simply not true, and in fact you should see by yourself that it doesn't quite make sense, since you end up concluding that $a=b=c=m$, while supposedly the exercise you are doing exists in non-trivial cases. $\endgroup$
    – user239203
    Sep 17, 2019 at 21:37
  • 3
    $\begingroup$ You could try a prime factorisation of $a$ and $b$ $\endgroup$
    – Henry
    Sep 17, 2019 at 21:42
  • $\begingroup$ You should first try a few examples. $12\cdot 75=30^2$ but the gcd of 12,75 is clearly not $30$. $\endgroup$
    – David P
    Sep 17, 2019 at 21:47
  • 2
    $\begingroup$ Please do not delete questions with good answers. Others have devoted effort to answer your question; deleting the question is disrespectful of their effort and prevents others from benefiting from your question and its answers. $\endgroup$
    – robjohn
    Sep 18, 2019 at 2:40

2 Answers 2


Prime factorization requires a fair bit of background. Here is an answer that does not use prime factorization. This answer uses Bezout's Identity in the proof of the Lemma below. An elementary proof of Bezout's Identity is given in this answer.

Lemma: If $(a,b)=1$, then $\left(a^2,b^2\right)=1$.

Proof: Bezout's Identity says that there are $x,y\in\mathbb{Z}$ so that $ax+by=1$. Cube and collect to get $$ a^2\left(ax^3+3x^2by\right)+b^2\left(by^3+3y^2ax\right)=1 $$


Corollary $\bf{1}$: $\left(a^2,b^2\right)=(a,b)^2$

Proof: Let $g=(a,b)$. Then, $\left(\frac ag,\frac bg\right)=1$ and so $\left(\frac{a^2}{g^2},\frac{b^2}{g^2}\right)=1$. Thus, $(a^2,b^2)=g^2=(a,b)^2$.


Corollary $\bf{2}$: If $a^2\mid b^2$, then $a\mid b$.

Proof: If $a^2\mid b^2$, then $a^2=(a^2,b^2)=(a,b)^2$. Therefore, $a=(a,b)$ which means that $a\mid b$.


Corollary $\bf{3}$: If $ab=m^2$ and $(a,b)=1$, then $a=(a,m)^2$ and $b=(b,m)^2$.

Proof: $$ \begin{align} (a,m)^2 &=\left(a^2,m^2\right)\\ &=(a^2,ab)\\[3pt] &=a(a,b)\\[3pt] &=a \end{align} $$ Similarly, $b=(b,m)^2$.



Suppose that $ab=m^2$ and $(a,b)=c$. Then $\frac ac\frac bc=\frac{m^2}{c^2}$ and $\left(\frac ac,\frac bc\right)=1$. Note that if $c^2\mid m^2$, then Corollary $2$ says that $c\mid m$. Applying Corollary $3$, we get $$ \frac ac=\left(\frac ac,\frac mc\right)^2 $$ and $$ \frac bc=\left(\frac bc,\frac mc\right)^2 $$


Prime factorization of $ab$ will reveal that factors are even numbered by quantity ($2, 4$ or $6$ etc). It doesn't matter how those factors comprise to make $a$ and $b$, dividing by all the factors common to both leaves either an even number of factors in both $a$ and $b$ or a $1$.

Generalizing, looking at any one factor $f$ of $ab$, say it's $f\cdot f\cdot f\cdot f\cdot f\cdot f$, and allocating any number of $f$s to either $a$ or $b$, when diving by the lowest number of $f$s in either $a$ or $b$, there always remains an even number of $f$s or a $1$ in both $a$ and $b$. This repeats itself for any other series of factors in $ab$. Hence $\frac{a}{c}$ and $\frac{b}{c}$ will always be a perfect square.


You must log in to answer this question.