Sorry for boring you my friends. I am haunted by a question of matrix derivative.
$q$ is a vector of dimension $n\times1$;
$A_1$, $A_2$, $...$ $A_n$ and $B$ are matrix with constant coefficients of dimension $n\times n$;
$A_1q$ , $A_2q$ $...$ and $A_nq$ become $n$ columns of matrix $\left[ A_1q \space A_2q ... \space A_nq \right]$ whose dimension is $n \times n$.
I would like to perform the following matrix derivative: $$\frac{\partial}{\partial q}\left( \left[ A_1q \space A_2q ... \space A_nq \right]Bq\right)^\text{T}$$
The first part of derivative is done, but I don't know how to perform derivative on the second part.
$$\frac{\partial}{\partial q}\left( \left[ A_1q \space A_2q ... \space A_nq \right]Bq\right)^\text{T} = B^\text{T}\left[ A_1q \space A_2q ... \space A_nq \right]^\text{T}+ q^\text{T}B^\text{T}\frac{\partial}{\partial q}\left(\left[ A_1q \space A_2q ... \space A_nq \right]^\text{T} \right)$$
Thanks in advance for taking a look!
P.S. Thanks for your response.Let $p$ and $q$ are all n-element vector.
$$ \frac{\partial p}{\partial q} = \left[ \begin {array}{ccc} \frac{\partial p_1}{\partial q_1}&...&\frac{\partial p_1}{\partial q_n} \\ ...&...&...\\ \frac{\partial p_n}{\partial q_1}&...&\frac{\partial p_n}{\partial q_n}\end {array} \right]$$