Computing a Factor Group I have a problem in computing (i.e. classify) a factor group.
For example The group Z*Z*Z/<(3,6,9)> is isomorphic to Z_3*Z*Z. I can show this by contructing a homomorphism f
f(a,b,c) = ( a mod 3 , 2*a - b, 3*a - c )
and then show that Ker(f) = <(3,6,9)>. 
It is not hard to see that Im(f) = Z_3*Z*Z.
But how would I compute e.g. Z*Z/<(9,12)> ?
I guess I could create a function 
f(a,b) =  ( a mod 9, 4*a - 3*b ).
then Ker(f) = <(9,12)>, but what is the image?
 A: Notice that (3,6,9) = 3 (1,2,3) and that {(1,2,3)} can be extended to a basis of the free module Z3.  That's why you get Z3 x Z2 when taking the quotient. Likewise, (9,12) = 3 (3,4) and {(3,4)} can be extended to a basis of Z2. Why? (Hint: 3 is the gcd of 9 and 12 as javier writes.)  So what should you get as a quotient?
Things get more interesting if you take the quotient of Zn by a bunch of vectors (ie. the subspace they span).  Then computing the gcd is replaced by obtaining the Smith normal form of the matrix formed by these vectors.
A: Since Z is a PID, it has projective dimension 1.  Actually, a submodule of a free module is free!  There is an obvious resolution of a quotient M of Z^n by the span of m vectors:

0 --> Z^m --> Z^n --> M

The (n×m)-matrix for the middle map has columns that are the given vectors.  Reduction of this matrix to its Smith normal form (think row and column operations and some reductions using GCDs), one can read off the elementary divisors.
Your first example has first column (3,6,9)T and zeroes in the other columns.  Using row operations, we get a diagonal matrix with diagonal (3,0,0).  These are the elementary divisors.  Your group is Z/3⊕Z⊕Z.
A: Since 4 and 3 are coprime, you can obtain every integer as 4a-3b for some a and b, and thus the image is isomorphic to Z/(9) x Z.
In general, for each factor you get the quotient of Z by the ideal generated by the gcd of the coefficients in your expression.
EDIT Sorry for the confusion, wrote too quickly, hope this clarifies better:
Imagine that you are working on R^3 (real vectors). If you take any nonzero vector v and quotient our R^3/(v) you always get something that is isomorphic to R^2, right?
Well, sort of the same thing is true for Z, but now you need to care about gcd's; take your vector v=(9,12); you cannot extend it to a basis of Z^2 because it has a nontrivial gcd, so write it as 3(3,4). Now, take a vector extending (3,4) to a basis of Z^2, for instance (0,1) (1,1). Now, every element v in Z^2 can be written in a unique way as  v = a(3,4) + b(1,1); if you quotient out by (3,4), you'd only have the 'b' term, getting a free part of rank one. but you have the 3 multiplying , so the image ox v under the quotient is (a mod 3, b), and thus you get as a quotient Z/(3) x Z. In general, if you take Z^n/(w) the result will be Z^(n-1) x Z/(gcd(w)).
For the case in which you take quotient by the submodule spanned by more than one vector, ref the answer by Armin and the reference to Smith form.
