대각합
定義
$n\times n$ 行列 $A$ が次のように与えられたとしよう。
$$ 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} $$
$A$ の 対角成分 の和を $A$ の トレースtrace と定義し,次のように表す。
$$ \text{tr}(A)=\text{Tr}(A)=a_{11}+a_{22}+\cdots + a_{nn}=\sum \limits_{i=1}^{n} a_{ii} $$
説明
次のようにトレースを関数と考えることもできる。 $M_{n\times n}(\mathbb{R})$ を実数を成分にもつ $n\times n$ 行列の集合としよう。すると $\text{Tr}$ は次のように定義される関数である。
$$ \text{Tr} : M_{n\times n} (\mathbb{R}) \to \mathbb{R},\quad \text{Tr}(A)=\sum \limits_{i=1}^{n} a_{ii} $$
トレースが関数ならば 微分できないわけでもない。
性質
$A = [a_{ij}]$, $B=[b_{ij}]$, $C$ が $n \times n$ 行列, $k$ が定数としよう。
(a) 定数倍のトレースとトレースの定数倍は等しい。
$$ \text{Tr}(kA)= k\text{Tr}(A) $$
(b) 和のトレースとトレースの和は等しい。
$$ \text{Tr}(A+B)=\text{Tr}(A)+\text{Tr}(B) $$
(a)+(b) トレースは 線形 である。
$$ \text{Tr}(kA+B)=k\text{Tr}(A)+\text{Tr}(B) $$
(c) $AB$ と $BA$ のトレースは等しい。
$$ \text{Tr}(AB) = \text{Tr}(BA) $$
- (c’) 巡回性質Cyclic Property: 上の事実から次の式が成り立つことがわかる。
$$ \text{Tr}(ABC) = \text{Tr}(BCA) = \text{Tr}(CAB) $$
- (c") 実際,任意の $A \in \mathbb{R}^{n \times m}$ と $B \in \mathbb{R}^{m \times \ell}$、$C \in \mathbb{R}^{\ell \times n}$ に対しても成り立つ。
(d) $A$ と 転置行列 $A^{\mathsf{T}}$ のトレースは等しい。
$$ \text{Tr}(A) = \text{Tr}(A^{\mathsf{T}}) $$
(e) 次が成り立つ。
$$ \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) $A^{\mathsf{T}}A$ の 固有値 $\lambda_{i}$ に対して, $\Tr(A^{\mathsf{T}} A) = \sum_{i} \lambda_{i}$
証明
(e)
二つの行列 $A$, $B$ の積の $(i,j)$ 成分は 次のように表せる。
$$ [AB]_{ij} = \sum\limits_{k} a_{ik}b_{kj} $$
トレースとは $i=j$ である成分をすべて加えたものなので、
$$ \Tr(AB) = \sum\limits_{i,k} a_{ik}b_{ki} $$
■
(f)
$A^{\mathsf{T}}A$ は 対称行列 であるから 直交対角化 が可能である。
$$ A^{\mathsf{T}}A = Q^{\mathsf{T}} \Lambda Q $$
このとき $Q$ は 直交行列 で, $\Lambda$ は $A^{\mathsf{T}}A$ の固有値を対角成分にもつ 対角行列 である。巡回性質により次が成り立つ。
$$ \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*} $$
■