For matrices $P \in \mathbb R^{m \times n}$ and $Q \in \mathbb R^{n \times d}$, let $p_i$ be the $i^{th}$ column of $P$, and $q_i^T$ the $i^{th}$ line of $Q$. We want to show that $$PQ= \sum_{i=1}^n p_i q_i^T$$
I saw a proof using the fact that $\sum_k p_kq_k^T=\sum_k \sum_i \sum_j p_{ik}q_{kj}M_{ij}$ with $M_{ij}$ a matrix full of zeros everywhere except $(M_{ij})_{ij}=1$.
Is there a proof that does not use triple sums ?
$\def\e{\varepsilon}$Let $\e_k$ denote the canonical vector basis for ${\mathbb R}^{n}$, then the indexed vectors can be written in terms of the underlying matrices as
$$\eqalign{p_k = P\e_k \quad\qquad q_k^T = e_k^TQ}$$ Therefore the sum in question can be expanded as $$\eqalign{ \sum_{k=1}^n p_kq_k^T &= \sum_{k=1}^n P\e_k\e_k^TQ \\ &= P\left(\sum_{k=1}^n\e_k\e_k^T\right)Q \\ &= P\,I_n\,Q \\ &= PQ \\ }$$