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.
Trace of a matrix example
Let C is a 2 x 2 matrix such that
\[C=\begin{bmatrix} 3 &4 \\ 8& 7 \end{bmatrix}\]
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
\[D=\begin{bmatrix} -1 &2 & 3 \\ -6 & 8 & 7 \\ 7 & -5 & 6 \end{bmatrix}\]
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
\[E=\begin{bmatrix} 7 &9 &6 &8 \\ 4& -5 &3 &2 \\ 0&1 & 10 &11 \\ 12&13 & 14 &-15 \end{bmatrix}\]
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.