# Prove that if $a$ and $b$ are positive integers satisfying $\gcd(a,b)=\operatorname{lcm}(a,b)$,then $a=b$

Prove that if $a$ and $b$ are positive integers satisfying $\gcd(a,b)=\operatorname{lcm}(a,b)$,then $a=b$.

Since the formula for two positive integers $a,b$ is $\operatorname{lcm}(a,b)=\frac{ab}{\gcd(a,b)}$

As $\gcd(a,b)=\operatorname{lcm}(a,b)$, so $\gcd(a,b)\gcd(a,b)=ab$

• Note that $\gcd(a,b)\mid a$ and $\gcd(a,b)\mid b$, so $\gcd(a,b)\leq a$ and $\gcd(a,b)\leq b$. Jun 3 '16 at 5:39

I would probably do it differently, but we can use your equation as a start.

Note that if $d=\gcd(a,b)$, then $d\le b$. So $ab=d^2\le b^2$. It follows that $a\le b$. A similar argument shows that $b\le a$. It follows that $a=b$.

$a\mid\operatorname{lcm} (a,b)=\gcd (a,b)$ and $\gcd (a,b)\mid b$. So $a\mid b$.

By the same argument $b\mid a$ so $a=b$.

(Not to mention, if $x\mid y$ then $\gcd (x,y)=x$ and $\operatorname{lcm} (x,y)=y$.)

An ideal approach:
Let $(a)$ denote the principal ideal generated by $a$ in $\mathbb Z.$ Then we know $(a)\cap(b)=(\operatorname{lcm}(a,b))$ and the ideal $(a,b)$ generated by $a,b$ in $\mathbb Z$ is $(\gcd(a,b)).$ Then your condition means that $(a)\cap(b)=(a,b)$ contains both $(a)$ and $(b).$ Thus $(a)\cap(b)\supseteq(a)\implies(a)\subseteq(b)$ and $(a)\cap(b)\supseteq(b)\implies(b)\subseteq(a)$ so $(a)=(b),$ i.e. $a=ub$ for $u=\pm1.$ As $a,b\gt0,$ we conclude that $a=b.$

Hope this helps. :D

Hint $\ \gcd(a,b)\, \mid\, a,b\, \mid\, {\rm lcm}\,(a,b)$

Thus $\ \gcd(a,b) \le a,b \le {\rm lcm}\,(a,b)$

So  gcd = lcm $\, \Rightarrow \ a\!=\! b\$ by squeezing.