logo

대각합 📂Matrix Algebra

대각합

Definition

Let the $n\times n$ matrix $A$ be given as follows.

$$ 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 entries of $A$ is defined to be the trace of $A$ and is denoted as follows.

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

Explanation

One can also regard the trace as a function in the following way. Let $M_{n\times n}(\mathbb{R})$ be the set of $n\times n$ matrices with real entries. Then $\text{Tr}$ is the function defined by

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

If the trace is a function, there is no reason it cannot be differentiated. (See ../3670)

Properties

Let $A = [a_{ij}]$, $B=[b_{ij}]$, $C$ be $n \times n$ matrices and let $k$ be a scalar.

(a) The trace of a scalar multiple equals the scalar multiple of the trace.

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

(b) The trace of a sum equals the sum of traces.

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

(a)+(b) Hence the trace is linear.

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

(c) The traces of $AB$ and $BA$ are equal.

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

  • (c’) Cyclic property: From the above fact one can deduce the following identity.

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

  • (c") In fact, this holds for any $A \in \mathbb{R}^{n \times m}$, $B \in \mathbb{R}^{m \times \ell}$, $C \in \mathbb{R}^{\ell \times n}$ as well.

(d) The trace of $A$ equals the trace of its transpose $A^{\mathsf{T}}$.

$$ \text{Tr}(A) = \text{Tr}(A^{\mathsf{T}}) $$

(e) The following hold.

$$ \sum\limits_{i,k} a_{ik}b_{ki} = \text{Tr}(AB) = \text{Tr}(B^{\mathsf{T}} A^{\mathsf{T}}) $$

$$ \sum\limits_{i,k} a_{ik}b_{ik} = \text{Tr}(AB^{\mathsf{T}}) = \text{Tr}(A^{\mathsf{T}} B) $$

(f) For the eigenvalues $\lambda_{i}$ of $A^{\mathsf{T}}A$, $\Tr(A^{\mathsf{T}} A) = \sum_{i} \lambda_{i}$

Proof

(e)

The $(i,j)$-component of the product of two matrices $A$ and $B$ can be written as follows. (See ../3668)

$$ [AB]_{ij} = \sum\limits_{k} a_{ik}b_{kj} $$

Since the trace is the sum of the $i=j$ components,

$$ \Tr(AB) = \sum\limits_{i,k} a_{ik}b_{ki} $$

(f)

$A^{\mathsf{T}}A$ is a symmetric matrix, hence it is orthogonally diagonalizable.

$$ A^{\mathsf{T}}A = Q^{\mathsf{T}} \Lambda Q $$

Here $Q$ is an orthogonal matrix, and $\Lambda$ is a diagonal matrix whose diagonal entries are the eigenvalues of $A^{\mathsf{T}}A$. By the cyclic property the following holds.

$$ \begin{align*} \Tr (A^{\mathsf{T}}A) &= \Tr \left( Q^{\mathsf{T}} \Lambda Q \right) \\ &= \Tr \left( \Lambda QQ^{\mathsf{T}} \right) \\ &= \Tr \left( \Lambda \right) \\ &= \sum\limits_{i} \lambda_{i} \end{align*} $$