Discussion:
eig - eigenvectors of degenerate eigenvalues are not orthogonal
(too old to reply)
Craig
2012-05-28 21:03:06 UTC
Permalink
When I use the eig function to get the eigenvectors and eigenvalues of a symmetric matrix with degenerate eigenvalues, the eigenvectors corresponding to the degenerate eigenvalues are not orthogonal. Is this how it is supposed to behave? Thanks
Nasser M. Abbasi
2012-05-28 21:23:54 UTC
Permalink
Post by Craig
When I use the eig function to get the eigenvectors and eigenvalues
of a symmetric matrix with degenerate eigenvalues, the eigenvectors
corresponding to the degenerate eigenvalues are not orthogonal.
Is this how it is supposed to behave? Thanks
I forgot my linear algebra a little, had to google this up.

according to this math dept web site, it says

http://www.math.oregonstate.edu/home/programs/undergrad/CalculusQuestStudyGuides/vcalc/eigen/eigen.html

"A symmetric matrix has n eigenvalues and there exist n linearly
independent eigenvectors (because of orthogonality) even if
the eigenvalues are not distinct."

note: "linearly independent eigenvectors" does NOT mean
orthogonal vectors.

orthogonal => linearly independent BUT
linearly independent does not mean orthogonal.

For me, orthogonal just means 90 degrees to each others
(i.e. dot product is zero). But 2 vectors can be
linearly independent to each others and not be
orthogonal to each others.

--Nasser
Bruno Luong
2012-05-28 21:48:06 UTC
Permalink
Post by Nasser M. Abbasi
http://www.math.oregonstate.edu/home/programs/undergrad/CalculusQuestStudyGuides/vcalc/eigen/eigen.html
"A symmetric matrix has n eigenvalues and there exist n linearly
independent eigenvectors (because of orthogonality) even if
the eigenvalues are not distinct."
True, but there is more on the property of the symmetric matrix than this incomplete statement.

Bruno
Nasser M. Abbasi
2012-05-28 21:49:05 UTC
Permalink
Post by Nasser M. Abbasi
Post by Craig
When I use the eig function to get the eigenvectors and eigenvalues
of a symmetric matrix with degenerate eigenvalues, the eigenvectors
corresponding to the degenerate eigenvalues are not orthogonal.
Is this how it is supposed to behave? Thanks
according to this math dept web site, it says
http://www.math.oregonstate.edu/home/programs/undergrad/CalculusQuestStudyGuides/vcalc/eigen/eigen.html
"A symmetric matrix has n eigenvalues and there exist n linearly
independent eigenvectors (because of orthogonality) even if
the eigenvalues are not distinct."
I looked up another book on this, and this is what it says for
symmetric matrix with degenerate eigenvalues, (had to type this
myself, since it is from PDF

"if L_i = L_j (degenerate case), r_i is NOT automatically
orthogonal to r_j, but it may be made orthogonal"

In the above, L is the eigenvalue, and r is the corresponding
eigenvector.

seepage 216, "Essential mathematical methods for physicists"
by Hans-Jurgen Weber. Google it on Google books.

--Nasser
Nasser M. Abbasi
2012-05-28 22:05:14 UTC
Permalink
Post by Nasser M. Abbasi
"if L_i = L_j (degenerate case), r_i is NOT automatically
orthogonal to r_j, but it may be made orthogonal"
In the above, L is the eigenvalue, and r is the corresponding
eigenvector.
seepage 216, "Essential mathematical methods for physicists"
by Hans-Jurgen Weber. Google it on Google books.
btw, what I think he means by the above, is that the eigenvectors
can come out to be linearly independent, but not necessarily
orthogonal.

One can use Gram–Schmidt to convert set of L.I. vectors
to orthogonal ones.

So, the bottom line is this:
==============================
symmetric + degenerate eigenvalues ==> L.I. for sure, but not
necessarily orthogonal eigenvectors. But can be converted
to othrogonal.

So, if you are seeing eigenvectors that are not othrogonal,
then that is possible.


--Nasser
Bruno Luong
2012-05-28 22:08:06 UTC
Permalink
Post by Nasser M. Abbasi
"if L_i = L_j (degenerate case), r_i is NOT automatically
orthogonal to r_j, but it may be made orthogonal"
In the above, L is the eigenvalue, and r is the corresponding
eigenvector.
This is better.

1) Therefore we can always _select_ an orthogonal eigen-vectors for all symmetric matrix.

