Re: eigenstructure from eig




"Robert Low" <mtx014@xxxxxxxxxxxxxx> wrote in message
news:405jqrF17sgipU1@xxxxxxxxxxxxxxxxx
> If A is a symmetric matrix, then
>
> [X,Y] = eig(A)
>
> puts the eigenvalues of A in Y ordered
> from -infinity to +infinity, and corresponding
> unit eigenvectors in X.

I don't believe that we document that the eigenvalues will be sorted, but
currently they are.

> This much I know.
>
> Question: how does it choose the eigenvectors?

The EIG function calls LAPACK (see the Algorithm section):

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/eig.html

You'd need to look at the properties of your matrix A, find which LAPACK
routines EIG calls, and see how they choose the eigenvectors.

> First: There's a +/- ambiguity in each vector, and a
> quick numerical investigation suggests that a
> small change in A which causes only a small change
> in the eigendirections can cause the sign to
> change. How does the algorithm choose which
> of the two possibilities to return?

Well, remember that if x is an eigenvector of A with eigenvalue lambda, then
so is c*x for any scalar c:

A*(c*x) = c*A*x = c*lambda*x = lambda*(c*x).

But again, you'll need to check the LAPACK routines and/or the
documentation:

http://www.netlib.org/lapack/

> Second: can I insist on getting a right handed
> set of eigenvectors back? It seems to be fairly
> random whether I get a right handed or left handed
> set back. (OK, it's easy to fix: but it would
> be easier if I could just ask for it in the first
> place.)

I don't see anything in the LAPACK doc or in Google about forcing the
routines to return a right-handed set of eigenvectors back.

> I'll settle for RTFM if somebody can tell me
> where to look...I'm using version 7.1, and couldn't
> find anything in the browser help.

--
Steve Lord
slord@xxxxxxxxxxxxx


.



Relevant Pages

  • Re: Matrix Diagonalization
    ... LAPACK and virtually everything else get that one wrong! ... Run it, extracting all eigenvectors, and see :-) ... then the routine will ignore the lower triangle of the ... input and diagonalize a unit matrix of dimension 2x2. ...
    (comp.lang.fortran)
  • Re: Matrix Diagonalization
    ... LAPACK and virtually everything else get that one wrong! ... Run it, extracting all eigenvectors, and see :-) ... The all zeroes is not invalid, ... bug in the error detection; if the former, ...
    (comp.lang.fortran)
  • Re: using a lapack routine
    ... I prefer to compile LAPACK and create a library. ... module with interfaces to LAPACK subroutines. ... real symmetric matrix. ... eigenvectors of a real matrix A I type v=eigVectors, ...
    (comp.lang.fortran)
  • Re: minimization of a matrix function
    ... It appears that you want the d lowest eigenvectors of the ... I think you need to study eigenvalue problems and perturbation ... LAPACK documentation would be a good place to start, ... can find the eigenvectors by minimizing ...
    (sci.math.num-analysis)
  • Re: Matrix Diagonalization
    ... LAPACK and virtually everything else get that one wrong! ... Run it, extracting all eigenvectors, and see :-) ... The all zeroes is not invalid, ... bug in the error detection; if the former, ...
    (comp.lang.fortran)

Loading