       E^A , A is a matrix, summary

• To: mathgroup at yoda.physics.unc.edu
• Subject: E^A , A is a matrix, summary
• Date: Wed, 22 Apr 92 15:14:23 EST

```Hi!
Thanks to the interest of the group I have the following replies to my
query: Does anybody have a routine to do e^A where A is atleast a 4 by 4
matrix ?

John C Wheeler writes

What about the "standard" procedure of writing A = MLM^-1 where L is the
diagaonal matrix of the eigenvalues of A and M is the matrix of
eigenvecors?
Then  exp(A) = M exp(L) M^-1, where exp(L) is, of course just the diagonal
matrix with elements that are the exponentials of the eigenvalues.  This
reduces the problem to the "standard" one of finding eigenvalues and
eigenvectors.

Alwyn Peter Allan says Mathematica 2.0 has MatrixExp[] that does it.
There are good and bad algorithms if you choose to code it.
See Lukes, Dahlard L.
Differential equations : classical to controlled / Dahlard L. Lukes. --
New

Jerry B. Keiper came up with both the above solutions too.  And Michael
Prange has written a little function that applies the above

matFun[mat_,fun_] :=
Module[{eval,evec},
{eval,evec} = Eigensystem[mat];
Transpose[Inverse[evec].DiagonalMatrix[fun[eval]].evec]
]

Roger B. Kirchner (rkirchne at mathcs.carleton.edu) has written a package
called MatrixReplace.m ( written using only features in  MMa 1.0) which just depends upon being able to find the eigenvalues.

A couple of examples.
Mathematica 2.0 for NeXT
-- NeXT graphics initialized --

In:= << matrixreplace.m

In:= A = {{2, 0}, {0, 3}}

Out= {{2, 0}, {0, 3}}

In:= MatrixReplace[E^(x t), x -> A]

2 t           3 t
Out= {{E   , 0}, {0, E   }}

In:= MatrixReplace[x^n, x -> A]

n           n
out= {{2 , 0}, {0, 3 }}

Of all these solutions, I found Roger's solution to be most suited for my
work.

Thanks to you all for your active interest.

regards,

bappa.

Ray W. Herrick Laboratories
Purdue University
West lafayette, IN 47907
(317) 494 2132
(317) 494 2147

```

• Prev by Date: Non-linear Curve Fitting
• Next by Date: how to compute determinants
• Previous by thread: Re: Non-linear Curve Fitting
• Next by thread: how to compute determinants