MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Eigenvalues


amitsoni.1984 at gmail.com wrote:
> Hi,
> 
> I am using Eigenvalues[S] to find the eigenvalues of a matrix. When S
> is a non singular matrix(size 500X500), the result comes very fast and
> I get numerical values of the eigenvalues. When S is singular, or very
> close to singular, the same command takes a very long time and I get
> the solution in the following form:
> ------------------------------------------
> (Root[1 -
> 685943599676205704518784329322181239368381737604683300823488051563928004
> 00 #1 +
> 422683709458129987020719509512322527334828765466847787730553472756576
> 3506258708383447822509137758993927488132783442108014806593541358448555767500
> #1^2 -
> 4756334945955210795836139142803033950863408883091629073980127621488009
> 953862277690213957742565926625592512302479312067202413373431157721376895723657
> 92383917222956224461254901373715676847804396794660504978304000000
> #1^3 +
> 149043931613976872173805300357234123824177187156376686486092172926647734083521
> 317893308585359969916780878974219953919649726995574191854952913882459023542023
> 1375808689867514677371127 ..........
> -------------------------------------------------------------
> 
> How can I get the solution(eigenvalues) as numerical values?
> 
> Thank you,
> Amit

Use *N* to get a numeric approximation of the *Root* object.

In[1]:= eigs = Eigenvalues[Table[1/(i + j + 1), {i, 3}, {j, 3}]]

Out[1]= {Root[-1 + 4755*#1 - 255600*#1^2 + 378000*#1^3 & , 3],
    Root[-1 + 4755*#1 - 255600*#1^2 + 378000*#1^3 & , 2],
    Root[-1 + 4755*#1 - 255600*#1^2 + 378000*#1^3 & , 1]}

In[2]:= eigs // N

Out[2]= {0.657051, 0.0189263, 0.000212737}

Regards,
Jean-Marc


  • Prev by Date: Re: Eigenvalues
  • Next by Date: Re: TableAlignments broken in Version 6?
  • Previous by thread: Re: Eigenvalues
  • Next by thread: Hyperlinks