The Laplace method:

First create a minor matrix using the Delete function which just removes the ith element from the list:

Now evaluate the determinant using the expansion along the first row. The simplest case of 1x1 matrix has to be treated separately since the minor is not determined then.  Otherwise the evaluation is a straightforward implementation of the Laplace's formula.  Note how the reccurence is implemented: myDet appears on both sides.  One needs [[1]] after the Dimensions functions since this function produces a list of two elements (equal to each other in our case).  list[[1]] picks the first element from the list.

It takes vary little time to evaluate a 4x4 determinant by Laplace's expansion.

However,  the amount of time for Mathematica's Det is not measurable,  so let's go to a larger size:

Notice ";" at the end of command to suppress output.

Thus, the timing becomes nonnegligible for 9x9 matrices (this is on an 800 MHz Pentium III),  while the Det function from Mathematica still takes an unmeasurable amount of time. The timinig of Laplace method increases as n!:  9!/4! = 15120,  which is the same order of magnitude as the ratio of CPU times in the two calculations. Now let's try Mathematica's Det on a really large problem,  where Laplace's expansion would run forever (literaly, see below):

One has to go to a matrix size as large as 1000 to have Mathematica work for a few seconds.  Clearly,  it uses an algorithm different from Laplace's expansion.

One way to get the values of a determinant quickly without using Det is to diagonalize a matrix first:

So this method is much quicker than the Laplace's method.  However,  tried on a matrix of dimension 1000, it runs too long to wait for it.  Let's try size 100:

This is not bad taking into account that Laplace calculation would take 71*100!/9! = seconds (this is quite a bit more than the age of the Universe which is now believed to be about seconds).

Thus, not suprisingly,  direct Det is much faster than going through diagonalization.

Created by Mathematica  (September 29, 2003)