How to show that gcd(|a|,|b|) = gcd(a,b) ? I tried many ways but not convinced that im doing it right. i tried to look at different scenarios where :
a,b>0
a,b<0
a>0,b<0
but I know I am doing it totally wrong.
How to show that gcd(|a|,|b|) = gcd(a,b) ? I tried many ways but not convinced that im doing it right. i tried to look at different scenarios where :
a,b>0
a,b<0
a>0,b<0
but I know I am doing it totally wrong.
Show that every common divisor of $a$ and $b$ is also a common divisor of $|a|$ and $|b|$. Then vice verse. Since the set of common divisors of $a$ and $b$ is the same as the set of common divisors of $|a|$ and $|b|$, the largest element in each set has to be the same.
Another way is to invoke Bezout. If $d=\gcd(a,b)$ then there exist integers $x$ and $y$ so that $d=ax+by$. By adjusting the signs on $x$ and $y$ you can get a similar expression for $\gcd(|a|,|b|).$