TITLE: Dot product for 3 vectors
QUESTION [5 upvotes]: The dot product can be used to write the sum:
$$\sum_{i=1}^n a_i b_i$$
as $$a^T b$$
Is there an equivalent notation for the following sum:
$$\sum_{i=1}^n a_i b_i c_i$$

REPLY [9 votes]: $${\sum_{i=1}^n} a_ib_ic_i= {\bf a}^T{\bf C}{\bf b} \hspace{0.25cm}\textrm{where}\hspace{0.25cm} \left\{ \begin{array}{}C_{ii} = c_i \\ C_{ij} = 0\end{array} \right\} , i\neq j$$ 
$\bf C$ is a diagonal gram matrix for a scalar product where the $\bf c$ column-vector is on the diagonal. Note however the symmetry that we may as well choose $\bf A$ or $\bf B$ to be such gram matrices defining the scalar product between the other two vectors.
This can be expanded for $N$ vectors by having $N-2$ matrices as a product "in the middle" and a row vector from the left and a column vector from the right. $${\bf a}^T{\bf BCd} = \sum_{i=1}^n a_ib_ic_id_i$$ and nothing prevents us from creating more such matrices in the middle without limit.

EDIT:
A more general way to write it would be:
$$\sum_{i}\prod_{k=1}^N({\bf a_k})_i = \text{Tr}\left(\prod_{k=1}^N{\bf A_k}\right)$$ A trace of a product of matrices where we enumerate the vectors $\bf a_i$ and corresponding matrix $\bf A_i$. This is just to be able to more practically write them with the product and sum notations.