Example 3Clear[a,S]
a={{2,-4,2,2},{-2,0,1,3},{-2,-2,3,3},{-2,-6,3,7}};
MatrixForm[a]
Eigenvalues[a]
You notice that a has a repeated eigenvalue. This does not necessarily mean that a does not have a full complement of eigenvectors. Let's see.
Eigenvectors[a]
Notice that the eigenvalue 2 has a full complement of eigenvectors, but the eigenvalue 4 does not.
LinearSolve[a-4 IdentityMatrix[4],{0,1,1,1}]
S=Transpose[{{0,1,1,1},{1,-1,-1,0},{2,1,0,2},{0,1,2,0}}];
MatrixForm[S]
Ja=Inverse[S].a.S; MatrixForm[Ja]
The following finds the characteristic polynomial of a.
Det[a-x IdentityMatrix[4]]
Factor[Det[a-x IdentityMatrix[4]]]
Some shortcuts.
am2I=a-2IdentityMatrix[4]; am4I=a-4IdentityMatrix[4];
Let's check (-4+x)(-2+x).
MatrixForm[am4I.am2I]
Let's check (-4+x)^2 (-2+x).
MatrixForm[am4I.am4I.am2I]
Bingo, the minimal polynomial is (suitably written to be monic):
(x-4)^2 (x-2)
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.