[top][index]
search for:

det Matrix -- determinant of a matrix

Synopsis:

  • Usage: d = det f
  • Function: det -- determinant of a matrix
  • Input:
  • f, an instance of class Matrix: a square matrix
  • Output:
  • d, an instance of class RingElement: the determinant of f
  • Optional arguments :
  • det(..., Strategy => ...) -- choose between Bareiss and Cofactor algorithms
  • 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))

    [top][index]
    search for: