Q:

Proving matrix similarity based on relationship between characteristic and minimal polynomials

Let $A,B$ be two $n \times n$ complex matrices which have the same minimal polynomial $M(t)$ and the same characteristic polynomial $P(t) = (t-\lambda_1)^{a_1}\cdots(t - \lambda_k)^{a_k},$ where $\lambda_i \neq \lambda_j$ for $i \neq j.$ 
Prove if $P(t)/M(t) = (t-\lambda_1)\cdots(t-\lambda_k),$ then $A$ and $B$ are similar.

A:

We use the following key facts. 
i) $P(t)$ is the product of all its invariant factors. 
ii) if $f_1, \cdots f_k$ are you invariant factors, we have $f_1 | f_2 | \cdots | f_k$.  
ii) The minimal polynomial is the largest invariant factor.
iii) $M(t)$ has the same irreducible factors as $P(t)$.  
iv) If two matrices have the same invariant factors, they will have the same Jordan form and thus be similar.   
From what you stated, $P(t)/ M(t)$ is a product of distinct linear factors.   
What are the possible invariant factors?  
$M(t)$ is one of them and from what you have above, 
$$M(t) = ( t - \lambda_1)^{a_1-1} \cdots (t-\lambda_n)^{a_n-1} $$
The next one must divide $M(t)$.    
Using the properties above, what is your only other invariant factor? 

