<s>[INST] Invariant Factors Example I am having trouble undering the relation between invariant factors and it related notions. Could someone help walk me through the following example, which will hopefully clarify things?
Let $T$ be a linear endomorphism on finite-dimensional vector space $V$ over the complex numbers, and let the matrix
$$
\left( \begin{matrix} x^2(x-1)^2 & 0 & 0 \\ 0 & x(x-1)(x-2) & 0 \\ 0 & 0 & x(x-2)^2 \end{matrix} \right).
$$ 
be the relation matrix of $V$ when views as a $\mathbb C [x]$ module under the operation $x \cdot \alpha = T(\alpha )$, for any element $\alpha$ in $V$, with respect to the generators $\{v_1, v_2, v_3\}$.
What are the invariant factors of $T$? Are they just $x^2(x-1)^2$, $x(x-1)(x-2)$, $x(x-2)^2$ or does this matrix need to be adjusted so that the first invariant factor divides the second, et cetera. 
What are the elementary divisors of $V$? From this, what is the Jordan form of $T$?
 [/INST] Let $A$ be your matrix. As you suspect, the invariant factors are not just the diagonal entries of $A$. This is clear since they do not satisfy the divisibility condition you mention. However, we can easily obtain the elementary divisors since $A$ is diagonal. As a $\mathbb{C}[x]$-module, we have
\begin{align*}
V &\cong \frac{\mathbb{C}[x]}{(x^2(x-1)^2)} \oplus \frac{\mathbb{C}[x]}{(x(x-1)(x-2))} \oplus \frac{\mathbb{C}[x]}{(x(x-2)^2)}\\
&\cong \frac{\mathbb{C}[x]}{(x^2)} \oplus \frac{\mathbb{C}[x]}{((x-1)^2)} \oplus \frac{\mathbb{C}[x]}{(x)} \oplus \frac{\mathbb{C}[x]}{(x-1)} \oplus \frac{\mathbb{C}[x]}{(x-2)} \oplus \frac{\mathbb{C}[x]}{(x)} \oplus \frac{\mathbb{C}[x]}{((x-2)^2)}
\end{align*}
by the Chinese Remainder Theorem. Thus the elementary divisors of $A$ are
$$
x,x,x^2, x-1, (x-1)^2, x-2, (x-2)^2 \, .
$$
We can recombine these into the invariant factors $a_1, a_2, a_3$. The largest invariant factor must be divisible by all the elementary divisors, so $a_3 = x^2 (x-1)^2 (x-2)^2$. Looking at what's left, we find that $a_2 = x(x-1)(x-2)$, and finially that $a_1 = x$.
But finding the invariant factors is not actually necessary to compute the Jordan form. From the list of elementary divisors, we see that $T$ has Jordan canonical form
$$
J =
\left(\begin{array}{r|r|rr|r|rr|r|rr}
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 &
0 \\
\hline
 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 &
0 \\
\hline
 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 &
0 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 &
0 \\
\hline
 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 &
0 \\
\hline
 0 & 0 & 0 & 0 & 0 & 1 & 1 & 0 & 0 &
0 \\
0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 &
0 \\
\hline
 0 & 0 & 0 & 0 & 0 & 0 & 0 & 2 & 0 &
0 \\
\hline
 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 2 &
1 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 &
2
\end{array}\right) \, .
$$
See $\S12.3$ (p. 491) of Dummit and Foote for more on how to obtain the Jordan form from the list of elementary divisors.
</s>