Discussion:
inverting a large matrix
a***@emc.ufsc.br
2004-06-08 14:57:05 UTC
Permalink
Maxima folks!

I'm tryin to invert a 36x36 very sparse numerical matrix but maxima can't solve
it , Does exist some limit for the matrix size when inverting ??

Thanks,
alexandre

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Richard Fateman
2004-06-08 15:23:24 UTC
Permalink
There is no explicit size limit. If there were such a limit
it would presumably say so in an explicit message. I suggest you
try converting all entries to floating point numbers. Perhaps you
are running out of memory doing exact rational arithmetic.
RJF
Post by a***@emc.ufsc.br
Maxima folks!
I'm tryin to invert a 36x36 very sparse numerical matrix but maxima can't solve
it , Does exist some limit for the matrix size when inverting ??
Thanks,
alexandre
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
Maxima mailing list
http://www.math.utexas.edu/mailman/listinfo/maxima
a***@emc.ufsc.br
2004-06-08 16:34:55 UTC
Permalink
I converted all terms (one by one) of the matrix (N_ap_nn) to float but maxima
can't invert, there is no error message but a big, big time ... that not end.

The matrix is invertible 'cause I could invert it in Octave...

(C254) for ii:1 while ii<=36 do(for jj:1 while jj<=36 do
N_ap_nn[ii][jj]:float(N_ap_nn[ii][jj]));

(D254) DONE
(C255) floatnump((N_ap_nn[3][36]));

(D255) TRUE
(C256) invert(N_ap_nn);
Post by Richard Fateman
There is no explicit size limit. If there were such a limit
it would presumably say so in an explicit message. I suggest you
try converting all entries to floating point numbers. Perhaps you
are running out of memory doing exact rational arithmetic.
RJF
Post by a***@emc.ufsc.br
Maxima folks!
I'm tryin to invert a 36x36 very sparse numerical matrix but maxima can't
solve
Post by a***@emc.ufsc.br
it , Does exist some limit for the matrix size when inverting ??
Thanks,
alexandre
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
Maxima mailing list
http://www.math.utexas.edu/mailman/listinfo/maxima
_______________________________________________
Maxima mailing list
http://www.math.utexas.edu/mailman/listinfo/maxima
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Stavros Macrakis
2004-06-08 17:42:56 UTC
Permalink
1) Could you please send us a copy of the matrix you are having trouble
inverting, and also your full configuration (processor type, OS version,
Lisp version, Maxima version)? That's really the only way to track down
problems like this. The problem may have nothing to do with matrix
inversion per se (though the fact that it fails when you float it does
suggest that that's where the problem is).

2) It is possible that there is a bug in Maxima's handling of sparse
matrix inversion. That is, in trying to be clever, it may be messing
up. To test this hypothesis in the floating case, try setting all the
zero elements to e.g. 1.0e-50.

3) Matrix operations in Maxima could probably be speeded up
considerably. Some simple tests show, for example, that determinant(m)
for a 12x12 dense integral m takes 10 times longer than m^^-1 (!!!).

-s
Richard Fateman
2004-06-08 18:18:42 UTC
Permalink
I think the problem is display.
try answer: invert(..)$
instead of invert(..);

Viktor T. Toth
2004-06-08 15:36:22 UTC
Permalink
The phrase "very sparse" caught my attention. Is the matrix invertible in
the first place? What is its determinant?

I just tried inverting a 36x36 integer matrix using random elements
(1..1000) and Maxima did the job in a few seconds.


Viktor


-----Original Message-----
From: maxima-***@math.utexas.edu [mailto:maxima-***@math.utexas.edu] On
Behalf Of ***@emc.ufsc.br
Sent: Tuesday, June 08, 2004 10:57 AM
To: ***@www.ma.utexas.edu
Subject: [Maxima] inverting a large matrix



Maxima folks!

I'm tryin to invert a 36x36 very sparse numerical matrix but maxima can't
solve
it , Does exist some limit for the matrix size when inverting ??

Thanks,
alexandre

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Loading...