1

I proceeded like this. Let $a \leq b$.

Since $gcd(a,b)=lcm(a,b)$, then $gcd(a,b)^2=ab$

Now $gcd(a,b)=\pm\sqrt ab$ which is an integer. So b must be of the form $am^2$

so the numbers are a and $am^2$ whose gcd is clearly a. hence $gcd(a,b)=a=\pm am$ which implies $m=\pm 1$

so $b=am^2=\pm a$ which is proved. I do not know how to prove the converse.

Bill Dubuque
  • 272,048

3 Answers3

2

Let $g$ be the gcd, then there are integers $u$ and $v$ with no common factors such that $$a=gu, b=gv.$$

Then the lcm is $|guv|$ and so the lcm is $g$ if and only if $|uv|=1$ i.e. $|a|=|b|$.

0

A variant approach is to just show that for natural numbers, using the fundamental theorem of arithmetic the lcm is just the product of the primes to the max of the exponents present in either number, and the gcd is the product of the primes to the min of the exponents present in each number. So if lcd=gcd, the exponent for each prime in the prime factorization is the same. Extending this to integers gets you the $\pm$

Alan
  • 16,582
0

You can prove it reducing to absurdity.

Suppose $ \lvert a \rvert \neq \lvert b \rvert$.

Then $ gcd(a,b) \leq min(\lvert a \rvert,\lvert b \rvert) < max(\lvert a \rvert,\lvert b \rvert) \leq lcm(a,b) $.

We get $gcd(a,b) < lcm(a,b)$ so that would mean $gcd(a,b) \neq lcm(a,b) \ !!$

The other implication is obvious given that $gcd(a,-a) = a = lcm(a,-a)$