Re: matrix log and exp [message #30345 is a reply to message #30300] |
Thu, 18 April 2002 12:39  |
jeyadev
Messages: 78 Registered: February 1995
|
Member |
|
|
In article <a9kgr4$ur8$1@scavenger.euro.net>,
G Karas <jacobianat@gmx.net> wrote:
> Hi group,
> one quickie and possibly difficult:
>
> IDL does not have a matrix logarithm logm and matrix
> exponent expm function. I was thinking of calling lapack
> routines which do it, but have no experience with lapack
> or FORTRAN. Anyone with any tips on this one?
It depends on the matrix. Can you diagonlise it? It so,
you are done. You will need a support package to do the
linear algebra, though.
If A is the matrix and you need exp(A), you proceed as
follows:
1. Find the eigenvalues and eigenvectors of A
such that A u_i = l_i u_i
where u_i is the i-th eigenvector and l_i is the
corresponding eigenvalue
2. Form the 'rotation' matrix R = [u_1 u_2 .... ]
where each e.vector becomes a column. The R' be
the transpose of A.
Now, the product R A R' is a diagonal matrix
with the eigenvalues l_i as its diagonal elements.
Its exponetial is just the diagonal matrix with
elements that are exp(l_i).
What you have done is find the exponential of the
matrix in the representation in which the original
A is diagonal. Call this diagonal matrix B.
B_ij = exp(l_i) d_ij
where d_ij is the Kronecker delta symbol.
3. Then, exp(A) = R' A R
The trick is to do the basic operation in the diagonal
representation and then transform back. If you can
write the operation as a power series, then can see
why this works.
The same should work for the logarithm, if the e.values
are all greater than zero.
--
Surendar Jeyadev jeyadev@wrc.xerox.bounceback.com
Remove 'bounceback' for email address
|
|
|