# Matrix trace

Calculates a square matrix trace.

## Trace of a matrix

The trace of a **square matrix** is the sum of the values of its diagonal.

Let A be a square matrix of dimension n whose elements `a_(ij)`.

`1<=i<=n` and `1<=j<=n`.

`a_(ij)` being the element in line i and column j, then the trace of A is defined as,

`Tr(A) = \sum_{i=1}^n a_(ii)`