Proving that Matrices with same minimal and characteristic polynomial are similar I know that this statement is not in general true: however I need to prove the above statement under additional conditions.
I am given $A,B$ matrices $5\times 5$ over the complexes that have the same minimal and characteristic polynomial; furthermore, at least three eigenvalues are different.
I need to prove that $A$ and $B$ are similar.
Why is fundamental that at least three eigenvalues are different?

The condition on 3 distinct eigenvalues is fundamental for the matrices of order 5 (higher orders would need more distinct eigenvalues), because if there were fewer distinct eigenvalues, the statement would be false. Look at this example:
$$A = \begin{bmatrix} \lambda_1 \\ & \lambda_2 & 1 \\ && \lambda_2 \\ &&& \lambda_2 & 1 \\ &&&& \lambda_2 \end{bmatrix}, \quad B = \begin{bmatrix} \lambda_1 \\ & \lambda_2 \\ && \lambda_2 \\ &&& \lambda_2 & 1 \\ &&&& \lambda_2 \end{bmatrix}.$$
They have the same characteristic polynomial $p(t) = (t-\lambda_1)(t-\lambda_2)^4$ and the same minimal polynomial $\mu(t) = (t-\lambda_1)(t-\lambda_2)^2$, but they are obviously not similar.
This is because the multiplicity of $\lambda$ in the minimal polynomial is the size of its largest Jordan block. If you have enough freedom to fit more than one block of size strictly greater than $1$ for the same eigenvalue, you can make an example similar to the one above, so in those cases the statement isn't true.
Now that we have shown how we could create a counter example in the case of only 2 (or less) distinct eigenvalues, we can analyze the case with 3 or more.
With 3 distinct eigenvalues (but 5 in total), you can have either:


*

*1 of them with a Jordan block of order 3, and 2 with Jordan blocks of order 1, all three mutually different; or

*1 of them with a Jordan block of order 2, and 3 with Jordan blocks of order 1, with two among these 3 being identical, or

*1 of them with a Jordan block of order 2, and 3 with Jordan blocks of order 1, with one among these 3 being equal to the one in the "big" Jordan block, or

*2 of them with Jordan blocks of order 2, and 1 with a Jordan blocks of order 1, all three mutually different.
Now notice that either the characteristic or the minimal polynomial will be different between any two of these cases.
For 4 distinct eigenvalues, the analysis is similar (albeit simpler), while 5 distinct eigenvalues would be trivial (diagonalizable matrices with the same eigenvalues).
