|
From: | Nicholas Jankowski |
Subject: | Re: eig returns nonorthogonal eigenvectors |
Date: | Tue, 22 Nov 2016 10:02:40 -0500 |
On Mon, Nov 21, 2016 at 5:33 PM, chris2 <address@hidden> wrote:Hello,
The following commands show a case where octave returns non-orthogonal
eigenvectors. Mathematically, the eigenvalue is degenerate, so nothing
prohibits this, even for a symmetric matrix, but it would be very useful if
it did. Is there any way to force octave to orthogonalize the basis?
--thanks, Chris
octave> [q,r]=qr([1, -1, 1, 0; 2, 3, 0, 1; 4, 3, 0, 0; -1, 2, 0, 0])
octave> a=q*diag([5,5,-7,9])*q'
octave> [va,da]=eig(a)
octave> va'*va
not a subject I'm intimately familiar with, but following a similar discussion regarding matlab's eig:
http://stackoverflow.com/questions/33258139/matlab-not-retur ning-orthonormal-matrix-of- eigenvectors it seems your non-orthogonal results are the result of numerical precision errors. From that discussion they mention that eig will return orthogonal eigenvectors if the input is exactly symmetric. However, from your input after creating a:
[Prev in Thread] | Current Thread | [Next in Thread] |