logo

Trace 📂Matrix Algebra

Trace

Definition

Let matrix n×nn\times n be given as follows.

A=[a11a12a1na21a22a2nan1an2ann] A= \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{bmatrix}

The sum of the diagonal elements of AA is defined as the trace of AA and is denoted as follows.

tr(A)=Tr(A)=a11+a22++ann=i=1naii \text{tr}(A)=\text{Tr}(A)=a_{11}+a_{22}+\cdots + a_{nn}=\sum \limits_{i=1}^{n} a_{ii}

Explanation

The trace can also be thought of as a function as follows. Let Mn×n(R)M_{n\times n}(\mathbb{R}) be the set of n×nn\times n matrices with real number components. Then, Tr\text{Tr} is defined as the following function.

Tr:Mn×n(R)R,Tr(A)=i=1naii \text{Tr} : M_{n\times n} (\mathbb{R}) \to \mathbb{R},\quad \text{Tr}(A)=\sum \limits_{i=1}^{n} a_{ii}

Properties

Let A,B,CA,B,C be a n×nn \times n matrix, and let kk be a constant.

(a) The trace of a scalar multiple is the same as the scalar multiple of the trace.

Tr(kA)=kTr(A) \text{Tr}(kA)= k\text{Tr}(A)

(b) The trace of a sum is the same as the sum of the traces.

Tr(A+B)=Tr(A)+Tr(B) \text{Tr}(A+B)=\text{Tr}(A)+\text{Tr}(B)

(a)+(b) The trace is linear.

Tr(kA+B)=kTr(A)+Tr(B) \text{Tr}(kA+B)=k\text{Tr}(A)+\text{Tr}(B)

(c) The trace of ABAB and BABA is the same.

Tr(AB)=Tr(BA) \text{Tr}(AB) = \text{Tr}(BA)

(c’) Cyclic Property: From the above fact, it can be known that the following equation holds.

Tr(ABC)=Tr(BCA)=Tr(CAB) \text{Tr}(ABC) = \text{Tr}(BCA) = \text{Tr}(CAB)

(d) The trace of AA and ATA^{T} is the same.

Tr(A)=Tr(AT) \text{Tr}(A) = \text{Tr}(A^{T})