Identifying the First Eigenvector

eigenvalues-eigenvectors

If I'm using a programming language which uses a covariance matrix to find the eigenvectors and eigenvalues, how do you know which is the first eigenvector of the covariance matrix?

For example, suppose the following eigenvalues are returned,

0.1017         0         0         0
     0    4.1704         0         0
     0         0    7.2938         0
     0         0         0   23.8721

and suppose the corresponding eigenvectors are

     .9032         .28394        .3242        -.453
     .343         -.23423       -.234234       .2342
    -.3423         .76940        .2938         .7584
     .76859        .9873         .3242        -.8721

I thought I read somewhere that it's convention to make the first eigenvalue be the one with the largest value. Is this correct? If so, then because the fourth column has the largest corresponding eigenvalue, then the fourth column would actually be the first egienvector? Or do you just take the first column to be the first eigenvector?

Best Answer

When writing on paper, yes, you may arrange the eigenvalues at a decreasing order. For Matlab, though, the eigenvectors correspond to the "coordinate arrangement" yielded for the eigenvalues by the matrix of them.

Related Question