Find the elementary divisors of a matrix given its characteristic and minimal polynomials This question comes from and old exam: Suppose the square rational matrix $A$ has characteristic and minimum polynomials $p_A(x) = x^6(x^2-2)^3(x^2+4)^2$ and $m_A(x) = x^2(x^2-2)(x^2+4)^2$ and $null A = 4$. Determine the elementary divisors of $A$.
So, first of all I'm not sure how to find invariant factors just given these polynomials and not the matrix $A$ itself. I know that $m_A(x)$ is the largest invariant factor of $A$ by definition and $p_A(x)$ is the product of all the invariant factors. Also, I'm assuming all the divisors and factors should be rational here. So, given that $x^2$, $(x^2-2)$, and $(x^2+4)^2$ are surely elementary divisors. However, I'm not sure how to find the rest. Also, the $null A=4$ gives us the geometric multiplicity of eigenvalue $0$ which gives us what the jordan blocks corresponding to $0$ are, however, I'm not sure how this helps. Any thoughts?
 A: Your elementary divisors are primary, so powers of irreducible polynomials. Clearly the irreducible (over $\Bbb Q$) polynomials $x$, $x^2-2$ and $x^2+4$ are the only ones relevant here, and they can be considered independently. For each the power in $p_A$ gives the product of the elementary divisors for this irreducible, and the power in $m_A$ gives the largest factor. So we are looking for a partition of the exponent in $p_A$ with largest part the exponent in $m_A$. For $x^2+4$ that is a partition of $2$ with largest part$~2$, which clearly can only be $(2)$, while for $x^2-2$ that is a partition of $3$ with largest part$~1$, which can only be $(1,1,1)$. For $x$ however there is freedom: for a partition of $6$ with largest part $2$ we can have either $(2,2,2)$ or $(2,2,1,1)$. So here the information about the nullity of $A$ must come to the rescue: since each part for $x$ contributes a Jordan block for $\lambda=0$ and therefore contributes $1$ to the nullity, the $4$-part partition $(2,2,1,1)$ must be the right one.
A: Think about what can the Jordan normal form of the matrix be.
The nullity is the number of $0$-blocks (each $0$-block contains a single eigenvector). 
The size of these blocks are either $1$ or $2$ (because $x^2\,|\,m_A(x)$) that sum up to $6$. 
For this, the only possibility for the sizes of $0$-blocks is $2,2,1,1$.
The other eigenvalues ($\pm\sqrt2,\ \pm2i$) seem easy to deal with.
This way you will obtain a unique Jordan form, which determines the matrix up to similarity.
