# $A$ and $B$ be $n \times n$ matrices over the field $\mathbb F$ which have the same characteristic polynomial

Lemma: Let $$N_1$$ and $$N_2$$ be $$3 \times 3$$ nilpotent matrices over field $$\mathbb F$$. Then, $$N_1$$ and $$N_2$$ are similar if and only if they have the same minimal polynomial.

Use the result above and the Jordan form to prove the following:

Theorem: Let $$A$$ and $$B$$ be $$n \times n$$ matrices over the field $$F$$ which have the same characteristic polynomial $$f = (x - C_1)^{d_1} \cdots (x - C_k)^{d_k}$$ and the same minimal polynomial. If no $$d_i$$ is greater than $$3$$, then $$A$$ and $$B$$ are similar.

My idea is to leave $$A$$ and $$B$$ in the form of Jordan and separate $$A = D + N$$ and $$B = D_0 + N_0$$ with $$D, D_0$$ diagonal and $$N, N_0$$ nilpotent matrices. Hence we have that $$D$$ is similar to $$D_0$$ because both are diagonal matrices with the same eigenvalues ​​less than order. For $$N$$ and $$N_0$$ I would break both matrices in direct sum with blocks of sizes $$d_i \times d_i$$. He would use the minimal polynomials of each piece of the direct sum of $$N$$ and $$N_0$$ to coincide and use the Lemma of the beginning. Then each matrix of the direct sum of one would be similar to the other. I think this argument is not right because even if they are similar $$D$$ and $$D_0, N$$ and $$N_0$$, what guarantees that the sum is similar? Any suggestion?

Your argument basically works. Choosing and concatenating bases of each of the generalised eigenspaces, we obtain changes of basis that respectively make $$A$$ and $$B$$ block diagonal matrices $$A'$$ respectively $$B'$$ with square blocks of sizes $$d_1,d_2,\ldots,d_k$$. One gets characteristic and minimal polynomials of each block$$~i$$ by taking the power of $$(x-C_i)$$ in the common characteristic respectively minimal polynomial of $$A$$ and $$B$$, and then as you argued $$d_i\leq3$$ implies that each block of $$A'$$ is conjugate to the corresponding block of $$B'$$.
Finally if one takes the change of basis matrices $$P_i$$ that perform these individual conjugations, then the block diagonal matrix with blocks $$P_1,\ldots,P_k$$ will conjugate $$A'$$ to $$B'$$.