Example 3Clear[a,S]
In[43]:=
a={{2,-4,2,2},{-2,0,1,3},{-2,-2,3,3},{-2,-6,3,7}};
MatrixForm[a]
Out[43]=
2 -4 2 2 -2 0 1 3 -2 -2 3 3 -2 -6 3 7
In[44]:=
Eigenvalues[a]
Out[44]=
{2, 2, 4, 4}
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.
In[45]:=
Eigenvectors[a]
Out[45]=
{{2, 1, 0, 2}, {0, 1, 2, 0}, {0, 1, 1, 1}, {0, 0, 0, 0}}
Notice that the eigenvalue 2 has a full complement of eigenvectors, but the eigenvalue 4 does not.
In[46]:=
LinearSolve[a-4 IdentityMatrix[4],{0,1,1,1}]
Out[46]=
{1, -1, -1, 0}
In[47]:=
S=Transpose[{{0,1,1,1},{1,-1,-1,0},{2,1,0,2},{0,1,2,0}}];
MatrixForm[S]
Out[47]=
0 1 2 0 1 -1 1 1 1 -1 0 2 1 0 2 0
In[48]:=
Ja=Inverse[S].a.S;
MatrixForm[Ja]
Out[48]=
4 1 0 0 0 4 0 0 0 0 2 0 0 0 0 2
The following finds the characteristic polynomial of a.
In[49]:=
Det[a-x IdentityMatrix[4]]
Out[49]=
2 3 4
64 - 96 x + 52 x - 12 x + x
In[50]:=
Factor[Det[a-x IdentityMatrix[4]]]
Out[50]=
2 2
(-4 + x) (-2 + x)
Some shortcuts.
In[51]:=
am2I=a-2IdentityMatrix[4];
am4I=a-4IdentityMatrix[4];
Let's check (-4+x)(-2+x).
In[52]:=
MatrixForm[am4I.am2I]
Out[52]=
0 0 0 0 0 -4 2 2 0 -4 2 2 0 -4 2 2
Let's check (-4+x)^2 (-2+x).
In[53]:=
MatrixForm[am4I.am4I.am2I]
Out[53]=
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bingo, the minimal polynomial is (suitably written to be monic):
(x-4)^2 (x-2)
Recall the Jordan form of a.
In[54]:=
MatrixForm[Ja]
Out[54]=
4 1 0 0 0 4 0 0 0 0 2 0 0 0 0 2
Compare the size of the Jordan block for each eigenvalue with the multiplicity of that eigenvalue in the MINIMAL polynomial.