## Column products

Consider matrices $$\boldsymbol A$$ of type $$m \times n$$ and $$\boldsymbol B$$ of type $$n \times p$$. Let us denote by $$\boldsymbol a_1,\boldsymbol a_2,\dots, \boldsymbol a_n$$ the columns of the matrix $$\boldsymbol A$$ and $$\boldsymbol b_1^\mathsf T, \boldsymbol b_2^\mathsf T,\dots, \boldsymbol b_n^\mathsf T$$ the rows of the matrix $$\boldsymbol B$$. (I.e. $$\boldsymbol b_1,\boldsymbol b_2,\dots, \boldsymbol b_n$$ are the columns of $$\boldsymbol B^\mathsf T$$.)

Which matrix corresponds to the expression $$\boldsymbol a_1\boldsymbol b_1^\mathsf T+\boldsymbol a_2\boldsymbol b_2^\mathsf T+\cdots+\boldsymbol a_n\boldsymbol b_n^\mathsf T$$?

Here, each of $$\boldsymbol a_i\boldsymbol b_i^\mathsf T$$ is a matrix of type $$m \times p$$, since we consider column vectors as a matrix of one column.

• #### Solution

Denote $$\boldsymbol C=\boldsymbol a_1\boldsymbol b_1^\mathsf T+\boldsymbol a_2\boldsymbol b_2^\mathsf T+\cdots+\boldsymbol a_n\boldsymbol b_n^\mathsf T$$.

The matrix $$\boldsymbol a_k\boldsymbol b_k^\mathsf T$$ has on the $$i$$-th row and the $$j$$-th colum the product $$a_{ik}b_{kj}$$.

Hence $$c_{ij}=\sum\limits_{k=1}^n a_{ik}b_{kj}$$ and consequently $$\boldsymbol C=\boldsymbol{AB}$$.

The given expression corresponds to the product $$\boldsymbol{AB}$$.