comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » matrix log and exp
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: matrix log and exp [message #30345 is a reply to message #30300] Thu, 18 April 2002 12:39 Go to previous message
jeyadev is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Global variables
Next Topic: Chain-Link Algorithm for Perimeter

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:30:42 PDT 2025

Total time taken to generate the page: 0.00476 seconds