I am self-studying the book Linear Algebra from Hoffman and Kunze. The authors make the following comment in the page 196. (Second edition)
If $f=(x-c_{1})^{d_{1}}\cdots(x-c_{k})^{d_{k}}$, $c_{1},...,c_{k}$ distinct, $d_{i}\geq 1$ and $p=(x-c_{1})^{r_{1}}\cdots(x-c_{k})^{r_{k}}$, $1\leq r_{j}\leq d_{j}$. We can find an $n\times n$ matrix which has $f$ as its characteristic polynomial and $p$ as its minimal polynomial. We shall not prove this now.
How do we prove this theorem?