I have a book that says that 6 and -6 are both greatest common divisors of 12 and 18, and thus a gcd is not uniquely defined. I have an obvious question about this. 6 >-6 so how is -6 also a gcd?
I believe they say this because the definition of GCD given in the book includes a condition that if T is GCD of a and b, then any other number, say r, that divides a and b will also be a factor of T. Then, when including all integers, 6 and -6 both can be divided by all other common factors of 12 and 18, namely 2,3,1,-1,-2 and -3. So I'm wondering is the usage of the word "greatest" in "greatest common divisor" something different than that usual meaning of the word that refers to ordering of numbers, if we are taking this over all integers and not just natural numbers? Maybe in a precise definition a modulus will be involved?
Good question. You have hit upon what will turn out to be the proper generalization in other rings.
The "greatest" that is the most useful is the one in the partial order on the integers determined by divisibility. Then among the common divisors of $a$ and $b$ there will be several that are greater than or equal to all the common divisors. Here "several" is just two, and one is the negative of the other. The positive one is the greatest in the usual order.
In the Gaussian integers (complex numbers of the form $a+bi$ for integers $a$ and $b$) any two elements will have four greatest common divisors of the form: $\pm g$ and $\pm ig$.