MathGroup Archive 1997

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

Search the Archive

Re: Newbie question: big matrix calculations

  • To: mathgroup at
  • Subject: [mg9322] Re: Newbie question: big matrix calculations
  • From: Paul Abbott <paul at>
  • Date: Mon, 27 Oct 1997 02:47:38 -0500
  • Organization: University of Western Australia
  • Sender: owner-wri-mathgroup at

Dennis Wayne Scott wrote:
> This is the first time I've ever been in this newsgroup, so please try
> to excuse anything I do/say that's silly to the experts...
> I have three 100x100 sparse (diagonal) matrices (matrxD, matrxU, and
> matrxL) and three 100x1 matrices (b, x2, and x1), and I'm performing
> several operation on them:
> x2 = -Inverse[matrxD].(matrxL+matrxU).x1+Inverse[matrxD].b;

You are effectively finding the fixed point:

	FixedPoint[Inverse[matrixD] . (b - (matrixL + matrixU) . #) & , x1, 
		SameTest -> (Max[Abs[#2 - #1]] < 1/10^5 & )]


This is considerably faster because you only compute Inverse[matrixD]
once (rather than twice each iteration).  Note that you get a further
speed up if your initial guess is numerical (floating point) rather
than exact.

However, for this problem, rearranging the matrix equations permits
exact solution:

	N[Inverse[matrixD + (matrixL + matrixU)] . b]


This is very fast even for 100x100 matrices!  


Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907       
mailto:paul at  AUSTRALIA                   

            God IS a weakly left-handed dice player

  • Prev by Date: RE: Re: Re: Not so Useful Dumb User Questions
  • Next by Date: Re: Which version for symbolic calculation, student or full ?
  • Previous by thread: Re: Newbie question: big matrix calculations
  • Next by thread: Re: Newbie question: big matrix calculations