[next][previous][up][top][index]
search for:

trace Matrix -- trace of a matrix

Synopsis:

  • Function: trace -- trace of a matrix
  • Input:
  • an instance of class Matrix.
  • Output:
  • an instance of class RingElement.
  • Code:

         -- ../m2/multilin.m2:118-123
         trace Matrix := RingElement => f -> (
              if rank source f != rank target f
              or not isFreeModule source f
              or not isFreeModule target f
              then error "expected a square matrix";
              sum(rank source f, i -> f_(i,i)))

    [next][previous][up][top][index]
    search for: