det Matrix -- determinant of a matrix
Synopsis:
i1 : R = QQ[a..d]
o1 = R
o1 : PolynomialRing |
i2 : p = matrix {{a,b},{c,d}}
o2 = | a b |
| c d |
2 2
o2 : Matrix R <--- R |
i3 : det p
o3 = - b*c + a*d
o3 : R |
Code:
-- ../../../Macaulay2/m2/multilin.m2:194-199
det Matrix := RingElement => options -> f -> (
if rank source f != rank target f
or not isFreeModule source f
or not isFreeModule target f
then error "expected a square matrix";
(exteriorPower(numgens source f, f, options))_(0,0))