next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: trace(Matrix)

trace(Matrix) -- trace of a matrix

Synopsis

Description

trace f -- returns the trace of the matrix f.

i1 : R = ZZ/101[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 : trace p

o3 = a + d

o3 : R