What's the trace of a Matrix?
Trace of a square matrix.
The trace of a square matrix is defined as the sum of the diagonal elements.
Let a square matrix,
So, the trace of the matrix,
Hence, the trace of the matrix is the sum of all the diagonal elements.