Macaulay2 » Documentation
Packages » SparseResultants :: determinant(MultidimensionalMatrix)
next | previous | forward | backward | up | index | toc

determinant(MultidimensionalMatrix) -- hyperdeterminant of a multidimensional matrix

Synopsis

Description

This is calculated using Schlafli's method where it is known to work. Use an optional input as Strategy=>"forceSchlafliMethod" to try to force this approach (but without ensuring the correctness of the calculation). For matrices of boundary shape, the calculation passes through sylvesterMatrix(MultidimensionalMatrix). For details, see the Chapter 14 in the book Discriminants, Resultants, and Multidimensional Determinants.

i1 : M = randomMultidimensionalMatrix(2,2,2,2)

o1 = {{{{8, 1}, {3, 7}}, {{8, 3}, {3, 7}}}, {{{8, 8}, {5, 7}}, {{8, 5}, {2,
     ------------------------------------------------------------------------
     3}}}}

o1 : 4-dimensional matrix of shape 2 x 2 x 2 x 2 over ZZ
i2 : time det M
 -- used 0.462328s (cpu); 0.32276s (thread); 0s (gc)

o2 = 9698337990421512192
i3 : M = randomMultidimensionalMatrix(2,2,2,2,5)

o3 = {{{{{6, 3, 6, 8, 6}, {9, 3, 7, 6, 9}}, {{6, 2, 6, 0, 2}, {6, 9, 3, 5,
     ------------------------------------------------------------------------
     6}}}, {{{3, 5, 7, 7, 9}, {4, 5, 0, 4, 3}}, {{1, 8, 9, 1, 2}, {9, 6, 6,
     ------------------------------------------------------------------------
     2, 6}}}}, {{{{4, 0, 9, 8, 3}, {7, 9, 0, 5, 1}}, {{8, 2, 2, 1, 7}, {5, 6,
     ------------------------------------------------------------------------
     7, 4, 5}}}, {{{4, 0, 1, 4, 4}, {2, 6, 1, 1, 4}}, {{5, 4, 9, 7, 4}, {6,
     ------------------------------------------------------------------------
     4, 8, 4, 2}}}}}

o3 : 5-dimensional matrix of shape 2 x 2 x 2 x 2 x 5 over ZZ
i4 : time det M
 -- used 0.978065s (cpu); 0.844525s (thread); 0s (gc)

o4 = 912984499996938980479447727885644530753184525786986940737407301278806287
     9257139493926586400187927813888

See also

Ways to use this method: