In a proof to a problem in optimization, there's this part I don't quite understand.
$(\Sigma_{i=1}^m \alpha_i\textbf{d}_i)^TQ(\Sigma_{i=1}^m \alpha_i\textbf{d}_i) = \Sigma_{i=1}^m \alpha_i^2\textbf{d}_i^TQ\textbf{d}_i$
where $\boldsymbol{\alpha} = (\alpha_1, \alpha_2,\cdots, \alpha_m)^T \in \mathbb{R}^m$; and $\textbf{d}_1, \textbf{d}_2, \cdots, \textbf{d}_m \in \mathbb{R}^n$ are $Q$-orthogonal, $\textbf{d}_i^TQ\textbf{d}_j = 0$ whenever $i \neq j$.
I tried to expand the left hand side by inserting the $Q$ to the right like this
$(\Sigma_{i=1}^m \alpha_i\textbf{d}_i)^T(\Sigma_{i=1}^m \alpha_iQ\textbf{d}_i) $
I believe I need to use some rule involving inner products, but I'm not exactly sure what to do next.
Thanks in advance.
You are almost there, you just need to develop the equation one step further. You have that: $$ \left(\sum_{i=1}^m\alpha_i\mathbf{d}_i\right)^\top Q\left(\sum_{i=1}^m\alpha_i\mathbf{d}_i\right) = \left(\sum_{i=1}^m\alpha_i\mathbf{d}_i\right)^\top\left(\sum_{i=1}^m\alpha_iQ\mathbf{d}_i\right) = \sum_{i=1}^m\sum_{j=1}^m\alpha_i\alpha_j\mathbf{d}_i^\top Q\mathbf{d}_j. $$ Now, since the $\mathbf{d}_i$ vectors are $Q$-orthogonal, all the terms such that $i\neq j$ are equal to zero, which leaves you with: $$ \left(\sum_{i=1}^m\alpha_i\mathbf{d}_i\right)^\top Q\left(\sum_{i=1}^m\alpha_i\mathbf{d}_i\right) = \sum_{i=1}^m\alpha_i^2\mathbf{d}_i^\top Q\mathbf{d}_i $$