$PQ= \sum_{i=1}^n p_i q_i^T$

292 Views Asked by At

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 ?

2

There are 2 best solutions below

0
On BEST ANSWER

$\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 \\ }$$

0
On

Check that the $i,j$ entry of the left-hand side is the $i,j$ entry of the right-hand side.

If you think about how the matrix multiplication $PQ$ works, you will note that the $i,j$ entry of $PQ$ is $\sum_{k=1}^n p_{ik} q_{kj}$.

For the right-hand side $\sum_{k=1}^n p_k q_k^\top$, note that $p_{ik} q_{kj}$ is the $i,j$ entry of $p_k q_k^\top$.