Given a linear map $\displaystyle f:V\longrightarrow V$, in the form of a square matrix A, I can calculate the characteristic polynimial $\displaystyle c\sb{f}(x)$ in x, which is det(A-xI).

How do I calculate the minimal polynomial $\displaystyle m\sb{f}(x)$? The minimal polymonial is defined as the unique polynomial with

(i) leading coefficient is 1 (for uniqueness)

(ii) it is the polynomial of least degree with $\displaystyle m\sb{f}(A) = 0$