The sum of the elements of the principal or main diagonal elements of a square matrix is known as the **trace of a matrix**. It is generally denoted by Tr(P), where P is any square matrix.

**Contents**show

## Trace of a matrix example

Let C is a 2 x 2 matrix such that

Now, to find the trace of this matrix C, we add all the elements of the main diagonal elements i.e.

Tr(C) = 3 + 7 = 10

Let D is a 3 x 3 matrix such that

In order to find the trace of matrix D, we add all the elements of the main diagonal elements i.e.

Tr(D) = -1 + 8 + 6 = 13

Trace of matrix E,

Tr(E) = 7 – 5 + 10 – 15 = -3

## Trace of a matrix properties

Let P and Q be two square matrices of same order.

1. Tr(P + Q) = Tr(P) + Tr(Q)

2. Tr(PQ) = Tr(QP)

It is true only if both PQ and QP are defined.

3. Tr(kP) = k Tr(P)

where, k is a scalar.