[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: eigenvectors
From: |
Thomas Shores |
Subject: |
Re: eigenvectors |
Date: |
Wed, 9 Jun 1999 16:15:55 -0500 |
Whoops, the story is a bit more complicated than that. Herber Farnsworth
wrote:
>Ahh, I'd forgotten about the eig function. I was looking in the help
>under matrix factorizations and eig wasn't listed. It's under basic
>matrix functions.
>
>Thanks,
>
>On Wed, 9 Jun 1999, Nimrod Mesika wrote:
>
>> address@hidden wrote:
>> >
>> > Q = inv(X)*D*X
>> >
>> use [X,D] = eig(Q);
>>
>> D is a diagonal matrix (the elements are the eigenvalues of Q: lambda1,
>> lambda2, etc..).
>> X is a matrix of eigenvectors.
>>
>> Actually, since octave returns X as a unitary matrix (a matrix for which
>>inv(A)=A') you also have the simpler expression:
> >
> >Q = X' * D * X;
> >
>> -- Nimrod.
> >
Actually, it's a bit more complicated than that. Not every matrix is even
diagonalizable, let alone unitarily diagonalizable. Any *real symmetric*
matrix, such as a Hilbert matrix, is automatically unitarily (X^{-1}=X')
diagonalizable, whether it has repeated eigenvalues or not. On the other
hand, a matrix like a = [1,2;0,3] is diagonalizable, but not unitarily
diagonalizable. Worse yet, a matrix like a = [1,1;0,1] is simply not
diagonalizable at all. In the first case, octave will return a unitary
matrix. In the second case, it will return a matrix whose columns are unit
length eigenvectors. And in the third case it will return a completely
incorrect matrix (none can work) with unit length columns. BTW, if you do
want to review these linear algebra concepts, I keep a copy of a text I'm
writing on the web in my linear algebra home page
(http://www.math.unl.edu/~tshores/linalgtext.html), so feel free to use it
for a quick reference.
Tom Shores
---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL. To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------