Trace of a Matrix

The trace of a square matrix A of size n is the sum of its elements on the main diagonal.

The Main Diagonal of a Square Matrix

The formula to calculate the trace is as follows:

The Formula for the Trace of a Matrix

A Practical Example

The following square matrix is of order three.

The Original Matrix

The elements on the main diagonal are 1, 5, and 9.

To calculate the trace, TR(A), I add these elements together.

Example Calculation of the Matrix Trace

Therefore, the trace of matrix A is 15.

Properties of Matrix Trace

The trace of a matrix adheres to the following properties:

  1. The trace of a scalar alpha times a matrix, TR(α·A), equals the scalar alpha times the trace of the matrix, α·TR(A).
    α·TR(A).
  2. The sum of the traces of two matrices, TR(A)+TR(B), equals the trace of the sum of the matrices, TR(A+B).
    The trace of the sum of the matrices, TR(A+B), equals the sum of the traces of the matrices, TR(A)+TR(B).

    Note. These first two properties prove that the trace is a linear function.

  3. Matrix A and its transpose AT have the same trace.
    The trace of the transpose of a matrix equals the trace of the matrix.
  4. The trace of the product of matrices, TR(ABC), remains invariant under a cyclic permutation, TR(BCA) and TR(CAB).
    The cyclic permutation of factors does not change the trace of the product matrix ABC.

    An example of non-cyclic permutation. The trace is not equal in TR(ACB) or TR(CBA) because these are not cyclic permutations. In these cases, the order of the factors in the product of matrices ABC is not obtained by moving the factors to the right or left.
    An example of non-cyclic permutation.

 
 

Please feel free to point out any errors or typos, or share suggestions to improve these notes. English isn't my first language, so if you notice any mistakes, let me know, and I'll be sure to fix them.

FacebookTwitterLinkedinLinkedin
knowledge base

Matrices (linear algebra)