Example 1


  A={{1,1,-1},{0,0,2},{0,-1,3}};
  MatrixForm[A]

The following finds the characteristic polynomial of A.


  Det[A-x IdentityMatrix[3]]

As you know, the zeroes of the characteristic polynomial are the eigenvalues of A. The minimal polynomial also has a zero at each eigenvalue (though possibly with a smaller multiplicity). Let's factor the characteristic polynomial to help us find the minimal polynomial.


  Factor[Det[A-x IdentityMatrix[3]]]

We will use a very unsophisticated method to find m(x), namely we will test all polynomials with the same zeroes (watch the multiplicity!) of degree smaller than the characteristic polynomial.

For matrices, A.A.A=A^3. In Mathematica you calculate this using A.A.A or MatrixPower[A,3]. Let's check (2-x)(-1+x)=-x^2+3x-2, actually as a monic polynomial this is x^2-3x+2.


  MatrixForm[A.A-3A+2IdentityMatrix[3]]

As you can see, (2-x)(-1+x) is not the minimal polynomial. By default (and the Cayley-Hamilton Theorem), the minimal polynomial is the characteristic polynomial (suitably written to be monic).

Recall the Jordan form of A.


  MatrixForm[JA]

Compare the size of the Jordan block for each eigenvalue with the multiplicity of that eigenvalue in the MINIMAL polynomial.

Up to Jordan Form and Minimal Polynomials