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
Ways to use trace :