Diagonalizable/Minimal polynomial/Exercise

Let be a diagonalizable matrix. Show that the minimal polynomial of has the form

with different .