Invariant factors and elementary divisors of an abelian group I have to find the elementary divisors and invariant factors of :
$$ \mathbb Z_6\oplus\mathbb Z_{20}\oplus\mathbb Z_{36}$$
I'm following this.
I think that elementary divisors are $\{2,2^2,2^2,3,3^2,5\}$, just using the prime decomposition of $\{6,20,36\}$.
Using the web I've put above, the invariant factor decomposition is 
$$ \mathbb Z_2\oplus\mathbb Z_{12}\oplus\mathbb Z_{180}$$
However, I have written in my notes that the invariant factors are $\{2,2,6,6,30\}$.
I'd like to know which is the right option and where and why I'm wrong.
Thanks in advance.
 A: $\mathbb Z_2\oplus\mathbb Z_{12}\oplus\mathbb Z_{180}$ is right.
Your notes must be wrong because if the invariant factors were $\{2,2,6,6,30\}$ then there wouldn't be an element of order $36$ but $\mathbb Z_6\oplus\mathbb Z_{20}\oplus\mathbb Z_{36}$ has an element of order $36$ coming from $\mathbb Z_{36}$. This also gives elements of order $4$, $9$, $12$, which are not in $\{2,2,6,6,30\}$.
A: if you have $Z_6\oplus Z_{20} \oplus Z_{36}$, you can get the invariant factors and elemental divisor as follow:

*

*Elemental divisors:
$6 = 2\cdot 3$
$20 = 2^2\cdot 5$
$36 = 2^2\cdot 3^2$
The prime decomposition give you the elemental divisors $\{2^2, 2^2, 2, 3^2, 3, 5\}$


*Invariant factors:

Now make the following table with the elemental divisors
$$
 2^2\ \ 2^2\  2 \\
 3^2\  3\  - \\
 5\  -\  - 
$$
as you see first row is for the $2$ and sorted from the highest power to the lowest, second row is the same with the $3$ and so on. Then multiplying by columns you will have: $2^2\cdot 3^2\cdot 5 = 180$, $2^2\cdot 3 = 12$ and $2$ then invariant factors will be $\{180, 12, 2\}$ as you see $12$ divides $180$, $2$ divides $12$ and $2$ divides $2$ then the decomposition is
$$
Z_{180}\oplus Z_{12}\oplus Z_2
$$