2) For matrix with "degenerated" eigen-values, their associated eigen-vectors - if they are picked "randomly" - might not be orthogonal. (Thus OP should not complain).

3) If eigen-values are distinct, eigen-vectors will be orthogonal regardless how it was selected.

Bruno
Bruno Luong
2012-05-28 21:35:06 UTC
Permalink
Post by Craig
When I use the eig function to get the eigenvectors and eigenvalues of a symmetric matrix with degenerate eigenvalues, the eigenvectors corresponding to the degenerate eigenvalues are not orthogonal. Is this how it is supposed to behave? Thanks
If by "degenerate eigenvalues" you mean eigen-values with multiplicity > 1, I'm not sure how is supposed to behave, all I know is the behavior you describe is still mathematically perfectly correct.

Bruno
Matt J
2012-05-28 22:17:06 UTC
Permalink
Post by Craig
When I use the eig function to get the eigenvectors and eigenvalues of a symmetric matrix with degenerate eigenvalues, the eigenvectors corresponding to the degenerate eigenvalues are not orthogonal. Is this how it is supposed to behave? Thanks
==============

Show us the code that will reproduce this. Als the others have said, pure linear algebra allows multiplicity>1 eigenvalues to have a non-orthogonal eigenvector basis. Also, there's nothing in the documentation of EIG that gaurantees orthogonality.

However, I've never seen non-orthogonal eigenvectors produced by EIG when the matrix is symmetric. It seems highly unlikely that orthogonality would be achieved so often purely by accident.
Christopher Crawford
2016-11-22 00:10:03 UTC
Permalink
Post by Nasser M. Abbasi
Post by Craig
When I use the eig function to get the eigenvectors and eigenvalues of a symmetric matrix with degenerate eigenvalues, the eigenvectors corresponding to the degenerate eigenvalues are not orthogonal. Is this how it is supposed to behave? Thanks
==============
Show us the code that will reproduce this. Als the others have said, pure linear algebra allows multiplicity>1 eigenvalues to have a non-orthogonal eigenvector basis. Also, there's nothing in the documentation of EIG that gaurantees orthogonality.
However, I've never seen non-orthogonal eigenvectors produced by EIG when the matrix is symmetric. It seems highly unlikely that orthogonality would be achieved so often purely by accident.
As a followup, I was wondering if there is any resolution, or a standard way to obtain an orthogonal eigenbasis from eig()?
Post by Nasser M. Abbasi
Post by Craig
[q,r]=qr([1, -1, 1, 0; 2, 3, 0, 1; 4, 3, 0, 0; -1, 2, 0, 0]);
a=q*diag([5,5,-7,9])*q';
[va,da]=eig(a);
round(va'*va*10000)
ans =
10000 0 0 0
0 10000 0 0
0 0 10000 1905
0 0 1905 10000
Post by Nasser M. Abbasi
Post by Craig
[q,r]=qr([1,2,3;5,6,7;9,8,7]);
[v,w]=eig(q*diag([2,3,3])*q');
v'*v
ans =
1.000000000000000 0.000000000000000 0.161496081975906
0.000000000000000 1.000000000000000 0.000000000000000
0.161496081975906 0.000000000000000 1.000000000000000
Bruno Luong
2016-11-22 07:10:03 UTC
Permalink
eigen vectors more orthogonal if you supply *numerical* symmetric matrix
Post by Craig
[q,r]=qr([1, -1, 1, 0; 2, 3, 0, 1; 4, 3, 0, 0; -1, 2, 0, 0]);
a=q*diag([5,5,-7,9])*q';
[va,da]=eig(a);
a
a =

-3.7972 -1.4947 1.7509 -4.7829
-1.4947 7.0956 -1.1977 -2.0942
1.7509 -1.1977 5.6030 1.7675
-4.7829 -2.0942 1.7675 3.0986
Post by Craig
[va,da]=eig(a+a');
round(va'*va*10000)
ans =

10000 0 0 0
0 10000 0 0
0 0 10000 0
0 0 0 10000

% Second example
Post by Craig
[q,r]=qr([1,2,3;5,6,7;9,8,7]);
M = q*diag([2,3,3])*q';
[v,w]=eig(M+M');
v'*v

ans =

1.0000 -0.0000 0.0000
-0.0000 1.0000 -0.0000
0.0000 -0.0000 1.0000
Loading...