Calculates the trace of a matrix

1 | ```
tr(M)
``` |

`M` |
a matrix |

returns the sum of the diagonal elements

Michael Friendly

1 2 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.