Jordan Form and Mathematica

Now that you get the idea, here's some good news: Mathematica can do this!


  ?JordanDecomposition


  MatrixForm[A]
  MatrixForm[JA]


  {s1,j1}=JordanDecomposition[A]


  MatrixForm[Inverse[s1].A.s1]
  MatrixForm[j1]


  MatrixForm[B]
  MatrixForm[JB]


  {s2,j2}=JordanDecomposition[B]


  MatrixForm[Inverse[s2].B.s2]
  MatrixForm[j2]


  MatrixForm[a]
  MatrixForm[Ja]


  {s3,j3}=JordanDecomposition[a]


  MatrixForm[Inverse[s3].a.s3]
  MatrixForm[j3]

Why is this slightly different? It is simply because of the ordering of the columns in S (or s3 here). Let's rearrange s3.


  MatrixForm[s3]


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


  MatrixForm[Inverse[newS].a.newS]

Up to Jordan Canonical Form