求含迹与克罗内克积的矩阵导数:∂/∂F tr{A(Iₙ⊗F)ᵀ+(Iₙ⊗F)A}
Let's break down this derivative step by step—Kronecker products can be tricky when dealing with matrix derivatives, but splitting things into block matrices makes the problem much more manageable. Here's how to work through it:
Step 1: Split the Trace Using Linearity
First, we use the linearity of the trace and derivative operators to split the original expression into two separate terms:
$$
\frac{\partial}{\partial \bf F} \left[ \textrm{tr}\left( \bf A(\bf I_n \otimes \bf F)^\top \right) + \textrm{tr}\left( (\bf I_n \otimes \bf F)\bf A \right) \right] = \frac{\partial}{\partial \bf F} \textrm{tr}\left( \bf A(\bf I_n \otimes \bf F)^\top \right) + \frac{\partial}{\partial \bf F} \textrm{tr}\left( (\bf I_n \otimes \bf F)\bf A \right)
$$
We'll compute each derivative individually and then add them together.
Step 2: Compute $\frac{\partial}{\partial \bf F} \textrm{tr}\left( (\bf I_n \otimes \bf F)\bf A \right)$
First, recall that $\bf I_n \otimes \bf F$ is a block-diagonal matrix with $n$ copies of $\bf F$ along its diagonal. Let's split $\bf A$ into an $n \times n$ block matrix where each block $\bf A_{ij} \in \mathbb{R}^{p \times p}$:
$$
\bf A = \begin{bmatrix} \bf A_{11} & \dots & \bf A_{1n} \ \vdots & \ddots & \vdots \ \bf A_{n1} & \dots & \bf A_{nn} \end{bmatrix}
$$
When we multiply $(\bf I_n \otimes \bf F)$ (block-diagonal) with $\bf A$, the resulting matrix's diagonal blocks are $\bf F \bf A_{ii}$ for $i=1,...,n$. The trace of a block matrix is the sum of the traces of its diagonal blocks, so:
$$
\textrm{tr}\left( (\bf I_n \otimes \bf F)\bf A \right) = \sum_{i=1}^n \textrm{tr}\left( \bf F \bf A_{ii} \right)
$$
Using the trace property $\textrm{tr}(XY) = \textrm{tr}(YX)$, we can rewrite this as:
$$
\sum_{i=1}^n \textrm{tr}\left( \bf A_{ii} \bf F \right) = \textrm{tr}\left( \left( \sum_{i=1}^n \bf A_{ii} \right) \bf F \right)
$$
Now, use the standard matrix derivative rule: $\frac{\partial}{\partial \bf F} \textrm{tr}(\bf C \bf F) = \bf C^\top$ (where $\bf C$ is a constant matrix). Applying this here, we get:
$$
\frac{\partial}{\partial \bf F} \textrm{tr}\left( (\bf I_n \otimes \bf F)\bf A \right) = \left( \sum_{i=1}^n \bf A_{ii} \right)^\top = \sum_{i=1}^n \bf A_{ii}^\top
$$
Step 3: Compute $\frac{\partial}{\partial \bf F} \textrm{tr}\left( \bf A(\bf I_n \otimes \bf F)^\top \right)$
First, note that $(\bf I_n \otimes \bf F)^\top = \bf I_n \otimes \bf F^\top$, which is also a block-diagonal matrix with $\bf F^\top$ on its diagonal. Using the same block matrix split for $\bf A$, the product $\bf A(\bf I_n \otimes \bf F^\top)$ has diagonal blocks $\bf A_{ii} \bf F^\top$. Taking the trace:
$$
\textrm{tr}\left( \bf A(\bf I_n \otimes \bf F)^\top \right) = \sum_{i=1}^n \textrm{tr}\left( \bf A_{ii} \bf F^\top \right)
$$
Again, use trace properties: $\textrm{tr}(XY^\top) = \textrm{tr}(Y X^\top)$, so this becomes:
$$
\sum_{i=1}^n \textrm{tr}\left( \bf F \bf A_{ii}^\top \right) = \textrm{tr}\left( \bf F \left( \sum_{i=1}^n \bf A_{ii}^\top \right) \right) = \textrm{tr}\left( \left( \sum_{i=1}^n \bf A_{ii}^\top \right) \bf F \right)
$$
Applying the same derivative rule as before, we get:
$$
\frac{\partial}{\partial \bf F} \textrm{tr}\left( \bf A(\bf I_n \otimes \bf F)^\top \right) = \left( \sum_{i=1}^n \bf A_{ii}^\top \right)^\top = \sum_{i=1}^n \bf A_{ii}
$$
Step 4: Combine the Results
Add the two derivatives together to get the final result:
$$
\frac{\partial}{\partial \bf F}\textrm{tr} \bigg {\bf A(\bf I_{n} \otimes \bf F)^{\top} + (\bf I_{n} \otimes \bf F)\bf A \bigg } = \sum_{i=1}^n \bf A_{ii}^\top + \sum_{i=1}^n \bf A_{ii} = \sum_{i=1}^n \left( \bf A_{ii} + \bf A_{ii}^\top \right)
$$
Simplified Notation (Block Trace)
If you're familiar with block traces (summing the diagonal blocks of a block matrix), we can write this more compactly. Let $\textrm{tr}n(\bf A)$ denote the block trace of $\bf A$ (i.e., $\textrm{tr}n(\bf A) = \sum{i=1}^n \bf A{ii}$). Then the result becomes:
$$
\textrm{tr}_n(\bf A) + \textrm{tr}_n(\bf A^\top)
$$
To verify, test with $n=1$: the expression reduces to $\frac{\partial}{\partial \bf F} \textrm{tr}(\bf A F^\top + \bf F A) = \bf A + \bf A^\top$, which matches our formula (since $\textrm{tr}_1(\bf A) = \bf A$).
内容的提问来源于stack exchange,提问作者NeCGorth

