# The Trace of Matrix 矩阵的迹

$tr(A)=tr(A) = \sum_{i=1}^{n}A_{ii}$

1.For $A \in R^{n x n}$, trA = $trA^T$

$(A^T){ij} = A{ji}$. When i=j, $(A^T){ii} = A{ii}$ 矩阵和矩阵的转置主对角线元素相等,所以,它们的迹也相等.

2.For $A,B \in R^{n x n}$, tr(A+B) = trA + trB

$tr(A+B)=\sum_{i=1}^{n}(A_{ii})+B_{ii}=\sum_{i=1}^{n}A_{ii} + \sum_{i=1}^{n}B_{ii}=trA+trB$

3.For $A \in R^{n x n}$,$t\in R$, tr(tA) = t trA.

$tr(tA) =\sum_{i=1}^{n}tA_{ii}=t\sum_{i=1}^{n}A_{ii}=t trA$.

4.For A,B such that AB is square, trAB = trBA

$trAB=\sum_{i=1}^{n}AB_{ii}=\sum_{i=1}^{n}a_{i}^Tb_{i}=\sum_{i=1}^{n}b_{i}^Ta_{i}=\sum_{i=1}^{n}{AB}_{ii}=trBA$

5.For A,B,C such that ABC is square, trABC=trCAB=trBCA, and so on for the product of more matrices.

# The Rank of Matrix

1.For $A \in R^{m x n}$, rank(A) <= min(m,n). If rank(A) = min(m,n), then A is said to be full rank

2.For $A \in R^{m x n}$, $rank(A) = rank(A^T)$

3.For $A \in R^{m x n}$, $B\in R^{n x p}$, rank(AB) <= min(rank(A), rank(B))

4.For $A,B \in R^{m x n}$, rank(A+B) <= rank(A) + rank(B)