Trace of Matrix


In a square matrix, the sum of elements of the principal diagonal is called the 'trace of a matrix'.

We generally denote the trace of the matrix A by 'tr A'.


Note:
The trace exits only for Square Matrices.

Example:


Trace(A)=a+e+i



Now, Let's jump in to have fun, Practically trying them...


Enter the order of matrix


submit

OUTPUT SECTION: