Diagonal and Diagonalizable Matrices

Recall that Exp[At]=I+At+(At)^2/2!+(At)^3/3!+ . . .
This is a mess. However, if we have a diagonal matrix D we get:

In[11]:=

  MatrixForm[d]
  MatrixForm[MatrixExp[d]]

Out[11]=

  1   0   0   0
  
  0   2   0   0
  
  0   0   3   0
  
  0   0   0   4

Out[12]=

  
  E    0    0    0
  
        2
  0    E    0    0
  
             3
  0    0    E    0
  
                  4
  0    0    0    E

Wonderful!

And if A is not diagonal, but diagonalizable? Remember that if A=S.D.Inverse[S], then MatrixPower[A,n]=S.MatrixPower[D,n].Inverse[S], so calculating the powers in the definition of Exp[tA] is not so bad:

Exp[At]=I+At+(At)^2/2!+(At)^3/3!+. . .
=I+SDtInv(S)+S(Dt)^2Inv[S]/2!+S(Dt)^3Inv[s]+. . .
=SInv[S]+SDtInv(S)+S(Dt)^2Inv[S]/2!+S(Dt)^3Inv[s]/3!+. . .
=S{I+Dt+(Dt)^2/2!+(Dt)^3+ . . .}Inv[S]
=SExp[Dt]Inv[S]

Let's check:

In[13]:=

  MatrixForm[a]
  MatrixForm[s.lambda.Inverse[s]]

Out[13]=

  1    -1   0
  
  -1   2    -1
  
  0    -1   1

Out[14]=

  1    -1   0
  
  -1   2    -1
  
  0    -1   1

In[15]:=

  MatrixForm[MatrixExp[a]]
  MatrixForm[s.MatrixExp[lambda].Inverse[s]]

Out[15]=

           3        3                3
  1   E   E    1   E        1   E   E
  - + - + --   - - --       - - - + --
  3   2   6    3   3        3   2   6
  
       3              3          3
  1   E        1   2 E      1   E
  - - --       - + ----     - - --
  3   3        3    3       3   3
  
           3        3                3
  1   E   E    1   E        1   E   E
  - - - + --   - - --       - + - + --
  3   2   6    3   3        3   2   6

Out[16]=

           3        3                3
  1   E   E    1   E        1   E   E
  - + - + --   - - --       - - - + --
  3   2   6    3   3        3   2   6
  
       3              3          3
  1   E        1   2 E      1   E
  - - --       - + ----     - - --
  3   3        3    3       3   3
  
           3        3                3
  1   E   E    1   E        1   E   E
  - - - + --   - - --       - + - + --
  3   2   6    3   3        3   2   6

O.K.

Up to The Matrix Exponential