대각합
📂Matrix Algebra 대각합 Definition Let n × n n\times n n × n be a matrix given as follows.
A = [ a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋱ ⋮ a n 1 a n 2 ⋯ a n n ]
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 11 a 21 ⋮ a n 1 a 12 a 22 ⋮ a n 2 ⋯ ⋯ ⋱ ⋯ a 1 n a 2 n ⋮ a nn
The sum of the diagonal elements of A A A is defined as the trace of A A A and is denoted as follows.
tr ( A ) = Tr ( A ) = a 11 + a 22 + ⋯ + a n n = ∑ i = 1 n a i i
\text{tr}(A)=\text{Tr}(A)=a_{11}+a_{22}+\cdots + a_{nn}=\sum \limits_{i=1}^{n} a_{ii}
tr ( A ) = Tr ( A ) = a 11 + a 22 + ⋯ + a nn = i = 1 ∑ n a ii
Explanation The trace can also be considered a function. Let M n × n ( R ) M_{n\times n}(\mathbb{R}) M n × n ( R ) be the set of n × n n\times n n × n matrices with real number components. Then Tr \text{Tr} Tr is a function defined as follows.
Tr : M n × n ( R ) → R , Tr ( A ) = ∑ i = 1 n a i i
\text{Tr} : M_{n\times n} (\mathbb{R}) \to \mathbb{R},\quad \text{Tr}(A)=\sum \limits_{i=1}^{n} a_{ii}
Tr : M n × n ( R ) → R , Tr ( A ) = i = 1 ∑ n a ii
If the trace is a function, there’s nothing to stop us from differentiating it.
Properties Let A = [ a i j ] A = [a_{ij}] A = [ a ij ] , B = [ b i j ] B=[b_{ij}] B = [ b ij ] , C C C be n × n n \times n n × n matrices, and let k k k be a constant.
(a) The trace of a scalar multiple and the scalar multiple of a trace are equal.
Tr ( k A ) = k Tr ( A )
\text{Tr}(kA)= k\text{Tr}(A)
Tr ( k A ) = k Tr ( A )
(b) The trace of a sum and the sum of traces are equal.
Tr ( A + B ) = Tr ( A ) + Tr ( B )
\text{Tr}(A+B)=\text{Tr}(A)+\text{Tr}(B)
Tr ( A + B ) = Tr ( A ) + Tr ( B )
(a)+(b) The trace is linear .
Tr ( k A + B ) = k Tr ( A ) + Tr ( B )
\text{Tr}(kA+B)=k\text{Tr}(A)+\text{Tr}(B)
Tr ( k A + B ) = k Tr ( A ) + Tr ( B )
(c) The traces of A B AB A B and B A BA B A are equal.
Tr ( A B ) = Tr ( B A )
\text{Tr}(AB) = \text{Tr}(BA)
Tr ( A B ) = Tr ( B A )
(c’) Cyclic Property: From this fact, we can see that the following equation holds.Tr ( A B C ) = Tr ( B C A ) = Tr ( C A B )
\text{Tr}(ABC) = \text{Tr}(BCA) = \text{Tr}(CAB)
Tr ( A BC ) = Tr ( BC A ) = Tr ( C A B )
(c") In fact, this also holds for any A ∈ R n × k A \in \mathbb{R}^{n \times k} A ∈ R n × k and B ∈ R k × n B \in \mathbb{R}^{k \times n} B ∈ R k × n .(d) The traces of A A A and its transpose matrix A T A^{\mathsf{T}} A T are equal.
Tr ( A ) = Tr ( A T )
\text{Tr}(A) = \text{Tr}(A^{T})
Tr ( A ) = Tr ( A T )
(e) The following holds.
∑ i , k a i k b k i = Tr ( A B ) = Tr ( B T A T )
\sum\limits_{i,k} a_{ik}b_{ki} = \text{Tr}(AB) = \text{Tr}(B^{\mathsf{T}} A^{\mathsf{T}})
i , k ∑ a ik b ki = Tr ( A B ) = Tr ( B T A T )
∑ i , k a i k b i k = Tr ( A B T ) = Tr ( A T B )
\sum\limits_{i,k} a_{ik}b_{ik} = \text{Tr}(AB^{\mathsf{T}}) = \text{Tr}(A^{\mathsf{T}} B)
i , k ∑ a ik b ik = Tr ( A B T ) = Tr ( A T B )
Proof (e) The ( i , j ) (i,j) ( i , j ) component of the product of matrices A A A , B B B can be expressed as follows.
[ A B ] i j = ∑ k a i k b k j
[AB]_{ij} = \sum\limits_{k} a_{ik}b_{kj}
[ A B ] ij = k ∑ a ik b kj
Since the trace is the sum of components where i = j i=j i = j ,
Tr ( A B ) = ∑ i , k a i k b k i
\Tr(AB) = \sum\limits_{i,k} a_{ik}b_{ki}
Tr ( A B ) = i , k ∑ a ik b ki
■