Show that $\gcd(a,b)=\operatorname{lcm}(a,b)$ if and only if $a=b$. I know how to prove $a=b$ only if $\gcd(a,b)=\operatorname{lcm}(a,b)$, but I don't know how to prove the "if part". Can anyone help me?
 A: Hint: $\gcd(a,b)\le a,b$ and ${\rm lcm} (a,b)\ge a,b$.
A: Let $a<b$
Then:
$$\gcd(a,b)≤a$$
$$\operatorname{lcm}(a,b)≥b$$
Let $$\gcd(a,b)=\operatorname{lcm}(a,b)=x$$
since $$\gcd(a,b)≤a≤b≤\operatorname{lcm}(a,b)$$
so $$x≤a≤b≤x$$
so $a=b=x$
A: Hint: If $(a,g)\in \mathbb{N}^{*}\times \mathbb{N}^{*}$, $a$ divides $g$ and $g$ divides $a$, then $a=g$.
A: According to the fundamental theorem of arithmetic, for any $a,b$ we can write $$a=\prod_n p_n^{\alpha_n} ,b=\prod_n p_n^{\beta_n},$$ where $\{p_n \}$ is the increasing sequence of primes.
Now, $$gcd(a,b)=lcm(a,b) \Leftrightarrow \prod_n p_n^{\min(\alpha_n,\beta_n)}=\prod_n p_n^{\max(\alpha_n,\beta_n)} \Leftrightarrow \forall n \; \alpha_n=\beta_n \Leftrightarrow a=b.$$
A: A brain-dead approach to this problem would be to analyze the problem one prime at a time. Any positive integer can be uniquely represented by the number of times each prime divides that integer (i.e. its "prime factorization"). The $\text{lcm}$ and $\gcd$ are easy to express in this form....
