# The minimal polynomial

I've been given a matrix A and calculated the characteristic polynomial. Which is (1-λ)5. Given this how does one calculate the minimal polynomial?

Also just to check, is it correct that the minimal polynomial is the monic polynomial with lowest degree that satisfies M(A)=0 and that all the irreducible factors of the minimal polynomial divide the characteristic polynomial?

Given this I think the minimal polynomial is (1-λ)2 since (I-A)≠0 and (I-A)2=0 but this method to figure it out seems a little ad hoc.

A=
[1 1 0 0 0]
[0 1 0 0 0]
[0 0 1 1 0]
[0 0 0 1 0]
[0 0 0 0 1]

No, that's perfecty valid. The characteristic polynomial is $(1- \lambda)^5$ and the minimal polynomial is the polynomial, p, of lowest degree that is a factor of the characteristic polynomial and such that p(A)= 0. The obvious thing to do is to start with the factor of lowest degree, 1- x, that is a factor of that and see if I- A= 0. Since it does not, try $(I- A)^2$. I presume that did gives 0 but if it had not, you would then try $(I- A)^3$ and so on. There is nothing "Ad hoc" about using the definition of something.