Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

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

Search the Archive

Re: Determinant function in Mathematica

  • To: mathgroup <mathgroup at>
  • Subject: Re: Determinant function in Mathematica
  • From: HAY at
  • Date: Thu, 16 APR 92 19:08:25 GMT

Here's some quicker V2.0 code (though it is still looks to less than 2/3 the
speed of Det in Version 1.2 - I don't have a copy of V1.2 to hand to check this

NewDet[M_] := 
Transpose[M,{1,1}] is very quick at extracting the diagonal of M.

Here are the timimgs on a  Mac IIfx using Oliver Gloor's tests

 a[n_] := Table[ StringJoin["a",ToString[i],ToString[j]], {i,1,n},{j,1,n}]

Do[ Print[ First[ Timing[ NewDet[ a[t]]]]], {t,1,7}]

0.25 Second
0.0833333 Second
0.15 Second
0.3 Second
1.06667 Second
5.91667 Second
43.9333 Second

Using the system Det I get

Do[ Print[ First[ Timing[ Det[ a[t]]]]], {t,1,7}]
0.2 Second
0.633333 Second
0.883333 Second
2.01667 Second
13.5 Second
199.317 Second

For a DEC Risc larry reported the following timings for Det.

0.0166667 Second
0.0666667 Second
0.266667 Second
1. Second
5.76667 Second
70.65 Second

Interrupt> a

[Sorry, I couldn't afford the 45 minutes!]
BUT on the same machine with Version 1.2 he gets much shorter times
0.0166667 Second
0.0166667 Second
0.0666667 Second
0.216667 Second
1.25 Second
9.78333 Second

Allan Hayes
Department of Mathematics
The University
Leicester LE1 7RH
hay at

  • Prev by Date: Plotting x^(1/3), etc.
  • Next by Date: Re: Plotting x^(1/3), etc.
  • Previous by thread: Re: Determinant function in Mathematica
  • Next by thread: Re: Determinant function in Mathematica