think of an ellipsoid in the n-dimensional space defined by $$(x-\mu)'A(x-\mu)=1.$$
I was calculating the volumes of n-dimensional ellipsoids like the one from above for a while, which is straightforward once the eigenvalues of matrix $A$ are retrieved. The volume $V$ is then given by (using the log scale so that it will not create numerical problems for very large $n$) $$ V_{0} = log(1),\\ V_{1} = log(2), $$ and then for any $i>1$ $$ V_{i} = log(\frac{2\pi}{i-1}) + V_{i-2},$$ and finally $$V = V_{n} + \sum\limits_{i=1}^{n} log(\lambda_{i}^{-\frac{1}{2}}),$$ where each $\lambda_{i}$ refers to one of the $n$ eigenvalues of $A$.
Now we know that each eigenvector of $A$ is the orientation of an axis of the ellipsoid and each $\lambda^{-\frac{1}{2}}$ refers to the half length of one of these axes.
Nevertheless, most (all that I know) mathematical routines that calculate the eigenvalues of $A$ will give the result in a meaningless order. Thus, I will know all half length of the axes of the ellipsoid, but I do not know which eigenvalue corresponds to which eigenvector. I can find this out (I guess) when testing for each eigenvector $v_{k}$ if $$ Av_{k}=\lambda_{i}v_{k}$$ and the $\lambda_{i}$ for which the above holds, will then be the eigenvalue corresponding to $v_{k}$. Nevertheless, my software (R) return eigenvectors normalized to length 1, so the above identity never exists.
My question would be if someone could help me to find out how to sort the eigenvalues anyway so that the first eigenvalue corresponds to the first eigenvector and so on...
Every help is highly appreciated, J
PS: my post is somewhat related to this post and this post, but finally could not figure out how to answer my question with these posts.