How to convert the trace of this matrix expression to a quadratic form in terms of $b^2$? i want to convert the following to a quadratic form in terms of vector $b$:
$$trace(A^\top (\sum{b_i^2K_i})^\top T(\sum{b_i^2K_i}A))$$
where $T,K_i$ are symmetric and $n\times n$.
A is $n\times m$ and $b_i$ is scalar.
Can i write it in a quadratic form in terms of the vector $b$? or even $b^2$?
if so, Then what would be the $H$ matrix in the quadratic term?
 A: $$\mbox{tr} \left( \mathrm A^{\top} \left( \sum_{i=1}^m b_i^2 \mathrm K_i\right) \mathrm T \left( \sum_{j=1}^m b_j^2 \mathrm K_j\right) \mathrm A \right) = \sum_{i=1}^m \sum_{j=1}^m b_i^2 b_j^2 \, \mbox{tr} \left( \mathrm A^{\top} \mathrm K_i \mathrm T \mathrm K_j \mathrm A \right) = \begin{bmatrix} b_1^2\\ b_2^2\\ \vdots\\ b_m^2\end{bmatrix}^{\top} \begin{bmatrix} \mbox{tr} \left( \mathrm A^{\top} \mathrm K_1 \mathrm T \mathrm K_1 \mathrm A \right) & \mbox{tr} \left( \mathrm A^{\top} \mathrm K_1 \mathrm T \mathrm K_2 \mathrm A \right) & \cdots & \mbox{tr} \left( \mathrm A^{\top} \mathrm K_1 \mathrm T \mathrm K_m\mathrm A \right)\\ \mbox{tr} \left( \mathrm A^{\top} \mathrm K_2 \mathrm T \mathrm K_1 \mathrm A \right) & \mbox{tr} \left( \mathrm A^{\top} \mathrm K_2 \mathrm T \mathrm K_2 \mathrm A \right) & \cdots & \mbox{tr} \left( \mathrm A^{\top} \mathrm K_2 \mathrm T \mathrm K_m \mathrm A \right)\\ \vdots & \vdots & \ddots & \vdots\\ \mbox{tr} \left( \mathrm A^{\top} \mathrm K_m \mathrm T \mathrm K_1 \mathrm A \right) & \mbox{tr} \left( \mathrm A^{\top} \mathrm K_m \mathrm T \mathrm K_2 \mathrm A \right) & \cdots & \mbox{tr} \left( \mathrm A^{\top} \mathrm K_m \mathrm T \mathrm K_m \mathrm A \right)\\ \end{bmatrix} \begin{bmatrix} b_1^2\\ b_2^2\\ \vdots\\ b_m^2\end{bmatrix}$$
