Writing $Maa^\top M$ as a sum Let $a \in \mathbb{R}^{n \times 1}$ (a column vector) and $M \in \mathbb{R}^{n \times k}$. Let $m_i \in \mathbb{R}^{1 \times k}$ denote the $i$-th row of $M$. Then we can write $$M^\top M = \sum_{i=1}^n m_i m_i^\top.$$ Is it possible to write $$M^\top aa^\top M$$ as a similar sum in terms of the rows of $M$?

We have
$$
a^TM = \sum_{i=1}^n a_i m_i,
$$
which is a row vector, 
and hence
$$
M^Taa^TM = \sum_{i,j=1}^n m_j^T a_ja_i m_i.
$$
Not sure if this helps.
