Re: a big limit of mathematica?



Dana wrote:
Hi. Looks like as the size of your matrix gets bigger, the Determinant tends towards zero.
However, I can't explain why with a size 100*100 (the first output), it returns "0." and with the largest sizes, numbers that are very small.


In[1]:=
Simplify[(i-j)+3/j^4+50*i]

Out[1]=
51*i+3/j^4-j

In[2]:=
Table[Det[Table[51.*i+3/j^4-j,{i,n},{j,n}]],{n,100,400,100}]


Out[2]= {0., -1.1058552925176574276594077*^-2291, 7.9451068970561274753784538*^-3316, -2.0828859268407618803830820*^-4315 }




In Mathematica 5.0.0 on an Intel Pentium 4,

{
 -2.3072190778544011494885203792388`15.954589770191005\
*^-1432,
 1.6138130601828444080943999966955787`15.9545897701910\
05*^-2817,
 -2.17670639763548416057774043151`15.954589770191005*^\
-4180,
 1.283924316663441664176128821`15.954589770191005*^-55\
02}

So the result "0.0" is a recent innovation.  On my
system, the Precision of the first number is 15.9546
(decimal digits),  not MachinePrecision, which makes
one wonder what is going to happen in version 5.3 or 5.4.
Mathematica's numerical model has been criticized by
several people (including me), since Mathematica 1.0.


If you do the calculation EXACTLY by using 51 instead of "51." the determinant of the 100X100 matrix comes out exactly 0. In fact, the determinant of the 10x10, 20x20 etc all come out exactly 0.

The advantage of doing exact arithmetic  (and using a CAS
like Mathematica, Maple,Macsyma etc) over Matlab,  is that the results
can often be exactly right. In Matlab the result will
be exactly right only by coincidence.

For example, is there anything special about 51.0,  51.000000000000000 or
exactly 51?   Well, why not just put in a symbol, like A instead
of 51. and compute the determinant. the 10X10 determinant
is exactly zero. I assume that knowing the answer you can prove
the determinant is zero always.

Try that in Matlab.  Actually, matlab can be coerced to doing
it, but only by calling Maple.  A much more versatile system
then would actually be sometime like Mathematica, which could,
if necessary for efficiency, call Matlab.  The Mathematica
people claim to be doing that, or maybe they claim to have
already done that.

So, for the original poster:  your complaint about mathematica
running out of memory has not been solved, but your reason for
trying that computation is probably no longer compelling.

RJF


.



Relevant Pages

  • Re: a big limit of mathematica?
    ... the Det quickly drops to zero from 3 onward. ... Looks like as the size of your matrix gets bigger, the Determinant ... since Mathematica 1.0. ... In Matlab the result will ...
    (sci.math.symbolic)
  • matrix inversion
    ... has determinant one and is full rank. ... but matlab gives zero ...
    (comp.soft-sys.matlab)
  • Re: zero based arrays?
    ... John D'Errico wrote: ... There is a very real and very 'physical' reason for zero based ... of this, but c came before Matlab, and in fact, Matlab is written in ... them, or else programming would never work, ever, at all. ...
    (comp.soft-sys.matlab)
  • Re: too many zeros and orbital mechanics.
    ... How do I tell Matlab not to do that? ... I can try round(e) which does round that to zero, ... exact value of zero, clear down to the least significant bit, you can ...
    (comp.soft-sys.matlab)
  • Re: help: how to find all zero roots of a non-linear equation in a given interval
    ... certain that this equation has at least one zero root in the interval ... the values of the derivative of the det on subintervals: ... you must evaluate the determinant using a stable matrix decomposition, ... the householder qr-decomposition (each householder reflector introduces a sign ...
    (sci.math.num-analysis)

Quantcast