How to prove that for all positive integers $a,b$, if $a|b$ , then $\gcd(a,b) = a$?

245 Views Asked by At

I don't believe there are any counter examples that can be used for this (I think it is true). Could someone help me prove it?

I understand why it's true (if I was right about that), but the proof itself is a bit tricky.

3

There are 3 best solutions below

2
On

Suppose that $a,b>0$ and $a|b$.

  1. $a$ is a common divisor of $a,b$.
  2. If $c$ is also a common divisor of $a,b$, then $c|a$.

This is the usual definition of gcd.

3
On

On one hand, and since everything's positive here, $\;gcd(a,b)\le a,b\;$ , but on the other $\;a\mid a\;\;and\;\;a\mid b\;$ , so

$$a\le gcd(a,b)\le a\implies gcd(a,b)=a$$

0
On

If $a|b$, then there is some integer $n$ such that $b = na$. Now the Euclidian algorithm says that $$ \gcd(a, b) = \gcd(a, na) = \gcd(a, na - na) = \gcd(a, 0) = a $$