- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I have the following problem:

I have a real matrix A=nxn and I would like to compute theeigenvector matrix R and diagonal eigenvalue matrix L with mkl libraries.

I don't know what subroutine I could use.

I have already useddgeev_f95 for other purpose but Id give to me vector and not matrix

thank a lot

Link Copied

9 Replies

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Please state if you know anything more about the matrix A, and explain why you found the output of GEEV unsatisfactory.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

ok, thanks for your help and advices.

The matrix A is a real matrix nxn

The GEEV gives to me the vector of eigenvalues, while I need the matrix of eigenvalues.

this because I need to comute:

Q= 0.5*R*(Id+sign(L-xi*Id))*iR*QL + 0.5*R*(Id-sign(L-xi*Id))*iR*QR;

where Q is n vector,

R is the eigenvector matrix and

L is diagonal eigenvalue matrix.

QR is n vector and QL is n vector.

Id is the nxn identity matrix.

IR isthe inverse of the eigenvector matrix R

Geev does not give me the L in matrix form.

thanks a lot

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

(i) xi is a scalar, yes?

(ii) How is the function sign() defined when it operates on (a) a diagonal matrix and, if this is meaningful, (b) a vector?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

i) xi is a scalar (my adimensinal coordinate)

ii) for example:

L= 1.4142 0

0 -1.4142

then sign(L)= 1 0

0 -1

Thanks a lot

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Let M

_{1}be a diagonal matrix, with elements

_{i}= +1 if

_{i}> and 0 if

_{i}<

Let matrix S

_{1}= R.M

_{1}. You can compute column j of S

_{1}by multiplying column j of R by

_{j}. Then, you can compute the first part of the desired result q = q

_{1}+ q

_{2}as

q

_{1}= S

_{1 }R

^{-1 }q L

You can compute the second part q

_{2}similarly, using M

_{2}= the 1s-complement of M

_{1}and qR in place of M

_{1}and qL, respectively.

Throughout what I wrote, you would compute the produce q L not as a vector-matrix product, but simply by multiplying each element of q by the corresponding . That is, computing q L is an element-by-element product of two vectors, q and diag(L).

Please check the equations, since some browsers may not display subscripts, etc. correctly. For example Firefox 3.16 does not show the inverse ("-1") in the equation for q1 correctly, but IE does.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

This because After that I use the some source code for a more complex problem.

If I had L a could compute Q with somematmul function. this is the main reason because I ask for a different mls-lapack library, to compute

L as a11 0

0 a22

and not as L

a11

a22

what do you think about it?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

^{-1}b is fine in a mathematics book or a mathematical derivation. However, computing the inverse explicitly and then multiplying the vector b by the inverse takes twice the computational effort and is often going to give less accurate results than Gaussian elimination with partial pivoting.

Multiplying two diagonal matrices of size n X n takes O(n) operations if done right, and O(n

^{3}) operations if the full matrices are used in a MATMULT call.

Please read a book such as Golub and van Loan's

*Matrix Computations*.There are also many good articles on this topic on the Web.

For these reasons, I think that I would be doing you a disservice by telling you how to form a diagonal matrix from a vector containing the main diagonal. Not only is that trivial to do, but doing it is a temptation that I wish to help you avoid.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I'm sorry for delay. So what do you suggest for:

Q= 0.5*R*(Id+sign(L-xi*Id))*iR*QL + 0.5*R*(Id-sign(L-xi*Id))*iR*QR;

to compute Q,

could I use some lapack libraries? or solve them in anothe way?

thanks a lot

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I'm sorry for delay. So what do you suggest for:

Q= 0.5*R*(Id+sign(L-xi*Id))*iR*QL + 0.5*R*(Id-sign(L-xi*Id))*iR*QR;

to compute Q,

could I use some lapack libraries? or solve them in anothe way?

thanks a lot

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page