Example 2MatrixForm[B]
The following finds the characteristic polynomial of B.
Det[B-x IdentityMatrix[4]]
Factor[Det[B-x IdentityMatrix[4]]]
Some shortcuts.
Bm2I=B-2IdentityMatrix[4]; Bm5I=B-5IdentityMatrix[4];
Let's check (-5+x)(-2+x).
MatrixForm[Bm5I.Bm2I]
Let's check (-5+x)(-2+x)^2.
MatrixForm[Bm5I.Bm2I.Bm2I]
By default (and the Cayley-Hamilton Theorem), the minimal polynomial is the
characteristic polynomial (suitably written to be monic):
(x-2)^3 (x-5)
Recall the Jordan form of B.
MatrixForm[JB]
Compare the size of the Jordan block for each eigenvalue with the multiplicity of that eigenvalue in the MINIMAL polynomial.