Re: Sorting Eigenvalues/EigenVectors

• To: mathgroup at smc.vnet.net
• Subject: [mg8154] Re: Sorting Eigenvalues/EigenVectors
• From: tburton at cts.com (Tom Burton)
• Date: Sat, 16 Aug 1997 11:50:58 -0400
• Organization: Brahea Consulting
• Sender: owner-wri-mathgroup at wolfram.com

```On 12 Aug 1997 00:48:10 -0400, in comp.soft-sys.math.mathematica you
wrote:

>Is there an easy way to sort the results of EigenSystem so that the
>eigenvalues are in increasing order? I can pull them out of the results
and
>sort them, but the association of the eigenvalues with the eigenvectors
is
>lost. I've been RTFMing for quite a while, and I still can't figure this
>out.
>
An eigensolution bundles the eigenvalues and vectors separately:
In[14]:= sol=Eigensystem[Table[Random[],{3},{3}]]
Out[14]= {{1.78548,-0.331954, 0.175583},
{{0.399021,  0.721989, 0.565255},
{-0.78619,  0.386882, 0.4819},
{-0.196281,-0.325106, 0.925084}}}

One easy way is to rebundle each eigenvalue with its vector before
sorting:

In[15]:= Sort[Transpose[sol]]
Out[15]= {{-0.331954,{-0.78619,  0.386882, 0.4819}},
{ 0.175583,{-0.196281,-0.325106, 0.925084}},
{ 1.78548, { 0.399021, 0.721989, 0.565255}}}
Tom Burton

```

• Prev by Date: Re: ListPlot with little plus signs instead?
• Next by Date: Re: floor problems
• Previous by thread: Re: Sorting Eigenvalues/EigenVectors
• Next by thread: Re: Sorting Eigenvalues/EigenVectors