Exponential Map of Some Matrices

Authors

Georgi K. Dimitrov and Ivailo M. Mladenov
November 11, 2005

Function for extracting of the coefficients of the characteristic polynomial

ChPolKo[A_] := (n = Length[A]; f = Range[n + 1]; 
          f[[1]] = 1; 
For[(Subscript[N, 1]) = IdentityMatrix[n]; 
            f[[2]] = -Tr[A]; i = 1, i < n, i++, 
            (Subscript[N, 1]) = A . (Subscript[N, 1]) + f[[i + 1]] IdentityMatrix[n]; 
            f[[i + 2]] = -(1/(i + 1)) Tr[
                  A . (Subscript[N, 1]) ]]; 
f = Reverse[f]; 
          f = FullSimplify[f]; 
(((-1))^n) 
            f);

Function for calculating of the exponent of any 2 times 2 matrix

\(\(\(
\)\(
\)\(Exp2[
          F_] := \((f = ChPolKo[F]; 
If[
            Length[f] == 
              3, 
\ \ b = \((\(-1\))\)\ \ \ f[\([2]\)]; 
\ 
            a = \((\(-1\))\)\ \ f[\([1]\)]; 

If[
              b\^2 + \ 4\ a\  == \ 
                0, \ 
Exp[
                  b\/2] \((\((1 - b\/2)\)\ IdentityMatrix[2] + \ 
                    F)\), 
\((If[\(b\  + \@\(b\^2 + 4\ a\)\)\/2 == 0, u\  = \ \(b\  - \@\(b\^2 + 4\ a\)\)\/2, 
                  u\  = \ \(b\  + \@\(b\^2 + 4\ a\)\)\/2]; \ \ v = \ 
                  a\/u; 
\(Exp[u] - Exp[\(-v\)]\)\/\(u + v\)\ F\  + \ \ \(v\ Exp[u] + u\ Exp[\(-v\)]\)\/\(u + v\)\ IdentityMatrix[
                      2]
)\)
\ \ ]
, 
            Print["This function gets the exponent of 2 times 2 matrices and consigned matrix is not of such type!"]
]
)\);\)\)\)

Function for calculating of the exponent of 3 times 3 matrices  with characteristic polynomial of type -(x^3) + a (x^2)  +  
        b x

\(\(\(
\)\(\(Func1[x_] := 
        If[x == 0, \ 
          1, \(\(Exp[u]\)\(-\)\(1\)\(\ \ \)\)\/u\ ];\)


    \(Func2[x_] := 
        If[x == 
            0, \ \(-1\), \(\(Exp[\(-v\)]\)\(-\)\(1\)\(\ \ \)\)\/v\ ];\)

    \(Exp3[
          F_] := \((f = ChPolKo[F]; 
If[
            Length[f] == 4\  && \ 
              f[\([1]\)] == 
                0\ , 
\ \ b = \ \ f[\([3]\)]; 
\ 
            a = \ \ f[\([2]\)]; 
If[
              a == 0\  && \ b == 0, \ 
              IdentityMatrix[3]\  + \ 
                F\  + \ \(1\/2\) F . F\ , 
If[
                b\^2 + \ 4\ a\  == \ 
                  0, \ 
\(4\/b\^2\) \((\(-\ 
                          Exp[b\/2]\)\ F . F \((\ 
                          IdentityMatrix[3]\ \((1 - b\/2)\)\  + \ F)\)\  + 
                      b\ \ Exp[b\/2]\ F\ \ \((\ 
                          IdentityMatrix[3]\ \((1 - b\/2)\)\  + \ 
                            F)\)\ )\)
, 
\((If[\(b\  + \@\(b\^2 + 4\ a\)\)\/2 == 0, 
                    u\  = \ \(b\  - \@\(b\^2 + 4\ a\)\)\/2, 
                    u\  = \ \(b\  + \@\(b\^2 + 4\ a\)\)\/2]; \ \ v = \ 
                    a\/u; \ 
                  f\_2 = \(Func1[u] + Func2[v]\)\/\(u + v\); 
f\_1 = \(v\ \ Func1[u] - u\ \ Func2[v]\)\/\(u + v\); 
\ \ \ IdentityMatrix[3]\ \  + \ f\_1\ F\ \  + \ 
                    f\_2\ \ F . 
                        F\ )\)
\ \ ]
\ ]
, 
            Print[\*""This function gets the exponent of 3 times 3 matrices with characteristic polynomial of type  -(x^3) + a (x^2) +b x, and consigned matrix is not of such type!""]
]
)\);\)\)\)\)

Function for calculating of the exponent of  4 times 4 matrices  with characteristic polynomial of type (x^4) + a (x^2)  +  
        b

