Let $D$ be a random $n \times n$ matrix with iid entries from $N(0,1)$ on the diagonal and let $A$ be a symmetric deterministic $n \times n$ matrix.
Question. What does $tr(ADAD)$ evaluate to ?
Let $D$ be a random $n \times n$ matrix with iid entries from $N(0,1)$ on the diagonal and let $A$ be a symmetric deterministic $n \times n$ matrix.
Question. What does $tr(ADAD)$ evaluate to ?
Copyright © 2021 JogjaFile Inc.
Write $A = [a_{ij}]_{1\leq i,j\leq n}$ and $D = \operatorname{diag}(X_1,\ldots,X_n)$. Then
$$ \operatorname{tr}(ADAD) = \sum_{i,j,k,l} a_{ij}(X_j \delta_{jk}) a_{kl} (X_l \delta_{li}) = \sum_{i,j} a_{ij}^2 X_i X_j. $$
So, if we write $B = [a_{ij}^2]_{1\leq i,j \leq n}$ and $X = \begin{pmatrix} X_1 & X_2 & \ldots & X_n \end{pmatrix}^{\mathsf{T}}$, then
$$ \operatorname{tr}(ADAD) = X^{\mathsf{T}} B X. $$
This has a generalized chi-square distribution.