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: 
Let's gather all the answers here. I suppose your matrix is symmetric, since you say that the eigenvectors are orthogonal and try to order the eigenvalues.

1. No, the eigenvalues could come in any order; there is no guarantee that they are ordered.   
1bis. There are some classes of matrices (such as [Z-matrices](http://en.wikipedia.org/wiki/Z-matrix_%28mathematics%29) or [nonnegative matrices](http://en.wikipedia.org/wiki/Nonnegative_matrix)) for which it is known that the largest or smallest eigenvector is nonnegative. That must be your case.

1ter. If another eigenvector were to be nonnegative, then the scalar product with the dominant eigenvector $u^{(1)}$ would be positive, as it's the sum of nonnegative terms, one of them at least positive.
2. The *columns* of the returned $V$ are the eigenvectors.
3. Yes, they come in pair, in the sense that $D(i,i)$ is the eigenvalue relative to $V(:,i)$. This follows from $X\*V=V\*D$, if you think about it.  

3bis. As written above, the eigenvalues are not returned in a specific order. If you wish you can sort $D$ and $V$ conformably using these commands:

`[uselessVariable,permutation]=sort(diag(D));`

D=D(permutation,permutation);V=V(:,permutation);
4. I guess that "most significant" means larger. This means the last two columns of $V$, after you reorder as above.
5. Check [cross-correlation](http://en.wikipedia.org/wiki/Cross-correlation) on Wikipedia. This statement probably means that the sample covariance is zero, i.e., $\frac{1}{n}\sum\_{t=1}^n (\phi\_t-\mu) (\phi'\_t-\mu)'^T=0$, where $\mu$ and $\mu'$ are the means of the two time series. If you wish to verify this experimentally, I guess you'll have a hard time getting an exact zero out of Matlab, since this sum converges quite slowly to its asymptotical value usually. Consider yourself lucky if you have 2 significative digits.
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.