\(\(\(
\)\(\(Func3[x_] := 
        If[x == 0, \ 
          1, \(\(Sin[x]\)\(\ \ \)\)\/x\ ];\)


    \(Func4[x_] := 
        If[x == 0, \ 
          1, \(\(Sinh[x]\)\(\ \ \)\)\/x\ ];\)

    \(Exp4[
          F_] := \((f = ChPolKo[F]; 
If[
            Length[f] == 5\ \  && \ f[\([2]\)] == 0\  && \ 
              f[\([4]\)] == 
                0, 
\ \ b = \((\(-1\))\)\ \ \ f[\([3]\)]; 
\ 
            a = \((\(-1\))\)\ \ f[\([1]\)]; 
If[
              a == 0\  && \ b == 0, \ 
              IdentityMatrix[4]\  + \ 
                F\  + \ \(1\/2\) F . F\  + \ \(1\/6\) 
                  F . F . F, 
If[
                b\^2 + \ 4\ a\  == \ 
                  0, \ 
\(1\/\(2\ \@\(2\ b\)\)\) \((Exp[\@\(b\/2\)]\ \((F + \ \ \((1 - \@\(b\/2\))\)\ \ IdentityMatrix[
                                    4]\ \ )\) . \((F\  + \ 
                                IdentityMatrix[
                                    4]\ \@\(b\/2\)\ \ )\) . \((F\  + \ 
                                IdentityMatrix[4]\ \@\(b\/2\)\ \ )\)\  - \ 
                        Exp[\(-\@\(b\/2\)\)]\ \ \((F + \ \ IdentityMatrix[
                                    4]\ \ \((1 + \@\(b\/2\))\))\) . \((F\  - \ IdentityMatrix[4]\ \@\(b\/2\)\ \ )\)\  . \((F\  - \ 
                                IdentityMatrix[4]\ \@\(b\/2\)\ \ )\))\) . 
                    Inverse[
                      F], 
\((If[\(b\  + \@\(b\^2 + 4\ a\)\)\/2 == 0, u\  = \ \(b\  - \@\(b\^2 + 4\ a\)\)\/2, 
                    u\  = \ \(b\  + \@\(b\^2 + 4\ a\)\)\/2]; \ \ v = \ 
                    a\/u; \ 
                  f\_0 = \(v\ Cosh[\@u] + \ u\ Cos[\@v]\)\/\(u + v\); \ 
                  f\_1 = \(v\ Func4[\@u] + \ u\ \ Func3[\@v]\)\/\(u + v\); 
f\_2 = \(Cosh[\@u] - \ Cos[\@v]\)\/\(u + v\); \ 
                  f\_3 = \ \(\(\ \)\(Func4[\@u] - \ \ \ Func3[\@v]\)\)\/\(u + v\); 
f\_0\ \ \ IdentityMatrix[4]\ \  + \ f\_1\ F\ \  + \ 
                    f\_2\ \ F . F\  + \ 
                    f\_3\ F . F . 
                        F)\)
\ \ ]
\ ]
, 
            Print[\*""This function gets the exponent of 4 times 4 matrices with characteristic polynomial of type  (x^4) + a (x^2) +b, and consigned matrix is not of such type!""]
]
)\);\)\)\)\)

Function, which employs all above functions, for calculation  of some k times k matrices  with k=2,3 or 4

\(\(Exp234[
          F_] := \((
Which[Length[F] > 4, 
            Print["This function gets the exponent of some k times k matrices with k=2,3 or 4,  and consigned matrix is not of such type!"], 
Length[F] == 4, 
            Exp4[F]\ , \ 
Length[F] == 3, 
            Exp3[F]\ , \ 
Length[F] == 2, \ 
            Exp2[F]
]
)\);\)\)

Test

F=(({{0, 3, 4, 5}, {-3, 0, 7, 8}, {-4, -7, 0, 10}, {-5, -8, -10, 0}}));
MatrixForm[
      N[Exp234[F]]]
MatrixForm[N[MatrixExp[F]]]

Null

F=(({{10, 0, 6, 3}, {3, 5, 3, 5}, {9, 7, -10, -3}, {7, 11, 0, -5}}));
MatrixForm[
      N[Exp234[F]]]
MatrixForm[
      N[MatrixExp[F]]]
Null

F=(({{0, 3, 4, 5}, {-3, 0, 7, 8}, {4, 7, 0, 10}, {5, 8, -10, 0}}));
MatrixForm[
      N[Exp234[F]]]
MatrixForm[
      N[MatrixExp[F]]]
Null

F=(({{0, 1, 2}, {-1, 0, 5}, {-2, -5, 0}}));
MatrixForm[
      N[Exp234[F]]]
MatrixForm[
      N[MatrixExp[F]]]
Null

F=(({{1, 141}, {5, 55}}));
MatrixForm[
      N[Exp234[F]]]
MatrixForm[
      N[MatrixExp[F]]]
Null

((b  - (Sqrt[(b^2) + 4 a]))/2)

b = (-1)   f[[3]]

     a = (-1)  f[[1]]

(1/2) (-(Subscript[x, 1]^2) + (Subscript[x, 2]^2) + (Subscript[x, 3]^2) + (Subscript[x, 4]^2) + (Subscript[x, 5]^2) - 
          (Subscript[x, 6]^2) - (Sqrt[-4 (((-(Subscript[x, 3]) (Subscript[x, 4]) + (Subscript[x, 2]) (Subscript[x, 5]) + (Subscript[x, 1]) (Subscript[x, 6])))^2) + (((-(Subscript[x, 1]^2) + (Subscript[x, 2]^2) + (Subscript[x, 3]^2) + (Subscript[x, 4]^2) + (Subscript[x, 5]^2) - (Subscript[x, 6]^2)))^2)]))

((b  - (Sqrt[(b^2) + 4 a]))/2)

(1/2) (-(Subscript[x, 1]^2) + (Subscript[x, 2]^2) + (Subscript[x, 3]^2) + (Subscript[x, 4]^2) + (Subscript[x, 5]^2) - 
          (Subscript[x, 6]^2) - (Sqrt[-4 (((-(Subscript[x, 3]) (Subscript[x, 4]) + (Subscript[x, 2]) (Subscript[x, 5]) + (Subscript[x, 1]) (Subscript[x, 6])))^2) + (((-(Subscript[x, 1]^2) + (Subscript[x, 2]^2) + (Subscript[x, 3]^2) + (Subscript[x, 4]^2) + (Subscript[x, 5]^2) - (Subscript[x, 6]^2)))^2)]))