# gcd finding method

An integer $d$ is a $\gcd$ of two non-zero integers $a$ and $b$, if

• $d$ divides $a$ & $d$ divides $b$

• '$c$ divides $a$ & $c$ divides $b$' implies '$c$ divides $d$' for any integer $c$.

If $e=gh$ where $e,g,h \in \{0,\pm1,\pm2,...\}, g\neq0$, then we say that $g$ divides $e$.

These are the definitions written in a maths book. The above definitions imply there are two gcd's, one a positive integer, another the negative of this positive integer. Am I correct? How can I find the gcd's? We find the hcf of │a│ and │b│ by division method, let it be $m \in \{1,2,\dots\}$. Then $m$ and $-m$ are the $\gcd$'s. Is this right?

• Usually textbooks are more careful, and define the gcd to be positive. – Gerry Myerson Jul 11 '13 at 13:22
• Yes, that is correct. Your book has decided not to distinguish one GCD as "the GCD." – Thomas Andrews Jul 11 '13 at 13:56
• As for finding the gcd, you can use the "Euclidean algorithm" - en.wikipedia.org/wiki/Euclidean_algorithm – Greg Martin Jul 20 '13 at 18:02