Re: Numerical Determinants
- To: mathgroup at smc.vnet.net
- Subject: [mg12962] Re: [mg12922] Numerical Determinants
- From: Hugh Walker <hwalker at gvtc.com>
- Date: Sun, 28 Jun 1998 02:51:51 -0400
- Sender: owner-wri-mathgroup at wolfram.com
hello at there.com (Rod Pinna) wrote in [mg12922]:
*************************
I have a large square matrix, of 30x30 elements (and possibly larger).
Each element is of the form
Ai,j + Bi,j P
Where Ai,j and Bi,j are real numbers. Evaluation of this matrix in
symbolic form is very slow. Obviously, numeric evaluation is much
faster. What I want to do is evaluate, with M the matrix above:
NSolve[Det[M]==0,P]
Nsolve seems to, as far as I can tell, first evaluate a symbolic
expansion of M, rather than numerically substituting numbers. Is there
a way to get Mathematica to evaluate this in a purely numeric way?
I've tried Findroot, but the fuction is badly behaved around the roots
of interest, and it doesn't find the roots I'm looking for. Any
suggestions?
**************************
Yes, I have a suggestion. Consider the eigen-problem -a.x = p b.x.
Non-trivial eigenvectors exit provided Det[a + b p] = 0, which is your
situation. Assuming Inverse[b] exists, the eigen values of m.x = p x
where m = -Inverse[b].a
Eigenvalues[-Inverse[b].a]
will coincide with your p's.
I tested cases in which a and b are each random 10x10 matrices. The
results were the same, and timings for the two approaches were
Det = 9.0 sec
eigen = 0.0 sec
I hope this helps.
Hugh Walker
Professsor Emeritus
University of Houston
Gnarly Oaks