[Date Index]
[Thread Index]
[Author Index]
"large" matrices, Eigenvalues, determinants, characteristic polynomials
*To*: mathgroup at smc.vnet.net
*Subject*: [mg56458] "large" matrices, Eigenvalues, determinants, characteristic polynomials
*From*: Grischa Stegemann <grix7-usenet at yahoo.de>
*Date*: Tue, 26 Apr 2005 01:33:09 -0400 (EDT)
*Organization*: Technical University Berlin, Germany
*Sender*: owner-wri-mathgroup at wolfram.com
Dear group
What is the difference between calculating Eigenvalues of a matrix M by
a) Eigenvalues[M]
b) Solve[CharacteristicPolynomial[M,x]==0,x]
c) Solve[Det[M - x IdentityMatrix[n]]==0,x]
?
Have a look at the following setting:
n = 12;
M = Table[Table[Random[Real, {0, 100}], {n}], {n}]
In this case all the 3 methods a, b and c give the same set of Eigenvalues
(neglecting small numerical differences and maybe using Chop).
As soon as I increase n to at least 13 the result of method c gives a different
set of solutions. In particular method c gives 18 solutions instead of the
expected 13, where the 5 new ones always lay close together with small
imaginary parts.
As far as I can see the problem occurs already when calculating the
characteristic polynomial:
h[x_] = Det[M - x IdentityMatrix[n]]
looks good up to n=12, for n>=13 this function looks very strange, including a
fraction and orders of x larger than n.
This is particularly annoying since the actual problem I am dealing with
involves the calculation of a characteristic function like this:
h2[lambda_]=Det[M[lambda] - lambda IdentityMatrix[31]]
where M[lambda] is a sparse 31x31 matrix having only the last row and the last
column as well as the main diagonal and the first secondary diagonals unequal
to zero. The dependence of lambda is an Exp[-lambda] in M[[31,31]].
Of course I want to solve the transcendental equation
FindRoot[h2[lambda]==0,{lambda,...}] afterwards. But since the calculation of
the determinant already "fails" (giving really high order terms in lambda) I
have no chance to get any sane results out of FindRoot.
In this case it also doesn't make a difference whether I use
h2[lambda_]=Det[M[lambda] - lambda IdentityMatrix[31]]
or
h2[lambda_]=CharacteristicPolynomial[M[lambda],lambda]
which is only available in Mathematica 5 whereas I am using 4.0 or 4.1 very
often.
Any suggestions, clarifications or hints are really appreciated.
Thank you,
Grischa
Prev by Date:
**Mathlink memory preservation**
Next by Date:
**Re: Working with huge text files with mathematica**
Previous by thread:
**Re: Mathlink memory preservation**
Next by thread:
**Re: "large" matrices, Eigenvalues, determinants, characteristic polynomials**
| |