Let $a,b,m \in \mathbb{Z} $ prove that $m\gcd(a,b)=\gcd(ma,mb)$ iff $m>0$ and $a,b\neq 0$
def $\gcd(a,b)$
- $d|a$ and $d|b$
- $c|a$ and $c|b$ $\Rightarrow$ $c \leq d$
My attempt
$\Rightarrow ]$
If $m>0$ and $a,b \neq 0 $ ( need to show $\Rightarrow m\gcd(a,b)=\gcd(ma,mb)$)
Set $\gcd(a,b)=d$,
Now
- $md|ma$ and $md|mb$
- if $c|am$ and $c|bm$
so $m\gcd(a,b)=\gcd(ma,mb)$
$\Leftarrow ]$ if $ \gcd(ma,mb)=m\gcd(a,b)\Rightarrow m>0 $ and $a,b \neq 0$
So,
- $m\gcd(a,b)|ma$ and $m\gcd(a,b)|mb$
- $c|ma$ and $c|mb$ $\Rightarrow c \leq m \gcd(a,b)$
$\vdots$ foggy at this point
$\therefore$ $m>0$ and $a,b \neq 0$
I am not sure if my proof is correct. Appreciate any constructive help.