Returns the trace of a matrix
tr(a)
a
Matrix whose trace is desired
Robin K. S. Hankin
tr(matrix(1:9,3,3))