I'm self-studying through Mathematical Methods for Physics and Engineering and am stuck on how to evaluate some matrix quantities.
The authors provide the kinetic energy $T$ as $T=\dot{q}^{\text{T}}\text{A}\dot{q}$ and the potential energy $V$ as $V = q^{\text{T}}\text{B}q$, with $q$ being a generalized coordinate and A and B as symmetric, positive definite matrices.
They apply conservation of energy to the energies as defined: \begin{align*} \frac{d}{dt}\left(T+V\right) &= 0\\ \frac{d}{dt}\left(\dot{q}^{\text{T}}\text{A}\dot{q}+q^{\text{T}}\text{B}q\right) &= 0\\ \ddot{q}^{\text{T}}\text{A}\dot{q}+\dot{q}^{\text{T}}\text{A}\ddot{q}+\dot{q}^{\text{T}}\text{B}q+q^{T}\text{B}\dot{q}&=0 \end{align*} Up until this point, I follow along easily. However, they then go on to say:
"Using A=A$^{\text{T}}$ B=B$^{\text{T}}$ gives $2\dot{q}^{\text{T}}\left(A\ddot{q}+\text{B}q\right)=0"$
I don't know how to operate the $\ddot{q}^\text{T}$ matrix on the A matrix (or any of the other operations that were performed.)
To be clear: I don't want the work to be done for me, I'm just looking for a resource that explains the concepts clearly, as the chapter on matrices in this book is not helpful for this problem.
HINT:
Using $(AB)^T=B^TA^T$, we have
$$(\ddot{q}^TA\dot{q})^T=\dot{q^TA^T\ddot{q}}$$