Question: The following MATLAB function produces the Eigenvalues and Eigenvectors of matrix X.

```
[V,D] = eig(X) produces a diagonal matrix D of eigenvalues and a
full matrix V whose columns are the corresponding eigenvectors so
that X*V = V*D.

```

My questions are:

1. Does this mean that the first (or principal or dominant) eigenvector lay on the last column of V? NOTE: the author says that, all the coefficients of the dominant eigenvector are positive and that the remaining eigenvectors (the rest of columns) must have components that are negative, in order to be orthogonal (what does this mean) to u^(i);
2. Regarding the "corresponding eigenvecrtors", do we read them "column-by-column" OR "row-by-row"?
3. Do eigenvalues-eigenvectors come in pairs? If yes, and considering the above, then does the corresponding eigenvalue lay on the bottom-right of matrix D?
4. Actually, I want eigenvalues and their corresponding eigenectors in decreasing order, and then select the, 2 say, "most significant" ones. What I should do?
5. Out of curiosity, but what does it mean "the two times-series Fi and Fi' are uncorrelated in the sense that their empirical correlation vanishes for i != i' ??? How to check that in MATLAB?

LOTS of questions, I know, but I would *REALLY* appreciate if you could help me answer some of them!

Answer: 
Actually each diagonal element `(i,i)` of matrix `D` (i.e. eigenvalue) corresponds to `i`th column of matrix `V`. That is the the higher value of `D(i,i)` the more important the corresponding eigenvector.

MatLab function `eig(X)` sorts eigenvalues in the acsending order, so you need to take the last two colmns of matrix `V`

Also do remember that if you try to perform factor analysis you can simply use MatLab's `princomp` function or center the data before using `eig`.

The signs of components for the first eigenvector is not defines anyhow (in case X is nonsingular and symmetric, e.g. correlation matrix as in factor analysis)
Given the formula, you should read the vectors column-by-column.

The value associated with the i-th vector is the i-th value on the diagonal of D.

I am not sure the eigenvalues or egenvectors are ordered, and the "order" you are talking about doesn't seem clear to me...

If I assume you want to order the vectors by decreasing eigenvalues, then simply switch the right columns in V and the right rows and columns in D.