# [Fwd: Re: Matrix Log]

• Subject: [Fwd: Re: Matrix Log]
• From: Ron Boisvert <boisvert@nist.gov>
• Date: Mon, 12 Dec 2005 10:15:23 -0500
• Content-Transfer-Encoding: 7bit
• Content-Type: text/plain; charset=us-ascii; format=flowed
• User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414

```Sender: Niko Brummer <niko.brummer@gmail.com>
Subject: Re: Matrix Log

If your matrix is symmtric and positive definite (all eigenvalues >0)
then a matrix log is easy.

1. Diagonalize the matrix by doing an eigen-analysis to get
eigenvectors and values. (Jama can do this):

Given an input matrix M, you will have:

M = V * D * V'

where V is a matrix of eigenvectors and D is the diagonal eigenvalue matrix.

2. Take the log of all the eigenvalues. I.E. let L be the same as D,
where you have replaced the elements on the diagonal by their logs.

3. Re-assemble the matrix by multiplication.

logm(M) = V * L * V'

Niko Brummer

On 06/12/05, Cleve Moler <Cleve.Moler@mathworks.com> wrote:
> We have matrix log in MATLAB, but I doubt you will find it in Java.
>  -- Cleve Moler
>
> -----Original Message-----
> From: jama@nist.gov [mailto:jama@nist.gov] On Behalf Of lfrench@sfu.ca
> Sent: Tuesday, December 06, 2005 7:54 AM
> To: Multiple recipients of list
> Subject: Matrix Log
>
> Hello,
>
> I'm looking for a matrix log function that I can call from java.  I
> could
> not find it in JAMA, does anyone know if it exists in a JAMA or a
> different
> java matrix package?  I welcome any suggestions or advice
>
> Thanks,
>
>
>
>
>
>
>
>
>
>

```

Date Index | Thread Index | Problems or questions? Contact list-master@nist.gov