Matrix Trace Calculator
Compute the trace of a square matrix (sum of diagonal elements).
How It Works
Enter any square matrix. The trace is the sum of all diagonal elements. It equals the sum of the eigenvalues and is invariant under similarity transformations.
Formula
trace(A) = A[0][0] + A[1][1] + ... + A[n-1][n-1]
Frequently Asked Questions
What is the trace of a matrix?
The trace is the sum of the main diagonal elements. It equals the sum of the eigenvalues and is used in physics, statistics, and linear algebra.
Is trace defined for non-square matrices?
No. The trace is only defined for square (n x n) matrices because only square matrices have a main diagonal.