Re: ? what's wrong with eig()




"Titus" <titus.edelhofer@xxxxxxxxxxxx> wrote in message
news:f8pmer$ejp$1@xxxxxxxxxxxxxxxxxxxxx

"Cheng Cosine" <acosine@xxxxxxxxxx> schrieb im Newsbeitrag
news:46b0558c$0$12228$4c368faf@xxxxxxxxxxxxxxxxx
Hi:

A = hilb(3); B = rand(3); B = B'*B;
[V, D] = eig(A,B)

V =

-0.2160 -0.3228 -1.8779
1.1764 0.2763 0.3645
-1.1168 1.1062 1.4785


D =

0.0072 0 0
0 0.2000 0
0 0 1.7418
[Vi, Di] = eig(inv(B)*A)

Vi =

0.7767 0.2724 0.1320
-0.1508 -0.2331 -0.7189
-0.6115 -0.9335 0.6825


Di =

1.7418 0 0
0 0.2000 0
0 0 0.0072

Why those generalized eigenvectors are not the same? The above two

ways should be mathematically equivalent.

Vi'*Vi

ans =

1.0000 0.8176 -0.2065
0.8176 1.0000 -0.4336
-0.2065 -0.4336 1.0000

V'*V

ans =

2.6779 -0.8408 -0.8169
-0.8408 1.4042 2.3424
-0.8169 2.3424 5.8453

The above should be identity matrix, but why it is not?

For example,

[Va, Da] = eig(A)

Va =

-0.1277 0.5474 0.8270
0.7137 -0.5283 0.4599
-0.6887 -0.6490 0.3233


Da =

0.0027 0 0
0 0.1223 0
0 0 1.4083

Va'*Va

ans =

1.0000 0.0000 0.0000
0.0000 1.0000 0.0000
0.0000 0.0000 1.0000

some remarks:
- I'm not sure, if V'*V and Vi'*Vi should result to the identity, since
inv(B)*A is not symmetrical. Va'*Va is the identity, since A is symmetric.
- Interesting, that Vi is not V, but both answers are right (A*V-B*V*D and
inv(B)*A*Vi-Vi*Di are both zero, and for both you can interchange the
Vi<->V and Di<->D. So the eigenvectors need not be unique. If you take a
closer look at Vi, you will see, that it's indeed V just with a scaling
(and permutation):
DD = D(:, 3:-1:1);
VV = Vi(:, 3:-1:1); % permute columns so DD=D
VV./V % constant factors for columns
Because: if x is an eigenvector, p*x (for p~=0) is an eigenvector as well.


Don't know how did you find relation between VV and Vi, but to me, the
following

test told me two things only: 1) eigenvectors obtained from eig(A,B) when B
is

not identiy matrix have norms more than 1, and 2) eigenvectors for eig(A,B)

and eig(A,eye(size(A))) are not simply rescaling and permutation.

A = rand(3); A = A*A', B = hilb(3)

A =

1.2121 1.3337 0.8867
1.3337 1.7988 1.4752
0.8867 1.4752 1.4989


B =

1.0000 0.5000 0.3333
0.5000 0.3333 0.2500
0.3333 0.2500 0.2000

inv(B)*A

ans =

-10.5047 -8.4967 -0.1603
52.8369 31.8151 -18.4839
-44.1051 -18.2315 30.8669

[V D] = eig(A)

V =

-0.5057 -0.7086 0.4920
0.7431 -0.0681 0.6658
-0.4383 0.7023 0.5610


D =

0.0209 0 0
0 0.4614 0
0 0 4.0275

[Vv Dv] = eig(A,B)

Vv =

-1.6207 -1.3887 2.1083
2.0629 3.3426 -13.2880
-1.1045 -0.0147 13.3709


Dv =

0.2010 0 0
0 9.9451 0
0 0 42.0311

norm(V(:,1))

ans =

1.0000

norm(Vv(:,1))

ans =

2.8465

A*Vv(:,1)/norm(Vv(:,1))

ans =

-0.0676
-0.0282
-0.0173

B*Vv(:,1)/norm(Vv(:,1))*Dv(1,1)

ans =

-0.0676
-0.0282
-0.0173

Or maybe you can show me how you find rescaling and permutation

Thanks,
by Cheng Cosine
Aug/07/2k7 NC


.



Relevant Pages

  • Re: ? whats wrong with eig()
    ... test told me two things only: 1) eigenvectors obtained from eigwhen B ... and eig)) are not simply rescaling and permutation. ...
    (comp.soft-sys.matlab)
  • Re: ? whats wrong with eig()
    ... Why those generalized eigenvectors are not the same? ... ways should be mathematically equivalent. ... So the eigenvectors need not be unique. ...
    (comp.soft-sys.matlab)
  • Re: ? analytic constraint optimization
    ... Then determine the scaling according to the original constraint ... EIG Eigenvalues and eigenvectors. ... = EIGproduces a diagonal matrix D of generalized ...
    (sci.math.num-analysis)
  • Re: diff.eq.system e^20A
    ... identity matrix. ... If there are "missing" eigenvectors, ... But it is still not necessary to find the Jordan form; ... it is enough to know the eigenvalue multiplicities. ...
    (sci.math)
  • Re: Eigenvectors of a linear combination of symmetrical matrices
    ... Tomek wrote: ... (a,b a real values, E is identity matrix, A is a tridiagonal matrix). ... I veryfied numerically that the eigenvectors of N are the same like eigv. ... I suspect that such a case is well known in algebra ...
    (sci.math)