Re: Eigenvalues
- To: mathgroup@smc.vnet.net
- Subject: [mg11589] Re: [mg11476] Eigenvalues
- From: Daniel Lichtblau <danl@wolfram.com>
- Date: Tue, 17 Mar 1998 10:43:11 -0500
Raya Khanin wrote: > > Hi, > > I have a problem of calculating eigenvalues for a simple 4X4 matrix. I > am working on Sun workstation, and it takes minutes and minutes for > Mathematica to perform Eigenvalues[] operation for a matrix like this > > Clear[a, b, c, d, e, d, f, g]; > testmatrix = {{a, b, c, d}, {b, c, d, e}, {c, d, e, f}, {d, e, f, g}}; > Eigenvalues[testmatrix]; > I get a huge result quite quickly. To improve on the size, try In[71]:= SetOptions[Roots, Quartics->False]; In[72]:= testmatrix = {{a, b, c, d}, {b, c, d, e}, {c, d, e, f}, {d, e, f, g}}; In[73]:= Timing[ev = Eigenvalues[testmatrix];] Out[73]= {0.83 Second, Null} In[74]:= LeafCount[ev] Out[74]= 1449 > I will need to work with much larger (symbolic) matrices with not that > simple entries. Has anyone had an experience of working with symbolic > matrices? Would it be better doing this in MatLab? You may well need to do numeric rather than symbolic computations. You will generate enormous results, assuming your computation does not hang or run you out of memory. These results will not likely be of much use. If you plug in numeric values for your parameters then quite possibly you will not be able to get meaningful numeric results due to accumulation of round-off error. I have not used Matlab but my understanding is that it is primarily geared for numeric rather than symbolic linear algebra. It incorporates some part of the math program Maple to do symbolic computations. I do not know how well it handles an example like the one above; this may be a question for the news group comp.soft-sys.matlab. > Any suggestions will be appreciated! > > thanks a lot. > > Raya Khanin Daniel Lichtblau Wolfram Research