# forum.alglib.net

ALGLIB forum
 It is currently Mon May 29, 2023 5:48 pm

 All times are UTC

### Forum rules

1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.

 Page 1 of 1 [ 1 post ]
 Print view Previous topic | Next topic
Author Message
 Post subject: eigenvals problemPosted: Thu Jun 21, 2018 4:46 pm

Joined: Thu Jun 21, 2018 4:36 pm
Posts: 1
Hello. I already have a lot of time and can not really figure out how to count eigenvecs in the AlgLib library.

Here is an example with a solution in the matkad with which I try to reduce my results:
There is a matrix:

Code:
{ 1, 2, 3 },
{ 0, 1, 2 },
{ 3, 4, 1 }

Next, I use the alglib.rmatrixevd
Code:
alglib.rmatrixevd(M, 3, 3, out wr, out wi, out vl, out vr);

Here are the results:
Code:
матрица wr
Eigenvals
-2,710+0,000i
0,271+0,000i
5,439+0,000i

This corresponds to the eigenvalues ??in the same example of the mitkad, even in an inverted form.

But here's the trouble.
The library function gives me the result as left and right vectors:
Code:
Eigenvec
Матрица vr
0.518   -1.000   -0.879
0.539   0.803   -0.451
-1.000   -0.293   -1.000

Матрица vl
0.809   -0.708   -0.561
0.642   1.000   -1.000
-1.000   0.172   -0.829

In the description they write:
Quote:
VL, VR - arrays of left and right eigenvectors (if they are needed).
If WI[i]=0, the respective eigenvalue is a real number,
and it corresponds to the column number I of matrices VL/VR.
If WI[i]>0, we have a pair of complex conjugate numbers with
positive and negative imaginary parts:
the first eigenvalue WR[i] + sqrt(-1)*WI[i];
the second eigenvalue WR[i+1] + sqrt(-1)*WI[i+1];
WI[i]>0
WI[i+1] = -WI[i] < 0
In that case, the eigenvector corresponding to the first
eigenvalue is located in i and i+1 columns of matrices
VL/VR (the column number i contains the real part, and the
column number i+1 contains the imaginary part), and the vector
corresponding to the second eigenvalue is a complex conjugate to
the first vector.
Arrays whose indexes range within [0..N-1, 0..N-1].

How much I did not get into it and did not even try the required result even close.

Should be:

Code:
0,625 0,76 -0,415
0,321 -0,611 -0,432
0,711 0,222 0,801

In general, please poke my nose that where and how do I count to come to the specified result?
Thank you.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 1 post ]

 All times are UTC

#### Who is online

Users browsing this forum: No registered users and 4 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for: