If $a | b$, prove that $\gcd(a,b)$=$|a|$. 
If $a | b$, prove that $\gcd(a,b)$=$|a|$.

I tried to work backwards. If $\gcd(a,b)=|a|$, then I need to find integers $x$ and $y$ such that $|a|=xa+yb$. So if I set $x=1$ and $y=0$ (if $|a|=a$) or if I set $x=-1$ and $y=0$ (if $|a|=-a$), is this good enough?

Hint:-Use Bezout's theorem.Express the GCD in the form $ax+by$ and prove that there is a common factor in the GCD and $a$ & $b$.
