Two square matrices with the same minimial polynomial are similar for $n=5$ or $n=6$ Let $\mathbb{F}$ be a field, $\lambda \in \mathbb{F}$ and $A,B \in M_n(\mathbb{F})$ such that $m_A(x)=m_B(x)=(x-\lambda)^k$ and such that the geometric multiplicity of $\lambda$ in $A$ equals to the geometric multiplicity of $\lambda$ in $B$.
a. Prove that for $n=5$ or $n=6$- $A$ and $B$ are similar
b. Find an example for $n=7$ for which $A$ and $B$ are NOT similar  
My main question here is whether I should try proving it for $n=5$ and $n=6$ seperately? Or should I try proving it for any $n$ and then observe that it holds only for $n=5$ or $n=6$?
Plus, any hints or suggestion regarding my main question or the question above will be welcome
 A: For n = 7 consider jordan blocks $(3,2,2)$ and $(3,3,1)$ both these have algebraic and geometric multiplicity $3$, but are not similar. That is, consider matrices $A, B$ such that,
$\chi_A = (x- \lambda)^3(x- \lambda)^3(x- \lambda)^1$ and $\chi_B = (x- \lambda)^3(x- \lambda)^2(x- \lambda)^2$ 
For $n > 7$ append rest to these jordan blocks as i.e. blocks $(3,2,2,1, \dots ,1)$ and $(3,3,1,1, \dots ,1)$ to get examples of non-similar matrices. For the case of $n = 5$ and $n = 6$, we can list out the possible Jordan blocks and show that this kind of a configurations are not possible. This is not an elegent proof.
A: What is a stake here is the collection (multiset) of sizes of Jordan blocks (all for the unique eigenvalue$~\lambda$) that occur; these must be identical for the matrices to be similar. Being a multiset, order does not matter, so we may arrange the sizes in weakly decreasing order. What is fixed is the sum $n$ of the sizes, and the largest size$~k$, as well as the number$~d$ of (nonzero) sizes, which is the geometric multiplicity. It is easy to see that these informations determine the multiset if one of $k\leq2$ or $d\leq 2$ or $k+d\leq n$ holds. Therefore an example of non-similar matrices requires $k\geq3$ and $d\geq3$ and $n\geq k+l+1\geq 7$. Thus the matrices must be similar if $n\leq6$. For $n=7$, Jordan normal forms with Jordan blocks having sizes $(3,3,1)$ respectively $(3,2,2)$ gives an example of non-similar matrices, for $k=d=3$.
See also What are examples of two non-similar invertible matrices with same minimal and characteristic polynomial and same dimension of each eigenspace? and How can one find Jordan forms, given the characteristic and minimal polynomials? and this answer.
